improved
Variable Handling Update: Consistent Behavior for Undefined Values
March 28th, 2025 by Zoran Slamkov
Changes:
- Updated Voiceflow variable handling for consistency in previously undefined behavior:
- Variables can be any JavaScript object that is JSON serializable.
- Any variable set to
undefined
will be saved asnull
(this conversion happens at the end of the step, so it does not affect the internal workings of JavaScript steps and functions). - Functions can now return
null
(rather than throwing an error) and can no longer returnundefined
(which could cause agents to crash). - Functions that attempt to return
undefined
will now returnnull
(to ensure backwards compatibility).
These changes will go info effect March 31st.