Context Variables and switchTopic()

Raj64
Tera Guru

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?

2 REPLIES 2

Logan Poynter
Mega Sage
Mega Sage

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 

Hi Logan,

 

My terminology is incorrect. The variable is not null. I can't see the variable in the JSON object at all.