improved

Variable Handling Update: Consistent Behavior for Undefined Values

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 as null (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 return undefined (which could cause agents to crash).
    • Functions that attempt to return undefined will now return null (to ensure backwards compatibility).

These changes will go info effect March 31st.