Set Variable State

Sets a session variable with a specified string value. If you specify a numeric value, it is saved as a string.

Input Variables

  • Variable – name of the session variable to set.
  • Value – value to save in the session variable. To set Variable with the value of another session variable, specify the session variable name as {sessionVariable} where sessionVariable contains the value to copy.

Output Variables


Follow-up State – OK

The name of the follow-up state after successful processing.

This process always succeeds and moves to the next state.

Follow-up State – Fail

Not applicable.

Follow-up State – Dynamic

Not applicable.

State Editor

This example sets the session variable CREDIT to 1000. The variable can be accessed by any state in the application.

Set Variable State


Session variables are also set in these circumstances:
  • If you specify a value surrounded by parentheses in the Expression field for a follow-up state, and specify the session variable name in the Assign To field.
  • If a state returns values, they are copied to session variables, so they are accessible by follow-up states.


This example sets the session variable ALERT_MESSAGE with a message sent by the Send SMS state.

Set Variable State Text