Website Advanced
Below is the list of configurations supported while launching the website chatbot
You can add the below line in the script and it will help you launch your bot on your website with a delay you configure here.
setTimeout(function(){ chatWidget.launchBot(); }, 3 * 1000);
(Note: This will add a 3 seconds delay before launching the widget.)
Typically, the launch flow on the Engati Chatbot begins with the Welcome New User or Greet Returning User path. But if you would want the bot to start with a particular path, you can follow the below steps:
launch_flow: “PATH_KEY”
See below for an example to add launch_flow to the script.
{bot_key:“DDDxxxKEY”,bot_name:“SampleBot”,launch_flow:“D8E2CC7E37F04FEB802F45E8F49E4598”, branding_key:“default”}
ii) Website Chatbot using Direct URL
And below on adding it to the direct URL:
launch_flow=PATH_KEY
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/drgdbEKWMfAy2b8iOtqOQ_image.png?format=webp)
To get the path key, Go to Build > Paths and to the specific path that you want to trigger.
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/h8jpMTPA-KBHcWGmy4al4_image.png?format=webp)
Once there click on ‘Edit Path’ from the floating menu and copy the path key from the modal box that shows up.
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/ibSJzMhCuwmYXxbd_Z1pd_image.png?format=webp)
Not every piece of information can be precoded in a bot some data are dynamic and are needed to be passed from the website you are deploying your bot on. Like with configuring the path that you want to start from, you can set attributes both while launching the chatbot widget within your webpage or as a direct URL.
1. Chatbot Widget invoked using Script
You can set attributes from the script itself and configure its value as static data or dynamic (using a javascript variable in place of the value).
Note: This attribute can be a new attribute or an existing attribute on the bot.
While invoking the Chatbot widget using the Javascript on the webpage, use the format below.
"user_attributes":[{"name":"Fruitname","value":"Apple"},{"name":"Carname","value":"Ford"}]
Example
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/tnakWY3bcrIhZfe7SZOfO_screenshot-2023-03-27-at-74245-pm.png?format=webp)
2. Website Chatbot using Direct URL
In the bot direct URL, some optional parameters can be appended while launching the bot.
Parameters that you can pass
- &launch_flow=<Launch_Flow>&data_attrs={key1=val1::key2=val2}
Example
- “launch_flow” will help start the bot on a particular flow.
- “data_attrs” can be used to pass some data attributes while launching the bot.
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/dPwQi_iWmc9LEKo6RlEHv_screenshot-2023-03-27-at-73740-pm.png?format=webp)
3. Parameter to override Autopop on different web pages –
To override, please use the ‘override_pop_up’ attribute while injecting the script into the webpage. By default, the behavior will be as configured in the deploy section for the chatbot.
![Document image Document image](https://images.archbee.com/FEqjvWZnyymr_PEhXLLlG/6s8ZchZtnk-o3hfq7t_zo_image.png?format=webp)
Feel free to reach out to [email protected] in case you face any issues.
![Doc contributor](https://s3.amazonaws.com/archbee-animals/dog.png)
![Doc contributor](https://s3.amazonaws.com/archbee-animals/gorilla.png)