# Use workflow variables in a workflow

> Insert a workflow variable, shape its value, and add fallbacks to messages or webhook data.

## Before you start

Select the organization and open the workflow you want to edit. You need **Workflows** access. Variables are available while authoring a Message in the main or child-flow editor, or a Send webhook step; the list is built from the data exposed to that workflow.

## Insert and edit a variable

1. Select a **Message** step and place the cursor in the message text or, on the **SMS fallback** tab, the fallback field. Open the **Variables** picker and choose a value.
2. For a **Send webhook** step, place the cursor in **JSON body**. Choose a value in the **Variable** picker and choose **Add**. The value is inserted into the JSON body.
3. Select the variable chip in the message or JSON body. The variable builder opens in a dialog. Its header contains the editable **Variable name** field.
4. Choose **Save variable** when the expression is ready. Choose **Cancel** to close the builder without applying the edit.

![Message text with the Variables picker highlighted](https://app.showboss.ai/help/shots/workflow-variables-picker-light.webp)

![Variable builder dialog with Adjustments, Fallbacks, Text fallback and Save variable highlighted](https://app.showboss.ai/help/shots/workflow-variables-builder-light.webp)

The builder does not contain a source-variable picker. It starts with the source from the chip you selected. To use another source, remove or replace the chip with the field's variable picker, then select that chip to edit it.

## What appears in the variable list

**Lead → Phone Number** inserts the lead's phone number. It is available regardless of the trigger mapping. Other options depend on the workflow and its available mappings.

| Source | Availability in the picker |
| --- | --- |
| Main appointment flow | Appointment and lead values exposed by the workflow's appointment trigger mappings. A value that is covered by only some calendars can be labeled **(some calendars)**. |
| Recovery, reschedule and ghost-busting messages | Standard appointment/lead values supplied by the parent context. Custom values are not listed in these editors. |
| Global workflow values | Workflow values such as the lead's phone number, organization name, local date or time, and **Persona Name**. Opt-in flows include the phone number, organization values, and **Persona Name**. |
| Custom values | Active custom values that are mapped for at least one appointment trigger. They are not added to the opt-in variable list. |
| Opt-in webhook values | Values from the opt-in webhook sample or confirmed mapping. A mapping that has not been confirmed does not provide mapped values to the picker. |

If a value is not available, review the relevant trigger or webhook mapping and return to the step after the mapping is available. A webhook field with no available values shows **No variables available** in its picker.

**Full Name**, **First name**, and **Last name** are available in Opt-in Flows even without a webhook mapping. First Name uses the first space-separated part of the full name; Last Name uses the last part. Both presets apply title case.

**Persona Name** is available in opt-in and regular workflows. It uses the sender Persona name saved when the workflow execution starts. It is separate from the appointment representative name.

## Adjust a value by type

Open **Adjustments**, then use **Choose a transform**. The available choices depend on the selected variable's data type. The same choices can be added to a source variable or to a variable fallback. After a transform, the next choices follow its output type: for example, **Date** can be followed by **Weekday**.

| Data type | Choices shown by the builder |
| --- | --- |
| Text (string) | **UPPERCASE**, **lowercase**, **Capitalize (Title case)**, and **Split text** |
| Date & time (datetime) | **Date**, **Time**, and **Weekday** |
| Date | **Weekday** |
| Number, True/False, or Time | No transform choices are offered |

When you add **Split text**, set its **Delimiter** and **Part index**. A negative part index counts from the end; for example, splitting `alex@example.com` with `@` and part index `-1` returns `example.com`. Index `0` selects the first part, `alex`.

Transforms run in the order they are listed. Use the remove control beside a transform when you need to change the sequence or delete one.

![Variable builder with Adjustments expanded and the Add an adjustment dropdown highlighted](https://app.showboss.ai/help/shots/workflow-variables-transform-light.webp)

## Add fallbacks in priority order

Open **Alternative values (Fallbacks)** and choose **Add fallback variable**. Select a **Fallback variable**, optionally add a transform, and repeat for additional alternatives. With more than one row, drag the rows to change their order. The first row is tried before the next row.

Enter a value in **Text fallback** for a final literal message. The builder's preview resolves the source first, then each fallback variable in its displayed order, and then the text fallback. An empty result remains empty when no fallback has a value.

For example, to greet a lead even when a full name is missing:

1. Insert the lead's full name.
2. Open its chip and choose **Adjustments** > **Split text**. Set **Delimiter** to a space and **Part index** to `0`, then add **Capitalize (Title case)**.
3. Set **Text fallback** to `there`.
4. Preview the result with a sample full name, then clear that sample to see the text fallback path.

## Use Preview safely

Open **Preview** to see the value that the current expression would render with sample values. Each referenced variable has an editable sample field plus **Clear** and **Restore** controls. Sample values are user-entered or generated examples, such as `Taylor`, `42`, `2026-03-27`, or `2026-03-27T09:00:00Z`; they are not a live lead or appointment record.

The status line identifies the path used, such as **Using [variable]**, **Using fallback [variable]**, or **Using text fallback**. Previewing does not send a message or webhook request.

## Save the draft, then publish when ready

**Save variable** applies the edited expression to the selected message or webhook body in the workflow editor. It does not publish the workflow by itself. In the main editor, apply the node and save the workflow draft and confirm **Save** is greyed out. In an embedded recovery, reschedule or ghost-busting editor, use that editor's **Save draft** (or **Apply** in Reschedule Flow) for the child-flow changes. The saved draft and the published workflow remain separate until you choose **Publish** and complete its review.

For the full publication steps, see [Manage existing workflows](https://app.showboss.ai/help/manage-showflows). To create a new flow first, see [Set up and publish your first workflow](https://app.showboss.ai/help/first-showflow).

## Troubleshooting

### The variable I need is not listed

Check that the workflow's appointment trigger or opt-in webhook mapping exposes the value and that any required mapping is confirmed. Active custom values also need appointment-trigger coverage. Reopen the picker after the mapping change.

### The preview uses a fallback

Read the status line in **Preview**. The source or an earlier fallback is empty after its transforms, so the next item in the chain is being used. Edit its sample value, choose **Restore**, or reorder the fallback rows.

### My edited chip is not live

Choose **Save variable**, then apply the node and save the workflow (or use the child-flow editor's **Save**). Choose **Publish** separately; a saved draft does not update the published version until publication is accepted.

### The webhook body becomes invalid

Keep the inserted token inside valid JSON and review the **JSON body** error shown below the editor. Correct the JSON before saving the workflow.

## Next step

Continue with [Manage existing workflows](https://app.showboss.ai/help/manage-showflows) to review saved and published states.

---

Source: https://app.showboss.ai/help/workflow-variables (last verified 2026-11-12)
