narrow-tan•15mo ago
Ultimple vars pass to voiceflow from web
based on this:
To pass the userID from your website to your Voiceflow application, you can follow these steps:
Set up the userID in your web page:
<script>
let userID = 'user-1234';
</script>
Modify the Voiceflow chat load script to include the userID:
<script>
(function (d, t) {
var v = d.createElement(t),
s = d.getElementsByTagName(t)[0];
v.onload = function () {
window.voiceflow.chat.load({
verify: {
projectID: 'XXXXXXXXXXXXXXXXXX',
},
url: 'https://general-runtime.voiceflow.com/',
versionID: 'production',
userID: userID
});
}
v.src = "https://cdn.voiceflow.com/widget/bundle.mjs";
v.type = "text/javascript";
s.parentNode.insertBefore(v, s);
})(document, 'script');
</script>
This setup will pass the userID from your website to the Voiceflow chat. The userID value will be set as the built-in userid variable in your Voiceflow agent. However, it's important to note that you should avoid using identifying information like real names, emails, telephone numbers, or other identifying information in the userID due to potential security hazards.
For more details, you can refer to the Voiceflow Customization & Configuration documentation.
How to pass multiple i variables to voiceflow?
like userID,
testID and etc
1 Reply
To identify the user and share that info with your agent, you can pass a
userID
in the Voiceflow chat load script. The value will be set as the built-in userid
variable in your Voiceflow agent. Here’s how you can do it:
1. Set up the userID in your web page:
2. Modify the Voiceflow chat load script to include the userID:
In this setup, userID
is passed directly as a built-in variable. This will ensure that userID
is available in your Voiceflow agent. The userID
value will be set as the built-in userid
variable.
For more details, you can refer to the Voiceflow Customization & Configuration documentation:
- Voiceflow Customization & Configuration