Forum Discussion
AzureHealthBot365
Sep 03, 2019Copper Contributor
How to retrieve the Object inside Watch window?
Hi, I'm working on a Healthcare project using Healthcare Bot. I'm following this Github repo: https://github.com/Microsoft/HealthBotContainerSample/
and set it up successfully. Currently, I'm able to retrieve activities using the code:
botConnection.activity$
.filter(function (activity) {return activity.type === "event" && activity.name === "shareLocation"})
.subscribe(function (activity) {sendUserLocation(botConnection, user)});
But not sure how to retrieve the Object from Watch window (see the screenshot), is there any API available for it?
- Adam Walker
Microsoft
Hi,
Thanks for asking.
To access the location you need to set a query parameter in the URL of the WebChat application.
Add "?shareLocation=true" to the webchat. You will then be able to access location in the conversation.initConversationEvent object in the watch.
Let us know if you require additional support.
Adam
- AzureHealthBot365Copper ContributorHi Adam,
Thanks for the reply, besides the location, how to access the Object inside Watch window, especially the scenarioStack property and _triage property (in this case) which has intent and its corresponding score.- Adam Walker
Microsoft
Hi, you can access the triage property using "Scenario variables". You can find more information in the following article: https://docs.microsoft.com/en-us/healthbot/scenario-authoring/instance-variables
The scenario stack property can't be accessed directly.
Regards, Adam