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

# Call Treatments & IVR

> A call treatment is the logic tree you build to customize a caller's experience — voice prompts, IVR menus, and routing conditions — before they connect to your call center.

Each Invoca campaign includes a call treatment — a tree of options you design to fully customize a caller's experience before they connect to your call center.

A few examples of how call treatments get used:

* **Driving calls to a single line of business:** typically a simpler tree — a pre-recorded message and voice prompt, possibly with an IVR keypress menu routing to sales or support.
* **Driving calls to many lines of business (e.g., a franchise):** the tree can route calls automatically to the nearest or most relevant line of business based on Marketing Data, with a customized experience per location.
* **Performance marketing:** the tree typically focuses on payout conditions — checking a caller's target region and routing them into the correct bundle and payout.

## Understanding your call treatment tree

A call treatment is a logic tree, read top to bottom — nodes and conditions at the top take place before those below them. Every tree begins with the initial node, "At the start of the call."

Not every caller experiences the entire tree — it can branch into several paths, nested as deep as your business needs, with each caller's path typically ending at a call center. For example, a simple tree might play an automated prompt asking callers to press 1 for a special offer or 2 for a normal call; pressing 1 checks the caller's Marketing Data to see if they qualify for the offer and forwards them accordingly, while pressing 2 forwards to a different call center.

## Building your call treatment

1. Log in to your Invoca account. In the sidebar menu, click **Campaigns**, then select **Manage Campaigns**. Select the campaign whose call treatment you'd like to build (or create a new campaign first).
2. Scroll to the Call Treatment tile and click **Edit**.
3. Optionally check **Record call** to record calls, or **Play whisper message** to play a prompt only your call center agent hears. If transferring to an automated system, a whisper message may cause the caller to miss part of that system's own message — you can set a whisper message condition so it only plays in specific scenarios.
   * By default, whisper messages play after a 1.5-second delay once your agent answers. To change this delay, reach out to your account team or [support@invoca.com](mailto:support@invoca.com).
4. If enabled on your account, check **Enable Speech Recognition** to let callers say words to navigate call treatment menus. See [IVR Speech Recognition](/s/article/ivr-speech-recognition).
5. In the "At the start of the call" dropdown, select your first action — see the node reference below for what each option does. Keep adding nodes until you've built your full tree.
6. Click **Done** and save your campaign, then test your call treatment (see below).

## Voice prompts and backup number rollover

Most nodes support two common options: adding a spoken instruction, or forwarding to a backup number if your preferred one is unavailable.

**Adding a voice prompt:** check **Play prompt first**, choose a voice/accent from the Prompt Voice menu, then type the text you want spoken via text-to-speech, or use a recording instead. You can also change the language of your call treatment prompts — see [IVR Behavior: Update Your Language Settings](/s/article/ivr-language-settings).

**Adding a backup number:** in any node that forwards to a destination or call center, check **If busy or no answer, use backup number**, then enter the backup number in the "rollover to" field. Use the time field to set how long Invoca waits on your preferred number before trying the backup.

If your account doesn't have access to these features, reach out to your account team or [support@invoca.com](mailto:support@invoca.com).

## Call treatment node reference

### Straight Transfer

**Forward to call center.** Sends the caller directly to the phone number entered in the Phone Number field. To include an extension, add three commas after the number as pauses, then the extension — for example, `18001234567,,,890` for extension 890. Click **Use Demo Number** to test with a dummy number.

**Hang up.** Ends the call. Often paired with a question node when a caller doesn't qualify for a promotion.

### Caller Input Required

**Ask a question.** Creates a keypress IVR menu; supports speech recognition. New nodes start with options for "1" and "2" — add more with **New**, or delete with the gray X. Use **Wrong keypress ("W")** to set what happens on an invalid keypress (for example, forwarding to an overflow number), and **No keypress ("N")** for what happens if the caller doesn't respond within 3 seconds. You can also track keypresses as Signals.

Common uses: separating sales from support calls, separating product lines, qualifying caller demographics, or qualifying caller intent.

**Ask a series of questions.** Similar to "Ask a question," but asks multiple questions in sequence; each keypress can lead to the next question or a new node. Supports speech recognition, and lets more than one keypress flow through to the next question — useful for capturing Signal data without needing it to drive routing.

**Ask a yes or no question.** Like "Ask a question," but limited to two answers: 1 for Yes, 2 for No. Supports speech recognition.

**Ask for number input.** Prompts the caller to enter a string of digits (phone number, date, ZIP code, and so on); supports speech recognition. Choose a Question Type:

| Type         | Behavior                                                                             |
| :----------- | :----------------------------------------------------------------------------------- |
| Digits       | Stored as a string (e.g. "1234"); read back digit by digit ("one, two, three, four") |
| Number       | Read back as a single number (e.g. "one thousand two hundred thirty-four")           |
| Phone Number | Must be 10 digits                                                                    |
| Date         | Must be formatted YYYYMMDD                                                           |
| Currency     | Read back as a dollar amount                                                         |
| Time         | Must be formatted HHMM                                                               |
| Zip Code     | Must be 5 digits (US ZIP code)                                                       |

Check **Confirm response** to have the IVR read the number back and ask the caller to confirm it. Use the Error Prompt dropdown to handle unmatched input, or select Custom to write your own prompt. The caller's input is stored as Marketing Data — use "Save the caller's response…" to choose the field, or create a new one first. This node doesn't route the call by itself; combine it with a node like Forward to Marketing Data Field, or a Routing Webhook, to act on the input immediately, or store it for later use.

