How to Access Smart Assist Session ID - SmartAssist

This article explains how to access the session ID in for both chat and call interactions.

Chat Interactions:
For chat interactions, the session ID can be retrieved directly from the context object using the following JSON path:



Experience flow:

Interaction screenshot:

For call interactions, the context object structure is different, and the session ID cannot be accessed directly.
Here’s what you need to do:

Users will need to use the below setCallFlowVariable utils script so that you can access the context object.

Here’s the script:


var sessionID = getCallFlowVariable('sessionID');
userSessionUtils.put("sessionID", sessionID);

Now we can access the session ID directly from SmartAssist or bot builder (XO).

To access the session ID from the SmartAssist message node use the below code in the message node.

below is the working sample of accessing the session ID in the call.

Content by @praveen.adari

You told only about SmartAssist. HOw to access the same session id in XO? (XO 11)