Forum Discussion

AzureHealthBot365's avatar
AzureHealthBot365
Copper Contributor
Sep 03, 2019

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?

 

 

  • AzureHealthBot365 

     

    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

Resources