Hi all,
I’m calling a bot from SmartAssist. The bot sets some values in BotUserSession.
Now I want SmartAssist to branch conditionally based on the values the bot set. Is there a way to read them in SmartAssist?
Hi all,
I’m calling a bot from SmartAssist. The bot sets some values in BotUserSession.
Now I want SmartAssist to branch conditionally based on the values the bot set. Is there a way to read them in SmartAssist?
Hi @eeskildsen,
You can read BotUserSession values in SmartAssist Experience Flow. Here’s some sample code showing this:
setCallFlowVariable('caller', context.BotUserSession.channels[0].handle.Caller);
var caller = getCallFlowVariable('caller');
Thanks,
Ashish
Thanks @ashish.sankhala!
Is this documented anywhere? There are 0 search results for BotUserSession
at https://docs.kore.ai/smartassist/. Want to make sure I’m looking in the right place…
You are looking at the right place. We are working on getting this and other related documentation uploaded
@ashish.sankhala, this isn’t working for me…What am I doing wrong?
BotUserSession.put('favoriteKoreEmployee', 'Ashish Sankhala');
context.favoriteKoreEmployee = context.BotUserSession.get('favoriteKoreEmployee');
context.favoriteKoreEmployee
is set to Ashish Sankhala
in SmartAssist.
SmartAssist says:
We’re having trouble processing your request. Please call us after some time.
Then the call ends.
Hi Erik,
I believe you should go through this link to get a high level understanding of how SmartAssist integrates with the XO platform - Introduction to SmartAssist – SmartAssist. This might help as a starting point.
Coming to your exact use case, it appears you are trying to pass a value from your BotUserSession to use within the Experience Flow.
You will need to
Sample Usage cbCtx = getChildBotContextById("st-123bd11e-247e-58ec-bfe4-81e0f8b3e0fc”)
You can get your bot’s ID by navigating to Bot → Build → Configuration → General Settings
cbCtx.session.BotUserSession.favoriteKoreEmployee
Hope this helps (and works!)
Thanks,
FavoriteKoreEmployee
@ashish.sankhala Very cool! I feel like I’m learning the secrets of the sages here. Thanks, I’ll give it a try.
Hello @ashish.sankhala
how can i use context in smartAssist i want to try to use split condition if i use (session.BotUserSession.LanguageP) how can i get the value of this context in smart Assist
Best Regards
from where you find it i want dialed number