> ## Documentation Index
> Fetch the complete documentation index at: https://help.broadstripes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add conditions to a call script

> Send each call a different way based on the person's details, custom fields, or event steps, and show some words only to some people.

Conditions let one script fit different people. The script builder gives you two kinds:

* A **condition** card sends the call to a different page depending on the person. For example, people on the night shift go to one page and everyone else goes to another.
* A **Show only when** section shows some of a page's words only to some people.

This page assumes you know how to [build a call script](https://help.broadstripes.com/docs/admin-guides/call-center/build-a-call-script.md).

## How a condition decides

* A condition checks the person's employer, department, or job title, the project's custom fields, and the person's event steps.
* A condition has one or more numbered paths, each with its own check. The paths are checked from top to bottom, and the first check that matches wins. **Otherwise** catches everyone the paths don't match.
* The caller never sees the condition. When the caller presses a button that leads to it, the call goes straight to the page the matching path names.

> [!NOTE]
>
> Conditions use the person's details as they were when the call started. An event step that a button checks off, or a field the caller fills in, doesn't change which way a later condition goes in the same call.

## Add a conditional button

A conditional button adds a button and the condition it leads to in one step.

1. Open a page by clicking **Edit** on its card.
2. In the page's blocks, click **Conditional button**, or drag it onto the card. The **Add a conditional button** dialog opens.
3. Fill in:
   * **Words on the button** — what the caller presses.
   * **Name of the condition** — a name for the condition's card, such as "Which shift?"
   * **Path 1** — choose what to check, how to check it, and the value. Then choose the page this path goes to, or choose **+ Create a new page**.
   * **+ Add path** — adds another path with its own check.
   * **Everyone else goes to** — the page for people no path matches.
4. Click **Add the button and the condition**.

![The Add a conditional button dialog with the button's words, the condition's name, a path that checks whether Shift is PM, and the page everyone else goes to](https://mintcdn.com/broadstripes/7REie9deppvtvUJW/images/admin-guides/call-center/script-builder-conditional-button.png?fit=max\&auto=format\&n=7REie9deppvtvUJW\&q=85\&s=10c6fa21c8ab07414b4033bf944dadf9)

The condition's card appears on the map to the right of the page, with a dashed purple line for each path.

## Add a condition from the side panel

1. In the side panel, click **Condition** under **Blocks**, or drag it onto the map.
2. Write its paths, as described in [Edit a condition](#edit-a-condition).
3. Point a button at it. In the button editor, the **Goes to** list shows the script's conditions after its pages. You can also drag a button's circle onto the condition's card.

## Edit a condition

Click **Edit** on a condition's card to open it.

![An open condition card named Which shift? with Path 1, which checks whether Shift is PM, and Otherwise, which sends everyone else to Wrap Up](https://mintcdn.com/broadstripes/7REie9deppvtvUJW/images/admin-guides/call-center/script-builder-condition-card.png?fit=max\&auto=format\&n=7REie9deppvtvUJW\&q=85\&s=4b5b54690c2699022eb43add21be73fc)

* **Name** — type in the box at the top to rename the condition. Buttons that lead to it follow the new name.
* **Goes to** — the page this path sends the call to. A path can only go to a page, not to another condition. Click **Open** and the page's name to open that page.
* **Move up** and **Move down** — change the order the paths are checked in.
* **Remove path** — deletes the path. A condition needs at least one path; to stop using a condition, delete it.
* **Take this path when the person matches all / any of the following** — choose **all** when every rule must match, or **any** when one is enough.
* **Add rule** and **Add group** — add another rule, or a group of rules with its own **all** or **any**.
* **+ Add another path** — adds a path at the bottom. The **Path** block in the card's blocks does the same.
* **Otherwise** — the page for everyone no path matches.
* **Delete condition** — removes the condition after asking first. Buttons that led to it then go nowhere until you point them somewhere else.

Click **Done**, or press **Escape**, to return to the map.

While a rule isn't finished, the path keeps using its last finished check, and the card says so under the rules. For example: "This check is not finished, so Path 1 still checks: Shift is PM."

### What you can check

Each rule starts with **What to check**. The list has three sections:

| What to check | How you can check it |
| - | - |
| **About the person** — Employer, Department, Job title | **is**, **is not**, **is filled in**, **is empty**, with values you type |
| **Custom fields** | **is**, **is not**, **is filled in**, **is empty**. A field with choices offers its choices as values; other fields take values you type. |
| **Event steps** | **is checked** or **is not checked** |

To check for more than one value, click **+ or another value**. The rule then reads **is any of** or **is none of**.

A Yes/No field takes **Yes** or **No**. Its **has nothing saved** matches only a person who has never had Yes or No saved. A caller who leaves the box unchecked on a page saves No.

## Show words only to some people

A **Show only when** section shows part of a page's words only to the people who match its rules. You can also give the words everyone else hears in its place.

1. Open the page, and in **What the caller will read**, select the words. The selection must be inside one paragraph.
2. Click **Show only when** on the toolbar.
3. Choose **all** or **any**, and add rules as you would for a condition.
4. Optionally, type the words everyone else hears in **Otherwise say**.
5. Click **Show only when this matches**.

![The Show only when popover with a rule that checks whether Shift is PM and an Otherwise say box](https://mintcdn.com/broadstripes/7REie9deppvtvUJW/images/admin-guides/call-center/script-builder-show-only-when.png?fit=max\&auto=format\&n=7REie9deppvtvUJW\&q=85\&s=7c49804c0f9b6bb0b901b1e7ccd8f11c)

To change a section, click inside it and click **Show only when** again. To remove the section and always show its words, choose **Always show these words**.

**Preview** on an open page shows both versions of the words, so you can read them. [Try the call](https://help.broadstripes.com/docs/admin-guides/call-center/test-and-publish-a-call-script.md#try-the-call) shows only the version for its sample person.

## Checks written in code

If a check was written in code in a form the builder can't show as rules, the rule editor shows the code itself, with **Replace with rules** and **Edit in code**. The check keeps working as written until you change it.

## Next steps

* [Test and publish a call script](https://help.broadstripes.com/docs/admin-guides/call-center/test-and-publish-a-call-script.md) to walk through each path before callers use it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.