Wednesday, 13 October 2010
Custom Field Filling in WhosOn Database
Tuesday, 12 October 2010
Set Prospect Client Command
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.
This uses the new Set Prospect command to insert the prospect into WhosOn and force the actions for that prospect to happen.
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).
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.
It breaks down the rules into two types of rules - those that require timers, and those that don't.
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.
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.
The rules are multi-threaded (along with each connection) so the program can deal with many connections for many different rule sets.
The rule set uses an XML structure for if a rule should be activated, containing the rule type and the login information.
Rules that I have created so far:
- Regular Expression for Current Page, Previous Page, Any Page this Session
- Form Variable Check
- Number of Seconds on Page
- Number of Seconds on Site
Possible Future updates:
- More Rules Types
- 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.
- More Actions (I.E. sending different messages through to the visitors in the invites, or sending messages to the operators about the visitors).
- Performance enhancements on the visitors arrays.
- Use reflection for loading the types, rather than just doing a case selection on the type name.
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.
Friday, 1 October 2010
WhosOn Database - Preventing Storage of Chat Transcripts
The following trigger drops the INSERT command if the LineNumber > 1, and for the first line creates an entry to the effect that the transcript is not stored.
The visitor's session information will still be stored, but this could be prevented with another trigger if required.
Just run the below code in SQL Management Studio, in a SQL Query window against the WhosOn database.
CREATE TRIGGER [dbo].[UserTranscriptStop]
ON [dbo].[UserTranscript]
INSTEAD OF INSERT
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for trigger here
DECLARE @LineNum int
SELECT @LineNum = LineNumber FROM INSERTED
IF @LineNum = 1
BEGIN
INSERT INTO UserTranscript (SiteKey, ChatUID, LineNumber, LineTime, OperatorLine, LineText)
SELECT SiteKey, ChatUID, 1, LineTime, OperatorLine, 'Data not stored in database due to DB Settings'
FROM INSERTED
END
END
Friday, 16 July 2010
Tracking Order Numbers Into WhosOn
Friday, 19 February 2010
WCF and Silverlight development – impressions and usage.
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.
Silverlight doesn’t currently have support for these areas of the .NET framework, so we were left with 3 choices:
1. TCP + Plain Text
2. TCP + Alternative Encryption
3. Proxied Connection
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.
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.
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.
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: http://tomasz.janczuk.org/2009/07/pubsub-sample-using-http-polling-duplex.html
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.
The web services can technically be used by other SOAP supporting clients, and we will be looking at pushing out examples using these.
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.
To have a look at our documentation on it, please see http://www.whoson.com/help/Content/SilverlightClient.htm which includes the installation steps.