Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Sharath Chandra Gavini
    Webviews in Oracle Digital AssistantAnswered
    Topic posted January 3, 2019 by Sharath Chandra GaviniBronze Medal: 1,250+ Points, tagged Bots, Conversational AI, Facebook 
    261 Views, 3 Comments
    Title:
    Webviews in Oracle Digital Assistant
    Summary:
    Can we make the bot aware of the events that happen inside a webview or pass the control from a webview to the bot when the webview is closed?
    Content:

    Hi experts,
    There is a usecase where we would like to send a webview to the user (which is our own page). I wonder if there is any way of getting the data from the webview to the bot and vice-versa and also if there is any way to resume the conversation flow when the user closes the webviews? I am aware that we can use Instant apps for this purpose but can we also do this with our own HTML pages?
    Please advice.
    Thanks,
    Sharath Chandra Gavini.

    Best Comment

    Martin Jarvis

    Sharath,

    Just as with InstantApps you can pass a variable back to the bot when the webview completes. Full documentation and an example is provided in the documentation.

    https://docs.oracle.com/en/cloud/paas/autonomous-digital-assistant-cloud/use-chatbot/built-components-properties-transitions-and-usage.html#GUID-79F93F50-523B-493C-B7AF-073C4E16A895

    Regards

    Martin

    Comment

     

    • Martin Jarvis

      Sharath,

      Just as with InstantApps you can pass a variable back to the bot when the webview completes. Full documentation and an example is provided in the documentation.

      https://docs.oracle.com/en/cloud/paas/autonomous-digital-assistant-cloud/use-chatbot/built-components-properties-transitions-and-usage.html#GUID-79F93F50-523B-493C-B7AF-073C4E16A895

      Regards

      Martin

      • Sharath Chandra Gavini

        Hi Martin, 
        I tried the component but I am unable to understand how the variable can be sent back to the bot. 

        I see a URL to a connector sent to the webview server in the request body when the url is opened from the bot screen. Should I make any POST request to that URL to intimate bot that action is complete? If yes, what parameters should be sent? If no, can you please tell the way to implement this at the server side?

        I am really confused and stuck at this point.

        I even tried to analyse this by invoking an Instant app to see in the browser if the Instant App makes any POST request when the button to 'Return to the bot' is clicked but I ended up finding nothing but minified/encrypted parameters. 
        Regards, 
        Sharath Chandra.

    • Sharath Chandra Gavini

      Hi Martin,

      Thank you so much for a quick reply and taking time to answer this. I think this would help.