Skip to main content

Kinds of variables

The system variables are user_number (the caller’s number), user_full_number (the same number in international format), agent_number, now (current date and time, Israel time), is_open (whether you’re inside operating hours, when they’re enabled) and direction (inbound, outbound or web call).

Using variables in text

Write [var_name] in a prompt, welcome message, announcement, SMS text or function field, and Voicy replaces it with the value. The easiest way is to type [ and pick the variable from the menu that opens. The menu lists every variable available at that point, grouped by kind, for example SYSTEM. An arrow next to a variable opens its modifiers, so you can insert a ready-made reference such as [user_number:local]. You can add these modifiers after the name:
  • [code:digits] reads the value digit by digit, which suits codes and IDs.
  • [amount:spoken] reads numbers as Hebrew words.
  • [phone:e164] and [phone:local] format a phone number as +972… or 05…. This is handy when your system expects one format.

Collecting details with a Collection node

Each Collection node gathers up to 3 details. For each one you set:
  • Type: Text, Number, Boolean, Phone, Email, License plate or Enum. Answers are checked against the type. Phone accepts Israeli mobile and landline numbers. License plate accepts Israeli vehicle plates: 7 or 8 digits, or a military (צ), police (מ), military police (מצ), diplomatic (CD) or consular (CC) plate. It is stored as digits, or as the letter, a dash and the digits (צ-123456), and a second variable <name>_plate_type records the kind (civilian, military, police, military_police, diplomatic or consular). An Enum only accepts one of its options.
  • Question: the full question the agent asks, for example “What’s your full name?”
  • Required: the node won’t move on until every required detail is collected. The caller can skip optional ones.
The agent confirms each detail briefly once it’s captured. An Enum’s options come from a type you create in the agent’s Types section with Add Type, so several variables can reuse the same options.

Setting and changing values

Use a Set Var node, or turn on When condition fires, also set a variable on a transition, to set or clear a value without asking the caller. Values can be expressions: arithmetic on numbers () or text that combines variables.

Branching on values

A Logic Split node compares variables and routes instantly, for example . Conditions support comparisons (== != < <= > >=) and &&, ||, !. The first match wins, and a branch with no condition catches everything else.

Default values

Each variable under Vars provided can have a Default value. The agent uses it whenever the call doesn’t bring its own value, for example on every inbound call, or on an outbound call that doesn’t pass that variable. When a call starts, values are filled in this order. A later step replaces an earlier one: System variables have no default value of their own: the dialog shows what they contain, but only a test value can change them.

Passing variables into an outbound call

When you start a call with the call-dial API, send values in vars_provided, for example {"customer_name": "Dana"}. Declare each one under Vars provided first. Declared variables are your agent’s variable contract: the API returns them in the agent’s variables_provided with name, description and type. A variable that isn’t passed uses its default value.

Extracted variables

Extracted variables are filled after the call, from the whole transcript. Use them for reporting fields, like the reason for calling or whether the caller asked for a callback. For anything the call itself needs while it’s running, use collected variables instead.
1

Open Vars extracted

In the agent editor, open Properties and expand Vars extracted.
2

Add a field

Add each field you want pulled from every call, such as customer_name, reason_for_call or callback_requested. Give it a name (lowercase letters and underscores) and a type: text, number, boolean, phone, email or license plate.
3

Describe it

Write a clear description of what the field should hold. Clear names and descriptions give better results.
The values appear on the call’s detail page, in your call-ended webhook and in the call-get API. See Call summary and extracted variables.