<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7375674697305315111</id><updated>2011-08-30T16:40:57.524+01:00</updated><category term='track'/><category term='sitepal'/><category term='rules'/><category term='order tracking'/><category term='javascript'/><category term='WCF'/><category term='blog tracking'/><category term='survey'/><category term='silverlight'/><category term='custom sql'/><category term='tracking'/><category term='database trigger'/><category term='chat'/><category term='data protection'/><category term='script'/><category term='prospect detection'/><category term='vb.net'/><category term='HTTP Polling Duplex'/><category term='whoson'/><title type='text'>WhosOn / Email2DB - Dan's Development Blog</title><subtitle type='html'>Blog for development work related to Parker Software's products.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-7397914823945576</id><published>2010-10-13T13:37:00.004+01:00</published><updated>2010-10-13T14:17:49.349+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom sql'/><category scheme='http://www.blogger.com/atom/ns#' term='order tracking'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><title type='text'>Custom Field Filling in WhosOn Database</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I had a requirement from a customer to collect the order numbers from their website, but at their current state they were unable to use the normal method of modifying the tracking code to set the order details in WhosOn.  Fortunately, the details of the order were stored inside the URL for the customer, on the thank you page thankyou.aspx as the parameter OrderID.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wanted this to show up as a form fill variable so it can easily be used for querying the order number based on chatted, invited etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The route I went down for this was modification of the AddPageView procedure.  This procedure finds the page from the page header information (or inserts it if this page hasn't been seen before) and inserts a view record for the visitor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code below could be applied to the WhosOn Server Database in order to AddPageView&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;ALTER PROCEDURE [dbo].[AddPageView]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@VisitID int,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@VisitorID int,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@SiteKey smallint,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@PageName varchar(250),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@PageDate datetime,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@PageNumber smallint,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@ContentGroup varchar(50),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@HTTPStatus smallint,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@HTTPSubStatus smallint,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@CachedPageHeaderID int,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@PageHeaderID int OUTPUT,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@LastModifiedDate datetime OUTPUT,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@LastCheckedDate datetime OUTPUT,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@TitleTag varchar(250) OUTPUT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;AS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET NOCOUNT ON;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;DECLARE @cgroup varchar(50)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;DECLARE @orderref varchar(50)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;IF CHARINDEX('thankyou.aspx',@PageName) &gt; 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;DECLARE @ia INT;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;DECLARE @iaa INT;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @ia = CHARINDEX('OrderID', @PageName);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @ia = CHARINDEX('=',@PageName, @ia);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @iaa = CHARINDEX('&amp;amp;',@PageName, @ia);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;if @iaa = 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @iaa = LEN(@PageName);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @orderref = SUBSTRING(@PageName,@ia+1, @iaa-@ia);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;INSERT INTO dbo.VisitFormVars (VisitID, SiteKey, VarForm, VarName, VarData, VarTime)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;VALUES (@VisitID, @SiteKey, 'Order', 'OrderNumber', @orderref, GETDATE())&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @PageName = 'thankyou.aspx';&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @CachedPageHeaderID = 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;IF @CachedPageHeaderID = 0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SELECT @PageHeaderID = PageHeaderID,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@LastCheckedDate = LastChecked,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@LastModifiedDate = LastModified,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@TitleTag = TitleTag,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@cgroup = ContentGroup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;FROM PageHeader&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;WHERE SiteKey = @SiteKey AND Page = @PageName&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;IF @PageHeaderID IS NULL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;INSERT INTO PageHeader (&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;Page,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;ContentGroup, LastModified,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;LastChecked, SiteKey, TitleTag)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt; VALUES&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;(@PageName, @ContentGroup, '2000-01-01 00:00:00','2000-01-01 00:00:00', @SiteKey, '');&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @LastCheckedDate = '2000-01-01 00:00:00';&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @LastModifiedDate = '2000-01-01 00:00:00';&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @TitleTag = '';&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @PageHeaderID = SCOPE_IDENTITY()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;ELSE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;BEGIN&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;IF NOT @cgroup = @ContentGroup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;UPDATE PageHeader SET ContentGroup = @ContentGroup&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;WHERE PageHeaderID = @PageHeaderID;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;ELSE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;SET @PageHeaderID = @CachedPageHeaderID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;INSERT INTO PageViews&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;(VisitID, PageID, VisitorID, SiteKey, PageDate, PageNumber,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;HTTPStatus, HTTPSubStatus)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;VALUES&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;(@VisitID, @PageHeaderID, @VisitorID, @SiteKey, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;@PageDate, @PageNumber, @HTTPStatus, @HTTPSubStatus); &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;END&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-7397914823945576?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/7397914823945576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2010/10/custom-field-filling-in-whoson-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7397914823945576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7397914823945576'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2010/10/custom-field-filling-in-whoson-database.html' title='Custom Field Filling in WhosOn Database'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-7476893769514045383</id><published>2010-10-12T00:32:00.007+01:00</published><updated>2010-10-12T00:54:14.181+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rules'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='prospect detection'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><title type='text'>Set Prospect Client Command</title><content type='html'>&lt;p&gt;I've just completed a test project designed for adding more rules into how WhosOn Live Chat can decide on Prospect Detection. Prospect detection is used for setting up different rules for allocating the quality of visitors, and very commonly as something to send automatic invites based on. The new WhosOn V6 that will be released shortly allows for multiple types of prospect to be defined.&lt;br /&gt;&lt;br /&gt;This uses the new Set Prospect command to insert the prospect into WhosOn and force the actions for that prospect to happen.&lt;br /&gt;&lt;br /&gt;The system connects to a given site using the client protocol, and stores the visitors internally, subscribing to the WhosOn visitor event model (waiting for the @EV and @ER events, and using an internal array to hold the information).&lt;br /&gt;&lt;br /&gt;The detection allows for second level triggering of time on site, time on page, time idle etc, and is easily plugable to allow for expansion of the types of filters that can be used.&lt;br /&gt;&lt;br /&gt;It breaks down the rules into two types of rules - those that require timers, and those that don't.&lt;br /&gt;If the rules don't require timers, then they wait for the events (or the initial visitor list population on connection) and check the rules at this stage.&lt;br /&gt;&lt;br /&gt;For the rules that do require timers, these are executed based on the timer refresh length set in the program, and the number of seconds can be set here.&lt;br /&gt;&lt;br /&gt;The rules are multi-threaded (along with each connection) so the program can deal with many connections for many different rule sets.&lt;br /&gt;&lt;br /&gt;The rule set uses an XML structure for if a rule should be activated, containing the rule type and the login information.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Rules that I have created so far:&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Regular Expression for Current Page, Previous Page, Any Page this Session&lt;/li&gt;&lt;li&gt;Form Variable Check&lt;/li&gt;&lt;li&gt;Number of Seconds on Page&lt;/li&gt;&lt;li&gt;Number of Seconds on Site&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Possible Future updates:&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;More Rules Types&lt;/li&gt;&lt;li&gt;More intelligent timer - don't need to check every X seconds if there are no new visitors. This could be calculated by checking the current timer wait time, and minimum time for the rule, then setting up the internal timers to wait this long.&lt;/li&gt;&lt;li&gt;More Actions (I.E. sending different messages through to the visitors in the invites, or sending messages to the operators about the visitors).&lt;/li&gt;&lt;li&gt;Performance enhancements on the visitors arrays.&lt;/li&gt;&lt;li&gt;Use reflection for loading the types, rather than just doing a case selection on the type name.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;If you are interested in using this sort of rules engine, then please contact our professional services team, and we will endeavour to match up prospecting systems to deal with whatever your requirements for prospecting are.  The link below shows information about our Configuration Professional Services for WhosOn Live Chat.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.whoson.com/professionalconfiguration.aspx"&gt;http://www.whoson.com/professionalconfiguration.aspx&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-7476893769514045383?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/7476893769514045383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2010/10/set-prospect-client-command.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7476893769514045383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7476893769514045383'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2010/10/set-prospect-client-command.html' title='Set Prospect Client Command'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-3352827413119506513</id><published>2010-10-01T21:24:00.004+01:00</published><updated>2010-10-01T21:27:40.040+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data protection'/><category scheme='http://www.blogger.com/atom/ns#' term='database trigger'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><category scheme='http://www.blogger.com/atom/ns#' term='chat'/><title type='text'>WhosOn Database - Preventing Storage of Chat Transcripts</title><content type='html'>Sometimes it is necessary for security or privacy reasons to not store the chat transcript in the database.  In WhosOn this can easily be achieved by adding a new database trigger to the database.&lt;br /&gt;&lt;br /&gt;The following trigger drops the INSERT command if the LineNumber &gt; 1, and for the first line creates an entry to the effect that the transcript is not stored.&lt;br /&gt;&lt;br /&gt;The visitor's session information will still be stored, but this could be prevented with another trigger if required.&lt;br /&gt;&lt;br /&gt;Just run the below code in SQL Management Studio, in a SQL Query window against the WhosOn database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER [dbo].[UserTranscriptStop]&lt;br /&gt;   ON  [dbo].[UserTranscript]&lt;br /&gt;   INSTEAD OF INSERT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;      SET NOCOUNT ON;&lt;br /&gt;&lt;br /&gt;    -- Insert statements for trigger here&lt;br /&gt;    DECLARE @LineNum int&lt;br /&gt;      SELECT @LineNum = LineNumber FROM INSERTED&lt;br /&gt;&lt;br /&gt;      IF @LineNum = 1&lt;br /&gt;            BEGIN&lt;br /&gt;                  INSERT INTO UserTranscript (SiteKey, ChatUID, LineNumber, LineTime, OperatorLine, LineText)&lt;br /&gt;                  SELECT SiteKey, ChatUID, 1, LineTime, OperatorLine, 'Data not stored in database due to DB Settings'&lt;br /&gt;                  FROM INSERTED&lt;br /&gt;            END          &lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-3352827413119506513?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/3352827413119506513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2010/10/whoson-database-preventing-storage-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/3352827413119506513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/3352827413119506513'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2010/10/whoson-database-preventing-storage-of.html' title='WhosOn Database - Preventing Storage of Chat Transcripts'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-5250392192650307370</id><published>2010-07-16T11:12:00.003+01:00</published><updated>2010-07-16T11:19:02.007+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='tracking'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><title type='text'>Tracking Order Numbers Into WhosOn</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to track order numbers, or some other generic field, which you may then want to query from the database, you can use code similar to the below in your page.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This executes the standard form code, which is set up to store and show inside WhosOn already.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;script type='text/javascript' src='http://gateway.yourserver.com/include.js?domain=www.yourdomain.com'&amp;gt;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;script type='text/javascript' &amp;gt;&lt;/div&gt;&lt;div&gt;sWOImageLoaded = function () {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;var imOrder = document.createElement('IMG');&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;imOrder.src = sWOProtocol+"//"+sWOGateway+"/form.gif?d="+sWODomain+"&amp;amp;u="+sWOSession+"&amp;amp;frm=Order&amp;amp;frn=OrderID&amp;amp;frd=WOTEST";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;document.body.appendChild(imOrder);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;if(typeof sWOTrackPage=='function')sWOTrackPage();&lt;/div&gt;&lt;div&gt;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-Times New Roman&amp;quot;;mso-bidi-theme-font:minor-bidi;color:#1F497D;mso-themefont-family:&amp;quot;;font-size:11.0pt;color:dark2;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-5250392192650307370?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/5250392192650307370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2010/07/tracking-order-numbers-into-whoson.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/5250392192650307370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/5250392192650307370'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2010/07/tracking-order-numbers-into-whoson.html' title='Tracking Order Numbers Into WhosOn'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-7301643180256185231</id><published>2010-02-19T21:46:00.003Z</published><updated>2010-02-19T21:50:00.401Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP Polling Duplex'/><title type='text'>WCF and Silverlight development – impressions and usage.</title><content type='html'>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;We’ve recently developed a Silverlight based client, and I worked on the backend code for communication between the Silverlight client and the WhosOn server.  WhosOn’s general encryption is Public / Private Key to obtain a Session Key, then AES 256 using this session key for normal data.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;Silverlight doesn’t currently have support for these areas of the .NET framework, so we were left with 3 choices:&lt;/span&gt;&lt;/p&gt;&lt;p style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1" class="MsoListParagraph"&gt;&lt;span style="mso-fareast-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="font-family:Calibri;"&gt;1.&lt;/span&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;TCP + Plain Text&lt;/span&gt;&lt;/p&gt;&lt;p style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1" class="MsoListParagraph"&gt;&lt;span style="mso-fareast-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="font-family:Calibri;"&gt;2.&lt;/span&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;TCP + Alternative Encryption&lt;/span&gt;&lt;/p&gt;&lt;p style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1" class="MsoListParagraph"&gt;&lt;span style="mso-fareast-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="font-family:Calibri;"&gt;3.&lt;/span&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;Proxied Connection&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;Using the proxied connection had the advantage of being able to use a more ubiquitous transport, so that we could go through client side proxy servers and avoid other issues with firewalls blocking the non-standard ports.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;TCP + Plain Text was ignored due to insecurity, and TCP + Alternative Encryption was discounted due to the lack of any high security protocols in Silverlight.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;Next, we had to decide how to write our proxy server.  We already have a .NET based class library for connecting to the server, so .NET was the first approach.  We looked at creating our own HTTP handling service, or running something through the existing WhosOn Gateway Service which handles simple HTTP requests.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;I discovered that WCF had the ability to run through IIS and provide secure connections.  Investigating further, I found that you could have an asynchronous subscribe / publish mode as described by Tomasz Janczuk in his blog:  &lt;/span&gt;&lt;a href="http://tomasz.janczuk.org/2009/07/pubsub-sample-using-http-polling-duplex.html"&gt;&lt;span style="font-family:Calibri;"&gt;http://tomasz.janczuk.org/2009/07/pubsub-sample-using-http-polling-duplex.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:Calibri;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;Having looked through his code, and developed our own Subscriber style interface (although at the moment it is the equivalent of each subscriber subscribing to a single topic), we got to our current Silverlight client communication library.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;The web services can technically be used by other SOAP supporting clients, and we will be looking at pushing out examples using these.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;We ran into a few issues which we haven’t figured out as yet – we’ve had trouble doing an automatic deployment (including installing .net 3.5, registering WCF against IIS, and setting up the application pool), and also the difficulty in allowing the same path to run both secure and insecure versions of the customBinding at the same time.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="font-family:Calibri;"&gt;To have a look at our documentation on it, please see &lt;/span&gt;&lt;a href="http://www.whoson.com/help/Content/SilverlightClient.htm"&gt;&lt;span style="font-family:Calibri;"&gt;http://www.whoson.com/help/Content/SilverlightClient.htm&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:Calibri;"&gt; which includes the installation steps.&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;span style="font-family:Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-7301643180256185231?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/7301643180256185231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2010/02/wcf-and-silverlight-development.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7301643180256185231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/7301643180256185231'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2010/02/wcf-and-silverlight-development.html' title='WCF and Silverlight development – impressions and usage.'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-8472365165968381068</id><published>2009-07-16T12:32:00.010+01:00</published><updated>2010-04-13T14:12:41.609+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sitepal'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><category scheme='http://www.blogger.com/atom/ns#' term='chat'/><title type='text'>Using SitePal for the WhosOn Chat Operator Status</title><content type='html'>I've had a few requests recently to show a SitePal rep when you are available to talk.  You can do this with some custom javascript code.  An extension to this is to make it so that if the SitePal is clicked, it opens the chat window.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will have your standard embed code from SitePal - this will look like:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;script language="JavaScript" type="text/javascript" src="http://vhss-d.oddcast.com/vhost_embed_functions_v2.php?acc=100000&amp;amp;js=1"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script language="JavaScript" type="text/javascript"&amp;gt;AC_VHost_Embed(100000,300,400,'',1,1, 100000, 0,1,0,'aaaaaaaaaaaaaaaaaaaaa',9);&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is made up of two components - the loading of the javascript from the site, and the call to create the window.  We want to create this window when the operator status is online.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will also have your WhosOn code, which will look like this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;!-- Embedded WhosOn: Insert the script below at the point on your page where you want the Click To Chat link to appear --&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='http://yourwhosongateway.com/include.js?domain=www.domain.com'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript' &amp;gt;&lt;br /&gt;if(typeof sWOTrackPage=='function')sWOTrackPage();&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;!-- End of embedded WhosOn --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To prepare in your WhosOn, first upload your normal online and offline images into your website - these will no longer be used directly in WhosOn.&lt;br /&gt;&lt;br /&gt;In your site properties -&gt; Visitor Chat -&gt; Display Nothing When Off Line&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_smgv8xyC7YM/Sl8VxfgAUBI/AAAAAAAAAAw/49HQeNlTjZ0/s1600-h/show-nothing.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 226px;" src="http://3.bp.blogspot.com/_smgv8xyC7YM/Sl8VxfgAUBI/AAAAAAAAAAw/49HQeNlTjZ0/s320/show-nothing.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359026021607690258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This will mean that the WhosOn code will return a 1x1 pixel when offline, and we can test for this in the javascript.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We leave the first line of WhosOn code in place:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;!-- Embedded WhosOn: Insert the script below at the point on your page where you want the Click To Chat link to appear --&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='http://yourwhosongateway.com/include.js?domain=www.domain.com'&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;but we are going to override some of the other things - this is the standard custom code for execution / override of what happens when the status is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;script&amp;gt;&lt;br /&gt;function overrideLoad()&lt;br /&gt;{&lt;br /&gt;if (sWOImage.width == 1)&lt;br /&gt;{&lt;br /&gt;// show offline image&lt;br /&gt;var sWOOffline = document.createElement('img');&lt;br /&gt;sWOOffline.src = "/images/offline.gif";&lt;br /&gt;sWOChatElement.appendChild(sWOOffline);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;var sWOOnline = document.createElement('img');&lt;br /&gt;sWOOnline.src = "/images/online.gif";&lt;br /&gt;sWOChatElement.appendChild(sWOOnline);sWOChatElement.onclick=sWOStartChat;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(typeof sWOTrackPage=='function')&lt;br /&gt;{&lt;br /&gt;sWOImageLoaded=overrideLoad;&lt;br /&gt;sWOTrackPage();&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we need to add in the call to the SitePal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The complete code will look like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;script language="JavaScript" type="text/javascript" src="http://vhss-d.oddcast.com/vhost_embed_functions_v2.php?acc=100000&amp;amp;js=1"&gt;&lt;br /&gt;&amp;lt;!-- Embedded WhosOn: Insert the script below at the point on your page where you want the Click To Chat link to appear --&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='http://yourwhosongateway.com/include.js?domain=www.domain.com'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;function overrideLoad()&lt;br /&gt;{&lt;br /&gt;if (sWOImage.width == 1)&lt;br /&gt;{&lt;br /&gt;// show offline image&lt;br /&gt;var sWOOffline = document.createElement('img');&lt;br /&gt;sWOOffline.src = "/images/offline.gif";&lt;br /&gt;sWOChatElement.appendChild(sWOOffline);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;AC_VHost_Embed(100000,300,400,'',1,1, 100000, 0,1,0,'aaaaaaaaaaaaaaaaaaaaa',9);&lt;br /&gt;var sWOOnline = document.createElement('img');&lt;br /&gt;sWOOnline.src = "/images/online.gif";&lt;br /&gt;sWOChatElement.appendChild(sWOOnline);sWOChatElement.onclick=sWOStartChat;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if(typeof sWOTrackPage=='function')&lt;br /&gt;{&lt;br /&gt;sWOImageLoaded=overrideLoad;&lt;br /&gt;sWOTrackPage();&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can see that we have called the AC_VHost_Embed function as part of the online status call.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This will mean that your SitePal will show, and it will normally say something like "click below to chat to us" or "click the 'online' link on the right to chat to us"&lt;br /&gt;&lt;br /&gt;You can also get the scene to directly send someone to the chat when it is clicked on.&lt;br /&gt;First, we need to generate the click link in WhosOn - go to site properties -&gt; visitor chat -&gt; manual links, and you will get a cut &amp;amp; paste link like:&lt;br /&gt;&lt;br /&gt;&amp;lt;a href="https://chatserver.whoson.com/chat/chatstart.htm?domain=www.domain.com" onclick="javascript:window.open('https://chatserver.whoson.com/chat/chatstart.htm?domain=www.domain.com','wochat','width=484,height=361');return false;"&amp;gt;Click To Chat&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You only need the href part of this:&lt;br /&gt;https://chatserver.whoson.com/chat/chatstart.htm?domain=www.domain.com&lt;br /&gt;&lt;br /&gt;Then, when you are creating the scene in SitePal, if you go to the Scene Options, then put the href part of the link into the URL: box.&lt;br /&gt;&lt;br /&gt;Then you need to check "clicking on the scene opens the link", and the "open in new window" option.   Now when someone clicks on your new SitePal scene, it will open up the WhosOn chat window.&lt;br /&gt;&lt;br /&gt;You can see the areas for this in the &lt;a href="http://vhost.oddcast.com/support/docs/SitePal_UsersGuide.pdf"&gt;SitePal User Guide&lt;/a&gt;, section 2.5&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-8472365165968381068?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/8472365165968381068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2009/07/using-sitepal-for-operator-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/8472365165968381068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/8472365165968381068'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2009/07/using-sitepal-for-operator-status.html' title='Using SitePal for the WhosOn Chat Operator Status'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_smgv8xyC7YM/Sl8VxfgAUBI/AAAAAAAAAAw/49HQeNlTjZ0/s72-c/show-nothing.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-206690719318993739</id><published>2009-04-17T10:27:00.006+01:00</published><updated>2009-04-17T11:24:22.823+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='track'/><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><category scheme='http://www.blogger.com/atom/ns#' term='blog tracking'/><title type='text'>Using WhosOn in your Blogspot Blog.</title><content type='html'>I've decided to add tracking &amp; chat to my blog here, partially as an excercise in how to do it and also for vanity purposes... although the small number of human visitors is always a disappointment! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the WhosOn client, generate the tracking code. It will look like this: &lt;br /&gt;&lt;br /&gt;&amp;lt;script type='text/javascript' src='http://{your-gateway}/include.js?domain={your-domain}'&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script type='text/javascript' &amp;gt;if(typeof sWOTrackPage=='function')sWOTrackPage();&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add an HTML/Javascript Gadget to the bottom of your blog Layout, and paste this code into it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then, you can add another Gadget to show the chat link - I put a new HTML/Javascript Gadget on the left hand side, and put in:&lt;br /&gt;&lt;br /&gt;&amp;lt;a id='whoson_chat_link'&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The WhosOn code dynamically replaces this link with the correct image (online / offline).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you only want to track, then you can generate the tracking only code through the client - you don't need to put the anchor in the left if you do this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-206690719318993739?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/206690719318993739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2009/04/using-whoson-in-your-blogspot-blog.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/206690719318993739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/206690719318993739'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2009/04/using-whoson-in-your-blogspot-blog.html' title='Using WhosOn in your Blogspot Blog.'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7375674697305315111.post-4474958664312180015</id><published>2009-04-15T17:51:00.003+01:00</published><updated>2009-04-16T00:38:48.911+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whoson'/><category scheme='http://www.blogger.com/atom/ns#' term='chat'/><category scheme='http://www.blogger.com/atom/ns#' term='survey'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>WhosOn V5 - Scripts</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;WhosOn Version 5 (&lt;a href="http://www.whoson.com/v5whatsnew.aspx"&gt;http://www.whoson.com/v5whatsnew.aspx&lt;/a&gt;) has some great new features for users who want more advanced chat distribution among their agents.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We've used a VBScript compatible engine, which allows the script to access the data about the visitor (IP, Geo-Location, #Visits etc) and any pre-chat survey information that has been filled in, and use this to route the chat to the correct operator, send some automatic text, or cancel / block the chatter.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This means dynamic rules can be used to find existing customers, and pass through to the right sales person based on a database query, or just get the lead to the correct person immediately, rather than having to do a manual transfer after the event.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm working with some of our customers to provide the custom logic for what they need - here is the first example I have worked on:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Sub Main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    ' commands start here&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    CancelChatRequest = False&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Dim ticket As String&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Dim tr As String&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Dim p As Integer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    tr = ThisChatSession.PreChatSurvey&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    p = InStr(1, LCase(tr), "&lt;name&gt;ticket&lt;/name&gt;")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    If p &gt; 0 Then&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        p = InStr(p, tr, "&lt;value&gt;") + 7&lt;/value&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        ticket = Left(Mid(tr, p), InStr(p, tr, "") - p)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        AddToLog("Ticket: "  &amp;amp; ticket)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Dim conn As New ADODB.Connection&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Dim adors As New ADODB.Recordset&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        conn.ConnectionString = "DSN=Tickets;"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        conn.Open&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Set adors.ActiveConnection = conn&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        With adors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;            .Open("SELECT * FROM Tickets WHERE TicketNo = '" &amp;amp; ticket &amp;amp; "'")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;            If Not .EOF Then&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                Dim op As String&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                op = LCase(.Fields("Operator"))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                ' check if operator is online&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                For p = 0 To OperatorsConnectedCount - 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                    If op = LCase(Operator(p).Name) And Operator(p).CurrentStatus &lt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                        ' if operator is online or busy, send this chat to them&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                        SendChatRequestToOperators = op&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                        SendMessageToVisitor = "You are being connected to the assigned user for this issue - " &amp;amp; op&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                        AddToLog("Script: Operator for issue online: " &amp;amp; op)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                        p = OperatorsConnectedCount&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                    End If&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                Next p&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                If Not Len(SendChatRequestToOperators) &gt; 0 Then&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                    SendMessageToVisitor = "The operator (" &amp;amp; op &amp;amp; ") assigned to this issue is not online - transfering to Support"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                    AddToLog("Script: Operator for issue not online: " &amp;amp; op)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                    SendChatRequestToDepartments = "Support"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                End If&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;            Else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                SendMessageToVisitor = "The ticket number was not found - transfering to Support"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                AddToLog("Script: The ticket number was not found")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                SendChatRequestToDepartments = "Support"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;            End If&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;            .Close&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        End With&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Set adors = Nothing&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        conn.Close&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Set conn = Nothing&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        SendChatRequestToDepartments = "Support"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    End If&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7375674697305315111-4474958664312180015?l=parkersoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://parkersoft.blogspot.com/feeds/4474958664312180015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://parkersoft.blogspot.com/2009/04/whoson-v5-scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/4474958664312180015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7375674697305315111/posts/default/4474958664312180015'/><link rel='alternate' type='text/html' href='http://parkersoft.blogspot.com/2009/04/whoson-v5-scripts.html' title='WhosOn V5 - Scripts'/><author><name>Daniel Tallentire</name><uri>http://www.blogger.com/profile/11106438195810866791</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_smgv8xyC7YM/Sehel4LsZuI/AAAAAAAAAAM/OcOp2vOFCRY/S220/Daniel_Tallentire_Parker_Software_Ltd_verysmall.jpg'/></author><thr:total>0</thr:total></entry></feed>
