Webview
Use this module to load and interact with any website within your widget area.
Basic setup
- Add website URL in URL field.
- Select the size of webview window:
- Full - 100% height of your widget
- Tall - 50%
- 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:
- Cancel the form
- 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
- Add this JS code to your website element/event, where
[handler_name]
parameter is the name of your result handler. - Add
[handler_name]
parameter to button fields in the Webview module.
parent.postMessage("scena:[handler_name]","*");
Option 2 - Transfer user to handler URL
- Transfer the webview to our handler URL, where
[handler_name]
parameter is the name of your result handler. - Add
[handler_name]
parameter to button fields in the Webview module (see image below).
Handler URL: https://widget.scena.ai/webview/?result=[handler_name]