How to pass topic to interaction record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 10:44 PM
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.
Please assist
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 05:57 AM
You can get the current interaction from vaVars._interaction_record_sysid:
vaVars._interaction_record_sysid | Provides 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_current | Same 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, ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 06:38 AM
Hi Chris,
Thanks for your reply. Though I already found a way to pass the topic sys_id to interaction record.
- Included the Liveagent_hr_topic_id in my topic properties.
- 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.