Alli User Guide - Resume Conversation Using Conversation Token (Javascript)

You can use the Conversation Token to let the customer resume the conversation at any time. #manual #js #sdk

Alli User Guide - Resume Conversation Using Conversation Token (Javascript)

Sometimes customers need to close the conversation with Alli. For example, for authorization steps for websites, or due to termination of the app, etc. In that case, you can use the Conversation Token to let the customer resume the conversation at any time. Let's check out how.

Retrieving Conversation Token

You can acquire Conversation Token for the current conversation using the Assign Value node. Use generate_token() function and save the value to a variable you want. For a general guide to use functions in the Assign Value node, please see this user guide.

For demonstration, I set the Ask a Question node to show the Token value.
You can see the Conversation Token as above.

Sending the Token

Now send the token value to the desired URL using the Integrate node. Simply set the variable that has the token info as Variables to Send in the node. The actual setting for the node depends on your environment. You can check out the Integration node user guide for your reference.

Resuming Conversation Using the Token

To resume the conversation in Alli SDK, don't use window.Alli.event() to start the conversation but use the format below.

if (window.Alli) {
	window.Alli.__startConversation(
		'CONVERSATION_TOKEN',
		{launcher: false, popupMode: true})
	.then(function(){window.Alli.__sendChat('RESUME_MESSAGE')});
}

The CONVERSATION_TOKEN should be replaced with the actual conversation token, and the RESUME_MESSAGE with the message to send when the conversation is resumed. Please note that the message is considered as sent by the customer and the conversation is loaded in the full window right away, and consider them to design your Alli Skill or to set the window to load Alli properly.

You can check out this user guide to learn more about Javascript SDK integration of Alli. If you have any questions about resuming conversation using the Conversation Token, don't hesitate to contact your account manager. We're here to help!

Learn More About Allganize's Technology