- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2022 03:51 AM
Hi,
I'm making a POST request to my VA API with the following payload:
{
requestId: uuidv4(),
enterpriseId: 'ServiceNow',
clientSessionId: conversationId,
message: {
text: message,
typed: true,
},
userId: context.activity.from.id,
timestamp: dayjs().unix(),
timezone: context.activity.localTimezone,
token: this.config.API_TOKEN,
contextVariables: {
name: "John"
}
};
The issue I'm facing is that I'm unsure how to extract the "name" context variable inside a topic flow.
I've tried creating a "name" context variable through the chat setup menu, added it to the topic flows active Live Agent Variables, but still get nothing.
Any help would be much appreciated.
Solved! Go to Solution.
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 07:16 PM
Have you tried accessing the context variable in a conversation script via vaContext.name?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 07:16 PM
Have you tried accessing the context variable in a conversation script via vaContext.name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 01:56 AM
You are correct, I'm able to access the passed context variables through vaContext, but I'm only able to achieve this when starting a conversation, with the "action: START_CONVERSATION" variable in the payload. If i try to pass context variables to an ongoing conversation it doesn't seem to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 05:44 PM
Hi @Tomas Stravinsk, I'm having the same issue. Were you able to make it work for ongoing conversation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:45 AM
Hi Victor,
Similarly if I am sending "clientVariables" in the JSON as:
{
requestId: uuidv4(),
enterpriseId: 'ServiceNow',
clientSessionId: conversationId,
message: {
text: message,
typed: true,
},
userId: context.activity.from.id,
timestamp: dayjs().unix(),
timezone: context.activity.localTimezone,
token: this.config.API_TOKEN,
clientVariables: {
name: "John"
}
};
How do I access the "clientVariables" field in the topic flow?