Enabling Custom Login for Chat

By default, when a visitor logs on to Chat, the visitor is resolved to a Contact based on the email address provided by the visitor. If you set the value of the global option Enable creation of multiple Contacts with the same email address to Yes, the visitor (Contact) is resolved to a Contact if a duplicate check Configuration is created in the Data Management Utility.

To Enable This Functionality

1.  Configure the Chat login page.

2.  Customize the StartChat.asp file.

To Configure the Chat Login Page

By default, when a visitor logs on to Chat, the Name and Email ID specified by the visitor in the Chat Login page are used to resolve the Contact in CampusNexus CRM. To be able to capture the values of the Properties that are configured in the duplicate check Configuration, you must add these Properties to the Chat login page.

Contact Resolution

In reactive chat, when a visitor initiates a chat request, a duplicate check is performed to verify whether the visitor is already a Contact in CampusNexus CRM. If the visitor is an existing Contact, the visitor is resolved to a matching Contact. Otherwise, a new Contact is created when the user ends the chat session.

In proactive chat, when a visitor accepts a user's chat request, a duplicate check is performed to verify whether the visitor is already an existing Contact.

Contact resolution is performed in the following order:

1.  By specifying custom duplicate check logic for the Contact object based on customer requirements. To enable this functionality, the sproc_CustomDuplicateCheck_ForChat stored procedure is provided.

2.  By using duplicate check configurations defined for the Contact object in the Data Management Utility.

3.  By using the email ID of the visitor.

Configuring Custom Duplicate Check on the Contact Object

You can customize the process of resolving a Contact based on any Contact property. Perform the following steps on the computer where the Chat Server is installed:

1.  Navigate to the following path: <Drive name>:\Program Files\Web Components\Media\WebTrak

2.  Open the ChatSamples.htm file in edit mode.

3.  Add the following code inside the <form> tag:

<form> <input type="hidden" id = "PropertyStr" name="PropertyStr" value="" /> </form>

4.  Open the TreatCode.js file in edit mode and add the following code in the OpenChat(proactive) function:

var PropertyStr = document.getElementById("PropertyStr"); PropertyStr.value = "79=" + document.getElementById("Phone").value + "±";

where, 79 is the Contact Property ID for the Phone Property. Phone is the Property on which Contacts are resolved.

5.  Execute the sproc_CustomDuplicateCheck_ForChat stored procedure on the computer where Main database is installed.