Unable to update variables with SDK setVariables
I’m trying to use the widget SDK to update some variables using the setVariables function.
The function returns success and I can see the network call to chatling.ai to call the svv endpoint. This call contains the correct data and includes the variable names and new values. The call returns a success but the variables are never updated in the chats.
It looks like the backend is ignoring these new values for some reason.
Log in to comment and vote
Comments1
Spiffy Brian
Jul 27, 2025
Never mind. It appears that the variables can be updated only after a chat has started and they are reset when a new chat is started.
This wasn’t clear from the documentation. In fact, I think the documentation is incorrect.
It says -
If at any point after launching the chatbot, you want to pass some data to it, you can do so by calling the
window.Chatling.setVariablesfunction.That doesn’t appear to be true, as you can only set the variables after a chat starts.