Skip to main content

Webview

Use this module to load and interact with any website within your widget area.

Basic setup

  1. Add website URL in URL field.
  2. Select the size of webview window:
    1. Full - 100% height of your widget
    2. Tall - 50%
    3. Small - 25%

Result handler

Send users different content in your dialogue, based on their actions on the external website (in webview module).

tip

How does it work Here is an example - The user is browsing your webview in the widget. He is filling out the contact form, but he either decides to:

  1. Cancel the form
  2. or Submit the form

Based on his action (1. and 2.), the website can send Javascript to call scena.ai or redirect the user to a special URL. Once the user triggers the action (JS call or URL), the webview is closed and he is pushed to another connected module.

Option 1 - Javascript call

Add this JS parameter

  1. Add this JS code to your website element/event, where [handler_name] parameter is the name of your result handler.
  2. Add [handler_name] parameter to button fields in the Webview module.
parent.postMessage("scena:[handler_name]","*");

Option 2 - Transfer user to handler URL

  1. Transfer the webview to our handler URL, where [handler_name] parameter is the name of your result handler.
  2. Add [handler_name] parameter to button fields in the Webview module (see image below).

Handler URL: https://widget.scena.ai/webview/?result=[handler_name]