How to pass topic to interaction record

Ritika Saran4
Kilo Contributor

Hi All,

I have a requirement to pass the current topic from my topic to interaction record. How can we achieve it ? I can see a context hr_topic_id [LiveAgent_hr_topic_id] created. Can I use this in some way ?

 

Thanks in advance.

 

@Ankur Bawiskar 

@Mark Roethof 

 

Please assist

2 REPLIES 2

Chris D
Kilo Sage
Kilo Sage

You can get the current interaction from vaVars._interaction_record_sysid:

vaVars._interaction_record_sysidProvides the Sys ID of the Interaction which is created automatically and associated with the chat.
Example output: "3127a4802f90a050b0c2d5ea2799b690" 

 

And then you should be able to get the current topic from vaVars._topic_current:

vaVars._topic_currentSame as vaVars._topic_results. Provides details of the current Topic the conversation is in, in JSON format. Details like the Sys ID of the current Topic, Sys ID of the Conversation Task, name of the current Topic.
Example output: "{"sys_id":"5e85248c2f50a050b0c2d5ea2799b6b4", "task":"f327e4802f90a050b0c2d5ea2799b63d", "entities":null, "modelId":null, "name":"Test Topic", "prediction":null, "title":"Test Topic", "type":"normal", "utterance":"test topic"}" 

That's taken from 50+ (Un)documented Virtual Agent variables (vaInputs, vaVars, vaContext, vaSystem) - Virtual Agent, ...

Hi Chris,

Thanks for your reply. Though I already found a way to pass the topic sys_id to interaction record.

 

  1. Included the Liveagent_hr_topic_id in my topic properties.
  2. It will automatically set the value in context record as the sys_id of the topic.

 

However, thanks for sharing vaVars._interaction_record_sysid to get the interaction record sys_id . I would need it for future topics creation.