Context Variables and switchTopic()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 12:02 PM - edited 10-25-2022 12:41 PM
Hello everyone,
I have a topic (let's call it "MyTopic") which prompts a user to specify which help desk they'd like to connect to. It's a promoted topic and they can launch it by clicking on it. Based on their response, it routes them to the appropriate queue (by setting a context variable LiveAgent_abc to a certain value.
This works.
I have another topic which needs to do the same thing as the topic above. This gets called from the "Anything Else" setup topic. Instead of repeating the code, I do a vaSystem.switchTopic("MyTopic"). This doesn't work though. The value of LiveAgent_abc shows as undefined from the queue side.
Any idea why this happens and how to fix it? I've tried converting "MyTopic" to a topic block and not using vaSystem.switchTopic(), but that didn't work either.
In summary:
- called directly (by user clicking on it from a promoted topic): Works
- called from Anything Else: Doesn't work
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 05:25 AM
Hello,
This just sounds like the context variable is not populated when topic switching from your Anything Else topic like it is in MyTopic. Can you see the value of the context variable if you use a conversation script to log vaContext.LiveAgent_abc before switching from Anything Else?
Please mark my answer as correct/helpful if it has helped you.
Thanks,
Logan
--
LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 08:07 AM
Hi Logan,
My terminology is incorrect. The variable is not null. I can't see the variable in the JSON object at all.