Variable management
    • 18 Apr 2024
    • 5 Minutes to read
    • Dark
    • PDF

    Variable management

    • Dark
    • PDF

    Article summary

    Who should read this article: Administrators

    How to use custom and system variables in Flow Builder to enable interaction routing automation and contact data retrieval.


    Using variables in your interaction flows enables you to automate interaction handling and permit self-service for your contacts.

    Flow Builder supports both system and custom variables. System variables are predefined; they allow you to capture and reuse information about the interaction. Custom variables, which you define, enable you to reuse data from a request response elsewhere in your interaction flow and develop flexible custom routing logic. Variables facilitate passing data from node to node and making routing decisions based on their values.

    System variables

    The following four system (global) variables are available:

    {{start_time}}The time the interaction started.2023-08-21T04:02:18Z
    {{ani}}The calling number (ANI).443336006114
    {{dnis}}The number dialed (DNIS).380631234567
    {{phone_type}}The type of phone for the ANI.fixed_line

    Custom variables

    Some nodes support the use of custom variables that you can use to store information to pass to other nodes and use for routing decisions or to retrieve data from a data service and send data to contacts.

    Variable names

    You can use a string of up to 60 characters to name your variables. The following characters cannot be used in character name: { and }.


    The following data types are supported for custom variables:

    StringMaximum string length is 4096 characters. Used for storing names, URLs, and other text-based information."Isabela García" or "{{var}}"
    NumberAny numerical value up to 255 digits. Both integers and floating point numbers are supported."199.95" or "16"
    DatetimeA single date and time in the following format: YYYY-MM-DD HH:MM:SS"2024-04-17 13:45:30"
    uuida string containing the UUID of the interaction07771c38-c159-4965-a878-be0162118b2b


    The following nodes support the use of variables. Refer to the individual node articles for information about how to configure and use variables with the node.

    ConditionsEnables the analysis and comparison of variables of all types, including system and custom variables, such as strings, numbers, or date and time values against a static value or another variable.
    HTTP RequestEnables you to define and use custom variables to store a data key from an HTTP request response using the JSONPath expression.
    RouteEnables you to specify a variable to contain an agent or queue extension, or an external phone number.
    Send MessageEnables you to insert dynamic content into the body of an SMS message
    Not supported for WhatsApp messages.

    Variable menu

    When a menu or field supports the use of variables, the { } menu button is added to the field. Click { } to display the Variables menu.

    The Variables menu enables you to select from any of the system variables and any custom variables you have defined.

    Flow Builder Add Variable Menu

    Some nodes have a dedicated Variable menu. Click the menu to select an existing custom variable to be used by the node.

    Flow Builder Select Variable Menu HTTP Request

    Adding variables manually

    In fields and text boxes that permit variables, you can type "{{" to start entering variables manually. If you type a variable name that has not already been created, the Add custom variable panel displays and enables you to define the variable parameters. If you type a variable name that exists the Variable pop-up menu displays letting you select the variable from the list.

    Flow Builder Manually Entering Variables 30 seconds


    If you manually enter an existing variable name, make sure you enclose it in double brace brackets: {{variableName}}

    Add variable panel

    When custom variables are available for a node, Voiso enables you to either select an existing system or custom variable, or to create a new variable on-the-fly.

    To create a new variable on-the-fly, select Add custom variable from the Variable menu.

    In the Add custom variable panel, enter a unique name in the Variable name field. The name must be unique in the flow as variables are reusable across multiple nodes.

    Flow Builder Add Custom Variable Panel

    Use cases

    The following sections include some suggestions for how you can leverage variables in your interaction flows.

    Priority routing

    You can leverage system and custom variables to implement priority routing. Create variables that relate back to contact and call information in your CRM. Use the ANI from the call to identify the contact. Use the HTTP request node to retrieve contact information from your CRM or the Voiso CDR API, including the extension of the last agent to handle an interaction with the contact. Use the retrieved extension to route the call to the agent if they are available.

    Priority routing enables you to bypass the IVR and connect priority callers to specific agents or queues.

    Dynamic content in SMS

    Custom and system variables can be used with the Send message node to customize the content of SMS messages. For example, if a contact requests a payment link, you can use the ANI system variable to identify the caller in your CRM, use the HTTP request node to query your payment system API for the link and then automatically populate an SMS message with the link using a custom variable.

    SMS dynamic content, powered by variables, offers a robust solution for populating SMS messages in response to customer inquiries. By integrating variables into the Send message node, you can tailor each message with personalized information based on the specific request. For example, when a customer seeks information about their account balance, variables can fetch real-time data from your data service and dynamically insert the relevant balance details into the SMS.

    Dynamic content also enables you to personalize messages by inserting the contact's name and other personal information into the message.

    Leverage significant personal dates

    Variables can help you add a personal touch to your interactions. For example, you can identify significant dates for the contact, such as birthdays, culturally relevant holidays, anniversaries and milestones related to your business such as how long they have been a loyal customer, to encourage continued engagement.

    When a contact calls on or near a significant date, you can automatically detect the date using the start_time system variable then compare it to significant dates in your CRM and automatically make special offers to the caller. Use the HTTP request node to obtain information from your data service and store it in a custom variable, then use the Conditions node to compare the timestamp with the relevant dates.

    Was this article helpful?

    What's Next