WhosOn Version 5 (http://www.whoson.com/v5whatsnew.aspx) has some great new features for users who want more advanced chat distribution among their agents.
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.
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.
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:
Sub Main()
' commands start here
CancelChatRequest = False
Dim ticket As String
Dim tr As String
Dim p As Integer
tr = ThisChatSession.PreChatSurvey
p = InStr(1, LCase(tr), "ticket ")
If p > 0 Then
p = InStr(p, tr, "") + 7
ticket = Left(Mid(tr, p), InStr(p, tr, "") - p)
AddToLog("Ticket: " & ticket)
Dim conn As New ADODB.Connection
Dim adors As New ADODB.Recordset
conn.ConnectionString = "DSN=Tickets;"
conn.Open
Set adors.ActiveConnection = conn
With adors
.Open("SELECT * FROM Tickets WHERE TicketNo = '" & ticket & "'")
If Not .EOF Then
Dim op As String
op = LCase(.Fields("Operator"))
' check if operator is online
For p = 0 To OperatorsConnectedCount - 1
If op = LCase(Operator(p).Name) And Operator(p).CurrentStatus <>
' if operator is online or busy, send this chat to them
SendChatRequestToOperators = op
SendMessageToVisitor = "You are being connected to the assigned user for this issue - " & op
AddToLog("Script: Operator for issue online: " & op)
p = OperatorsConnectedCount
End If
Next p
If Not Len(SendChatRequestToOperators) > 0 Then
SendMessageToVisitor = "The operator (" & op & ") assigned to this issue is not online - transfering to Support"
AddToLog("Script: Operator for issue not online: " & op)
SendChatRequestToDepartments = "Support"
End If
Else
SendMessageToVisitor = "The ticket number was not found - transfering to Support"
AddToLog("Script: The ticket number was not found")
SendChatRequestToDepartments = "Support"
End If
.Close
End With
Set adors = Nothing
conn.Close
Set conn = Nothing
Else
SendChatRequestToDepartments = "Support"
End If
End Sub
No comments:
Post a Comment