Initialization
The standard initialization script for your web chatbot can be copied directly from the "How To Embed" tab inside the Web Channel publishing dialog. The script is already configured for your chatbot and will look like this one below:
This is the barebone initialization process: all the configuration will be read from your publish settings and nothing else is needed.
Advanced Initialization
The following sections will show how you can go much further with Xenioo initialization to significantly manipulate how the chatbot is initialized and settings are used.
Changing initialization settings
The initialization call can be modified to supply one or more initialization parameter that will override the settings you've specified in the Web Publishing Dialog. As an example, you could change the chatbot widget appearance delay like this:
The above script will make the chat widget appear after 5 seconds. This parameter will automatically override the delay parameter you've specified in the Web Publishing Dialog settings.
You can of course add multiple settings like in the script below:
Use the table below as a general reference for all the initialization parameters you can override:
Initializing with Variables and Tags
Different pages on your website may need different variables or tags to be supplied to your chatbot. As an example, you could have your chatbot receive specific campaign parameters so that it can track users coming from specific ad. To do so, you supply variables or tags directly inside the initialization script. In the following example, we're sending the variable test:
In a very similar way, you can supply one or more tags:
Both variables and tags will be made available to your chatbot from the very start and can be used immediately in your flow.
Starting from a specific behavior
If you want your chatbot to start from a specific behavior you can set the corresponding API token directly in the initialization script:
This setting will override the default start behavior and change the default flow. This setting is particularly useful if you have multiple pages on your website and want your chatbot to start addressing the user differently depending on the location.
Last updated