Your chatbot can use your website's data directly to:
Personalize conversations: greet users by name when they're logged into their account.
Boost conversions: remind shoppers how many items they have in their cart, and which ones.
Power dynamic logic: send a unique customer ID so your bot can call an external API and fetch loyalty points, order status, or plan details.
In short, you take any piece of information from your site and feed it straight into your ViaSay chatbot, which then knows the visitor's context.
How it works
You use User Channel Variables. Once created, they behave like any other Custom Variable across the ViaSay platform: usable in flows, conditions, and messages.
Your webpage pushes values to the bot by setting HTML attributes on the <destygo-webchat> element.
Step 1: Create a User Channel Variable
In the ViaSay platform, go to Build → Variables → User channel.
Click Create variable, select User channel variable, then enter a Variable Name (e.g. user_firstname) and an optional Description.
Once saved, your variable appears in the list, ready for use in any flow, condition, or message.
Step 2: Pass variables through the widget integration script
You'll modify the standard widget embed code to include your variables.
First, copy the widget embed code found under Integrate → Channels → ViaSay Widget.
To pass data from your site to the chatbot, simply add extra setAttribute calls before the widget is appended to the page.
Each call takes a key (the name of your User Channel Variable) and a value (either a hard-coded string or a JavaScript variable from your page).
<script>
var widget = document.createElement("destygo-webchat");
widget.setAttribute('id', "destygo_widget");
widget.setAttribute('class', "destygo_widget");
widget.setAttribute('key', "value"); // value to add
widget.setAttribute('token', "here_is_your_widget_token");
document.body.appendChild(widget);
</script>For example, to pass the visitor's name, their ID and their subscription plan, you would update the snippet like this:
<script>
var widget = document.createElement("destygo-webchat");
widget.setAttribute('id', "destygo_widget");
widget.setAttribute('class', "destygo_widget");
widget.setAttribute('token', "217e439c-7832-4d80-535c-10125655c5d5");
widget.setAttribute('chatter_name', chatter_name);
widget.setAttribute('client_id', client_id);
widget.setAttribute('client_plan', client_plan);
document.body.appendChild(widget);
</script>⚠️ Attribute names are case-sensitive and must be all lowercase:
chatter_nameworks, butChatter_Namedoes not.
That's it: your bot now receives chatter_name, client_id and client_plan as variables you can use throughout the Flow Builder.
Step 3: Use the variable in the Flow Builder
Your webpage now pushes live values into the widget. In the Flow Builder, anywhere you would normally type text, insert {{variable_name}} and ViaSay replaces it with the value you passed.
For example, in an Answer step:
To fetch additional data, for instance the user's latest invoice status, use the same variable in an API Call step. In the configuration panel on the right, put {{client_id}} in your JSON body or URL, then map the API response to a new bot variable:
Then add a Condition step right after the API call. For example, if {{payment_status}} equals "failed", route the conversation to a human agent; otherwise, continue with an automated confirmation message.