<Note>
  **Note**

  If a caller's response is delayed by several seconds after entering a ZIP code in this node, direct them to press `#` after their entry — see [Caller Experiencing a Delay After Entering Their Zip Code During Call Treatment](/s/article/caller-delay-zip-code).
</Note>

**Press any key and continue.** Prompts the caller to press any key; leads to one node if they do, and a different node if they don't.

**Offer a text message.** If the caller presses 9, sends them a text message. Use the offer text box to explain why they'd want the message (and to press 9), and the send text box for the message body; a dropdown lets you choose when to send it. Set the Next node for what happens afterward. This feature is TCPA compliant when not used for telemarketing — the caller's keypress is digitally captured and compliant with the E-SIGN Act.

**Verify location of caller.** Confirms or captures a caller's ZIP code via keypress; supports speech recognition. By default, it detects the caller's nearest city/state via caller ID and asks them to press 1 to confirm, or enter their 5-digit ZIP followed by `#` if incorrect. You can instead configure it to skip auto-detection and go straight to ZIP entry — reach out to your account team or [support@invoca.com](mailto:support@invoca.com) to make this change.

Location detection uses the caller ID's area code (NPA) and prefix (NXX) — for "212-555-1234," NPA is "212" and NXX is "555." Since matching a ZIP code (a postal concept) to an area code (a telecom concept) isn't always precise, campaigns using ZIP-code target regions treat every area code/prefix combination as covering every ZIP code associated with it — unless the caller enters a ZIP code directly, which overrides the automatically detected one. Keypresses from this node can also be tracked as Signals.

### Advanced Routing

**Forward to a group of phone numbers.** Forwards to a ranked list of numbers, trying each in order if the previous one isn't answered — see [Call Forwarding: Group Ringing & Answer Rates](/s/article/call-forwarding-group-ringing) for the full setup, including randomized/weighted distribution and agent call decline.

**Forward to detected destination.** Forwards to whichever destination number was originally on the landing page before the Invoca Tag swapped it with a promo number.

<Note>
  **Note**

  This conflicts with "Forward to marketing data field." Using both **Forward to detected destination** (or **Forward to call center**) *and* **Forward to marketing data field** in the same campaign causes calls meant for your marketing-data/lookup-table routing to go to the detected destination instead. Use one or the other where possible. If you need both, set this campaign as your default campaign, create a new Tag draft, and in the Tag's Custom Code block, add exactly:

  ```js theme={null}
  options.destinationSettings.paramName = "invoca_detected_destination";
  return options;
  ```

  Only add `return options;` if it isn't already present — duplicating it can break your custom code.
</Note>

**Forward to marketing data field.** Uses Marketing Data from the caller's browser session to choose a destination call center. Requires a Marketing Data field that captures or determines the destination number. Use "Else, if Marketing Data value isn't present" to set a fallback node. See [Lookup Table Routing](/s/article/lookup-table-routing) for more complex routing. Conflicts with "Forward to detected destination" — see the note above.

**Check a Condition.** Evaluates data about the caller — caller ID, Marketing Data, repeat-caller history, or Signals — to route the call. Click **Add condition** to choose from:

* **Is Repeat** — has this caller called before?
* **In Region** — is the caller in a targeted region?
* **During Hours** — is the call within campaign hours?
* **Pressed a Key** — checks a previous keypress in the tree
* **Is Mobile** / **Is Landline**
* **Sent SMS** — was an SMS sent earlier in the tree?
* **Signal Met** — is a chosen Signal tagged on this caller?
* **Custom Fields** — does the caller's session match a specific Marketing Data value? Format: `custom_data["FIELD NAME"] = "VALUE"`. Adding `!` before `=` inverts the match ("not equal to"). See also [Can I Use Other Comparison Operators to Check a Condition in Call Treatment?](/s/article/comparison-operators-condition)

Combine conditions with AND (all must be true) or OR (any must be true), and use NOT before a condition to check its opposite. Click **Done** when finished (click **Edit** to revise later). Use the **Then** and **Else** dropdowns to set what happens when the condition is met or not met.

**Forward to nearest location.** Forwards based on the caller's area code to their nearest custom-defined call center location — see [Define Locations for Call Treatment Forwarding](/s/article/define-locations-call-treatment-forwarding) to set these up. Use "Location exists within" to cap the distance (in miles), and "Else no location is nearby" for callers outside that range.

## Testing your call treatment tree

From the Campaign Overview page, click **Test Call**, enter a landline or mobile number (Skype/VOIP numbers may not work correctly), and click **Call** to receive a test call experiencing your tree.

**Works correctly in test mode:** prompt messages, keypress menus, forwarding to most landline/mobile numbers, condition checks, location verification, and text message offers.

**Doesn't work in test mode:** Real-Time Routing Webhooks and other pre-transfer webhooks (won't fire), AI Messaging Agents (won't send texts), most performance marketing reporting (payouts, bundling, syndication), and some call data (like duration) in your reports.

## Where to go next

* [Campaigns Overview](/s/article/campaigns-overview)
* [IVR A/B Testing](/s/article/ivr-ab-testing)
* [Conditional Call Recording](/s/article/conditional-call-recording)
