You can update your Webchat’s configuration dynamically using JavaScript. This is useful if you want to update Webchat’s style or settings after it’s already loaded on your website.Documentation Index
Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
You will need:
- A website with an embedded bot
- Familiarity with JavaScript
Update configuration
To update Webchat’s configuration, you can call thewindow.botpress.config method after Webchat has been initialized:
configuration object you’d like to apply the new configuration.
Switch to dark theme
Here’s an example that updates Webchat’s theme to dark mode as soon as Webchat loads:- Waits until Webchat is initialized
- Updates the
themeModeconfiguration todark