> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# 8x8 Contact Center

> Route 8x8 Contact Center calls to a Synthflow AI agent through a Forward to External IVR node, with handback to a queue.

The 8x8 Contact Center integration routes inbound contact center calls to a Synthflow AI agent from inside your IVR script. Calls reach Synthflow over a [SIP trunk](/about-sip) rather than the public phone network, using 8x8's bring-your-own-carrier (BYOC) routing. When the agent ends the call, the caller resumes in the 8x8 IVR, so you can hand them to a queue for agent-assisted service.

8x8 Contact Center numbers support **inbound calls only**. Synthflow AI agents answer calls routed from 8x8, but outbound calling from an agent towards an 8x8 number is not currently supported.
Only **US** and **EU** regions are supported

## How it works

1. A customer calls into 8x8 Contact Center.
2. The IVR script routes the call to the Synthflow agent through a **Forward to External IVR** node, which dials the agent across the Synthflow SIP trunk.
3. The Synthflow agent handles the conversation.
4. When a handback is needed, the agent ends the call using an end-call reason defined in its prompt.
5. The call resumes in the 8x8 IVR at the node's **Resume** exit point, for example a queue.

## Prerequisites

Confirm the following before you configure the IVR script.

* **Synthflow agent with an 8x8 Contact Center number attached.** Import the number as described below, then attach it under **Deploy**.
* **8x8 Contact Center** with admin access to the [8x8 Admin Console](https://admin.8x8.com).

## Import an 8x8 Contact Center number in Synthflow

Open the Synthflow dashboard and go to **Phone Numbers**. Click **Import Phone Number** and configure the following fields:

| Field              | Value                                |
| ------------------ | ------------------------------------ |
| **Phone Provider** | 8x8 Contact Center                   |
| **Friendly Name**  | A label such as `8x8 Contact Center` |

Synthflow generates the required 12-digit, digit-only identifier for SIP routing. No E.164 number is required. Because 8x8 is IP-authenticated, there are no SIP credentials to enter — Synthflow fills in `sip.8x8.com` automatically.

8x8 Contact Center authenticates Synthflow against separate **US** and **EU** environments. Configure your 8x8 instance in the **same region** your Synthflow workspace was set up in, otherwise calls will fail. A **Global** region is not supported — use **US** or **EU** only.

Click **Import**, then attach the number to your inbound agent under **Deploy**. Keep the generated number to hand for the 8x8 routing steps below.

## 8x8 configuration

Complete the following steps in the 8x8 Admin Console.

### Create a phone channel and IVR script

1. Navigate to **Contact Center** and create a new phone channel.
2. Attach a phone IVR script to the channel.

### Add a Forward to External IVR node

In the IVR script editor, add a **Forward to External IVR** node to your call flow. This node points at the Synthflow SIP trunk instead of a dialable phone number. In the node's **Phone Number** field, enter the routing destination for your region, replacing `{SynthflowAgentNumber}` with the generated number attached to your Synthflow agent:

| Region | Phone Number field value                                       |
| ------ | -------------------------------------------------------------- |
| EMEA   | `AdvIvrPSTN-byoc_emea_outbyocsynthflow_{SynthflowAgentNumber}` |
| NA     | `AdvIvrPSTN-byoc_na_outbyocsynthflow_{SynthflowAgentNumber}`   |

Use the generated digit-only identifier with no spaces, dashes, or brackets. If Synthflow generated `482917364058` and your contact center is in the EMEA region, enter `AdvIvrPSTN-byoc_emea_outbyocsynthflow_482917364058`.

### Configure the Resume exit point

On the **Resume** exit of the **Forward to External IVR** node, add the routing the call should follow after the AI conversation, for example **Forward to Queue**. This is where callers land when the Synthflow agent hands the call back.

### Sample script

A minimal working script has four nodes: a greeting, the forward to Synthflow, a message on the **resume** exit, and a termination node that hangs up.

In this script, 8x8 answers the call and plays the first **Say** command, forwards the call to the Synthflow agent, and then plays the second **Say** command once the agent ends the call and the script resumes. **DefaultTermination** hangs up. Replace that final node with **Forward to Queue** when you want the caller to reach a human instead.

## Synthflow configuration

Define an end-call reason in the agent's prompt so it can hand callers back to the contact center. When the agent ends the call, 8x8 resumes it at the Resume exit point. For example:

```
If the user requests to speak with a human agent, end the call to redirect them to the contact center.
```

## Transfers

A [call transfer](/call-transfers) action on the agent does not work over the 8x8 SIP trunk. Rather than transferring from Synthflow, have the agent end the call and let 8x8 perform the transfer at the **Resume** exit of the **Forward to External IVR** node.

1. Define an end-call reason in the agent's prompt for the case that should reach a person, as shown in [Synthflow configuration](/sip-with-8x8-contact-centre#synthflow-configuration).
2. On the **Resume** exit, add the 8x8 routing node that handles the transfer, for example **Forward to Queue**.

Because the caller is back inside your script, the transfer uses your existing 8x8 queues, skills, and routing rules, and it stays in 8x8 reporting.

## Pass variables back to 8x8

The handback at the **Resume** exit returns the caller, but not the data your agent collected during the conversation. To make that data available inside 8x8 Contact Centre, attach it to the interaction with the [8x8 Contact Center Data Augmentation API](https://help.8x8.com/docs/8x8-contact-center-data-augmentation-api). Variables set through this API persist on the interaction, so your IVR script can route on them after the resume and human agents can see them when the interaction is offered.

Call the API while the caller is still with the Synthflow agent, either from a during-the-call [custom action](/about-custom-actions) or from your own backend. Send a `POST` request to `https://<your cluster>.8x8.com/api/v1/interaction/data/{identifier}`, authenticated with HTTP Basic Authentication using your 8x8 tenant ID as the username and your tenant's action token as the password. The `{identifier}` path segment identifies the interaction the variables attach to.

8x8 sends the interaction's call ID to Synthflow in the `X-8x8-CID` header on the incoming call, so it is available as the variable `{X-8x8-CID}` in prompts and custom actions, like other [SIP X-headers](/sip-x-headers-in-prompts). Use `{X-8x8-CID}` as the `{identifier}` in the request URL when your custom action calls the Data Augmentation API.

The request body lists the variables to set, along with attributes that control how 8x8 treats each one:

```json
{
  "data": [
    {
      "variables": [
        {
          "name": "_queueId",
          "value": "201",
          "ivr": "true",
          "display": "true",
          "displayName": "Queue ID",
          "dataType": "text"
        }
      ]
    }
  ]
}
```

* `ivr` makes the variable available to routing logic in your IVR script, for example to branch at the **Resume** exit based on what the caller told the agent.
* `display` and `displayName` control whether and how the variable appears to the human agent when the interaction is offered.
* `privacy` masks sensitive values before they are stored or displayed.

Variable names must begin with an underscore, contain only alphanumeric characters, and be under 25 characters with no spaces. For the full request and response reference, including how to retrieve interaction context with `GET`, see the [Data Augmentation API documentation](https://help.8x8.com/docs/8x8-contact-center-data-augmentation-api).

## Troubleshooting

* **Calls do not reach the Synthflow agent.** Verify the **Phone Number** field in the **Forward to External IVR** node exactly matches the format for your region and uses the generated Synthflow number, and confirm the number attached to your Synthflow agent is active.
* **Calls do not resume in the 8x8 IVR after the AI conversation.** Ensure the **Resume** exit point of the **Forward to External IVR** node is connected to a valid routing node, such as **Forward to Queue**, and confirm the agent's end-call reason is defined in its prompt.
* **The agent never triggers the handback.** Review the agent's prompt and confirm the end-call condition is clearly defined and matches the phrases callers actually use.
* **A transfer action on the agent does nothing.** Transfer actions do not work over the 8x8 SIP trunk. Hand the call back to 8x8 and transfer in the script, as described in [Transfers](/sip-with-8x8-contact-centre#transfers).

## FAQ

#### Why can't the agent transfer the call itself?

Calls arrive over the 8x8 SIP trunk, and [call transfer](/call-transfers) actions do not work on that trunk. Hand the call back to 8x8 and transfer inside your IVR script, as covered in [Transfers](/sip-with-8x8-contact-centre#transfers).

#### Can I send different callers to different destinations after the AI conversation?

Every handback returns to the same **Resume** exit, so branching has to happen in your 8x8 script after that point. To branch on what the caller told the agent, [pass variables back to 8x8](/sip-with-8x8-contact-centre#pass-variables-back-to-8x8) with the Data Augmentation API and route on them in the script.

#### How do I get data collected by the agent into 8x8?

Set variables on the interaction with the [8x8 Data Augmentation API](https://help.8x8.com/docs/8x8-contact-center-data-augmentation-api) while the call is with the Synthflow agent, as described in [Pass variables back to 8x8](/sip-with-8x8-contact-centre#pass-variables-back-to-8x8). The variables become available for routing in your IVR script and for display to human agents.

#### Does the caller hear anything when the call returns to 8x8?

Only what your script plays. Add a **Say** node on the **Resume** exit if you want to acknowledge the handback before the caller is queued or transferred.