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

# 8x8 Contact Center integration

> Connect Voiceflow to 8x8 Contact Center for inbound AI calls, human queue transfers and on-demand agent assist. Includes Studio, API and CLI setup.

## Overview

Voiceflow integrates with **8x8 Contact Center** to answer selected inbound calls, transfer callers to human queues and give staff on-demand policy guidance. Keep your customer-facing 8x8 number and choose which IVR branches reach Voiceflow.

Phone routing uses a Voiceflow number and a separate 8x8 number for human support. Staff assistance uses your authenticated application through 8x8's screen-pop settings. These connections do not automatically import customer records or live transcripts into Voiceflow.

### Examples of when to use 8x8 Contact Center

- **[Answer inbound calls](#routing-calls)** — resolve delivery and policy questions before they reach the queue.
- **[Human agent hand-off](#human-agent-hand-off)** — transfer callers who need a person to a staffed 8x8 queue.
- **[Add agent assist](#agent-assist)** — give staff policy guidance and customer-reply drafts alongside their interaction.
- **[Test and launch](#testing-and-launch)** — verify both telephone legs and retain the previous routing for rollback.

### What you need

- An administrator with access to **8x8 Configuration Manager**, an enabled pilot phone channel, its assigned phone script and a test phone number.
- A Voiceflow **phone project**, an editable test [Environment](/docs/documentation/deploy/environments/overview) and a connected [phone number](/docs/documentation/deploy/phone/connect-a-phone-number).
- A separate **externally dialable 8x8 human-support number** whose script bypasses the AI branch.
- For Code, cURL, jq and the current [Voiceflow CLI](/docs/cli/install) with Agent v2 support. Set `PROJECT_ID`, `ENVIRONMENT_ALIAS` and a server-side [personal or service key](/docs/api-reference/authentication) in `VF_TOKEN`. Configure [CLI authentication](/docs/api-reference/authentication#cli) with that key, or pass `--token "$VF_TOKEN"`. This key does not authorize 8x8 administration.

### Choose the connection contract

Phone routing and staff assistance have separate destinations and setup.

| Connection | Setup | What it carries |
| --- | --- | --- |
| Phone agent | 8x8 **Forward to External Number** → Voiceflow phone line. | The call's audio, without automatic record or transcript mapping. |
| Human return | Voiceflow **Call forward** → separate 8x8 phone channel and **Forward to Queue**. | A new phone leg to the human queue. |
| Staff assistant | 8x8 **Custom** screen pop → your HTTPS staff application. | Staff questions with case context authorized by your server. |

8x8's **Forward to External IVR** is a different object with SIP-dependent data exchange and a **Resume** exit. The number-based recipe below uses **Forward to External Number**, which has no exits; it does not establish an external-IVR or SIP connection. Use [Telephony](/docs/guides/integrations/phone-messaging) for general SIP setup and verify the provider-specific contract before choosing that route.

<a id="preparing-your-agent"></a>

## Preparing your voice agent

Resolve the supported customer requests before transferring callers to 8x8 Contact Center staff.

### Configure the conversation

Use short spoken replies, ask one question at a time and state when the agent should bring in a person. Attach the [Playbooks](/docs/documentation/build/playbooks), Knowledge and tools needed for the requests you actually support. Connecting an 8x8 number does not import company policies or create business-system tools.

#### Studio

### 1. Prepare the phone agent

Open the project in [Agent studio](https://creator.voiceflow.com), select the test Environment, then open **Agent → Instructions**. Define the support tasks, approved policy sources and transfer conditions. Attach the relevant Playbooks and tools, then insert their resource references in the instructions.

Voiceflow phone agent with delivery and returns Playbooks, order lookup and structured Instructions — Connect the agent's instructions to the Playbooks, Knowledge and tools that resolve the caller's request.

The example retailer uses its own order lookup service. It is not an 8x8 customer-record API.

### 2. Check speech and escalation

Configure the agent's [Voice settings](/docs/documentation/build/voice). Test a policy question, an order question and a request for a person. Configure the actual transfer destination in **Human agent hand-off** below before testing a phone transfer. Run the agent after edits to compile its Draft before calling the connected line.

#### Developer

Start with an existing phone project and attached Playbooks/tools. Save your Instructions as `agent.json`; use the names of resources already attached to that agent. These fields leave its existing resource registries and Voice settings unchanged:

```json title="agent.json"
{
  "instructions": "Help callers with delivery and returns using the attached Playbooks, approved Knowledge and order lookup tool. Ask one question at a time and keep replies short enough to speak. Confirm the order reference before looking it up. When the caller asks for a person or needs an action outside your supported tasks, use Call forward. Never claim the transfer has succeeded before the call is forwarded.",
  "buttonTool": null,
  "cardTool": null,
  "carouselTool": null
}
```

#### API

```bash title="Update the test agent"
curl --fail-with-body --request PATCH \
  "https://realtime-api.voiceflow.com/v2/stable/agent?projectID=$PROJECT_ID&environmentAlias=$ENVIRONMENT_ALIAS" \
  --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
  --data-binary @agent.json

curl --fail-with-body --request PUT \
  "https://realtime-api.voiceflow.com/v1/stable/environment/$ENVIRONMENT_ALIAS/compile?projectID=$PROJECT_ID" \
  --header "Authorization: Bearer $VF_TOKEN"
```

#### CLI

```bash title="Update the test agent"
vf agent update --project-id "$PROJECT_ID" \
  --environment-alias "$ENVIRONMENT_ALIAS" < agent.json

vf environment compile --project-id "$PROJECT_ID" \
  --environment-alias "$ENVIRONMENT_ALIAS"
```

Read the agent back with [Get agent](/docs/api-reference/agent/get-agent), setting `includeInstructions=true` to include Instructions in the response. Confirm the intended Instructions and tools remain configured. Compile the Draft after edits using **Testing and launch** below; a saved configuration is not yet proof of a working telephone conversation.

<a id="routing-calls"></a>

## Routing calls to Voiceflow

Keep your 8x8 Contact Center number and send a selected IVR branch to the AI agent.

### Assign the Voiceflow destination

Use a dedicated test line first. Your 8x8 Contact Center administrator needs the Voiceflow number and an externally reachable human fallback before editing the 8x8 phone script. Copy the full Voiceflow number, including the country code; the 8x8 script field uses digits only, as shown below.

#### Studio

### 1. Find the AI entry number

In **Agent studio**, open your phone agent's project. In the left sidebar, open **Phone numbers** and find the connected test line. Copy its full number, including the country code.

Voiceflow Phone numbers navigation and the 8x8 Contact Center AI entry line — Use this Voiceflow line as the external destination of the 8x8 Contact Center test branch.

### 2. Select the test version

Open the line's Environment assignment, choose the test Environment and **Draft**, then save. Call this number directly and confirm the intended agent answers before testing through 8x8 Contact Center.

Voiceflow phone-line assignment selecting Main Draft for an isolated 8x8 Contact Center test project — Match the line's Environment and version to the agent you are testing.

#### Developer

Use a personal or service key with access to this workspace and phone project. Set `WORKSPACE_ID` to the workspace containing the connected line. Obtain it through [Workspaces](/docs/cli/commands/workspace/list), and keep `PROJECT_ID` and `ENVIRONMENT_ALIAS` from the agent configuration above. The key needs `vf.phone-number:LIST` and `vf.phone-number:READ` for the workspace, plus `vf.phone-number:ASSIGN` on the target Environment. The number and project must belong to the same workspace.

#### API

### 1. Find the connected line

```bash title="List the workspace's phone lines"
curl --fail-with-body --silent --show-error \
  "https://realtime-api.voiceflow.com/v1/stable/phone-number?workspaceID=$WORKSPACE_ID" \
  --header "Authorization: Bearer $VF_TOKEN"
```

Select the dedicated test line from `phoneNumbers`. Set `PHONE_NUMBER_ID` to its `id`, not its E.164 `value`. Keep `value` for the 8x8 Contact Center administrator and retain its current `voice` assignment for rollback.

### 2. Pin the voice side to the test Draft

```bash title="Create assignment.json and assign the line"
jq -n --arg project "$PROJECT_ID" --arg environment "$ENVIRONMENT_ALIAS" \
  '{target:"voice",projectID:$project,environmentAlias:$environment,version:"draft"}' \
  > assignment.json

curl --fail-with-body --request PUT \
  "https://realtime-api.voiceflow.com/v1/stable/phone-number/$PHONE_NUMBER_ID/assign?workspaceID=$WORKSPACE_ID" \
  --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
  --data-binary @assignment.json

curl --fail-with-body \
  "https://realtime-api.voiceflow.com/v1/stable/phone-number/$PHONE_NUMBER_ID?workspaceID=$WORKSPACE_ID" \
  --header "Authorization: Bearer $VF_TOKEN"
```

Verify `phoneNumber.voice.projectID`, `environmentAlias` and `version` are the intended project, test alias and `draft`. Assignment changes the voice side only; it leaves SMS routing unchanged.

#### CLI

### 1. Find the connected line

```bash title="List the workspace's phone lines"
vf phone-number list --workspace-id "$WORKSPACE_ID" --output-format json
```

Select the dedicated test line from `phoneNumbers`. Set `PHONE_NUMBER_ID` to its `id`, not its E.164 `value`. Keep `value` for the 8x8 Contact Center administrator and retain its current `voice` assignment for rollback.

### 2. Assign and inspect the voice side

```bash title="Assign the test Draft and inspect the result"
vf phone-number assign --workspace-id "$WORKSPACE_ID" \
  --phone-number-id "$PHONE_NUMBER_ID" --project-id "$PROJECT_ID" \
  --target voice --environment-alias "$ENVIRONMENT_ALIAS" --version-param draft

vf phone-number get --workspace-id "$WORKSPACE_ID" \
  --phone-number-id "$PHONE_NUMBER_ID" --output-format json
```

Confirm `phoneNumber.voice` names the intended project, test alias and `draft`. The `--version-param` flag selects Draft/Published; it is not a CLI version flag. Only voice routing changes.

Compile the Draft after agent edits, then call the Voiceflow number directly. Confirm the expected greeting and two-way speech before giving the number to the 8x8 Contact Center administrator. The 8x8 script changes below use 8x8 Contact Center administration, not the Voiceflow credential.

### Route the 8x8 IVR branch

In **8x8 Configuration Manager**, use a pilot channel and phone script. Keep a direct human-support option in the IVR. Record the channel's current script before editing it.

### 1. Find the active phone script

Open **Channels → Channel List**, locate the pilot phone channel and confirm it is enabled. Note the assigned script, then open **Scripts** and edit that script. See [8x8's external-number procedure](https://help.8x8.com/docs/forward-an-8x8-contact-center-channel-number-to-an-external-number).

### 2. Add the Voiceflow destination

Under **Main IVR**, add **Forward to External Number** on the branch intended for AI. Give the object a unique label and enter the Voiceflow number in **Phone number** using digits only, including the country code. For example, Voiceflow's `+16475550123` becomes `16475550123` in this 8x8 field. Do not enter a Voiceflow resource ID.

### 3. Save and verify the enabled channel

Save the script and verify that the pilot channel still names it. Call the 8x8 pilot number and select the AI branch. Confirm the intended greeting and two-way audio. Voiceflow publication and 8x8 script saving are separate operations.

### Plan unavailable-destination handling

**Forward to External Number** has no exit branches. It does not provide the **Resume** behavior of **Forward to External IVR**. Keep a human option before forwarding and test what the caller experiences when the destination cannot answer. Use the recorded channel/script assignment to restore the prior route if the pilot fails. See [8x8 phone IVR objects](https://help.8x8.com/documentation/docs/summary-of-phone-ivr-script-objects).

### Keep customer context explicit

- **Call data:** external-number forwarding does not map 8x8 script variables, records or transcripts into Voiceflow.
- **Identity:** caller ID is not account authentication. Verify protected requests through your own trusted service before returning customer data.
- **Continuation:** use the separate human-support route below; do not assume that forwarding resumes the original 8x8 phone script after the conversation.

<a id="human-agent-hand-off"></a>

## Human agent hand-off

Transfer callers to a separate 8x8 Contact Center number that reaches a staffed queue.

### Prepare the 8x8 human route

Use a separate enabled phone channel and externally dialable 8x8 number. Its script must lead to staff without forwarding back to Voiceflow.

### 1. Select the receiving queue

In **Configuration Manager → Scripts**, edit the human-support script. Add **Forward to Queue** and choose the receiving **Queue name**. Set **Queue timeout** to your accepted waiting time; 8x8 permits 5–20,000 seconds. Have a pilot agent sign in and become available in that queue.

### 2. Configure waiting and unavailable-agent treatment

Configure **In Queue**, **Queue Timeout** and **Overload** treatment. Use the overload conditions to cover your no-agent and waiting-threshold policy. If hours control is required, use a **Schedule** object before the queue and configure its open, closed and exception paths. Choose a deliberate announcement, voicemail or other staffed route for callers who cannot be served.

### 3. Save and prove the human number

Save the script. In **Channels → Channel List**, confirm the separate human channel is enabled and assigned to it. Call the number directly and verify a teammate answers without entering the AI menu. Give the full country-code number, with `+`, to the Voiceflow builder for Call forward.

The [8x8 IVR object reference](https://help.8x8.com/documentation/docs/summary-of-phone-ivr-script-objects) defines the queue and schedule controls. Keep the return route independent from the public AI-entry branch.

### Configure Call forward

Use **Call forward** when the caller requests a person or needs an action outside the AI agent's supported tasks. Set the destination to the dedicated 8x8 Contact Center human-support number, not the public number that routes to AI.

For inbound calls, **Caller ID passthrough** is off by default, so the receiving 8x8 Contact Center route can see the Voiceflow line rather than the original caller number. Enable it only when you want to pass through the caller ID Voiceflow received, and test the result through both telephone legs. The first 8x8 Contact Center transfer may already have changed it; caller ID remains separate from customer authentication.

#### Studio

### 1. Open the phone agent's transfer tool

In **Agent studio**, select the test Environment and open **Agent → Call forward**. Enable the tool and choose **Phone number**.

### 2. Set the human destination

Enter the dedicated 8x8 Contact Center return number with its country code. Describe the requests that require a person, then close the editor to return to the agent.

Voiceflow Call forward configured with the separate 8x8 Contact Center human-support number — Forward to the human-only 8x8 Contact Center number, never to the public number's AI branch.

### 3. Test with an answered call

Use a connected telephone line for the transfer check below: prototype test calls cannot forward.

#### Developer

Save this configuration as `transfer.json`, replacing the illustrative number with your actual human-only 8x8 Contact Center number. Updating the tool replaces its settings; preserve existing extension, message or caller-ID options if you use them.

```json title="transfer.json"
{
  "callForwardTool": {
    "enabled": true,
    "addressType": "phone",
    "address": "+14155550145",
    "callerIDPassthrough": false,
    "description": "Transfer when the caller asks for a person or needs an account action outside the AI agent's supported tasks.",
    "messages": null,
    "toolSound": null
  }
}
```

#### API

```bash title="Set the human destination"
curl --fail-with-body --request PATCH \
  "https://realtime-api.voiceflow.com/v2/stable/agent?projectID=$PROJECT_ID&environmentAlias=$ENVIRONMENT_ALIAS" \
  --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
  --data-binary @transfer.json
```

#### CLI

```bash title="Set the human destination"
vf agent update --project-id "$PROJECT_ID" \
  --environment-alias "$ENVIRONMENT_ALIAS" < transfer.json
```

Read the agent back, confirm the return number, compile the test Draft and place a real call through 8x8 Contact Center. A successful PATCH or CLI exit does not prove the receiving queue answered.

Set `callerIDPassthrough` to `true` for the optional inbound behavior described above; the example retains the default.

### Understand what crosses the transfer

Test by calling through the 8x8 test number and asking the AI for a person. Have a teammate answer the human queue; confirm two-way audio and that the AI stops speaking.

- **Queue selection:** 8x8's receiving Forward to Queue object chooses the queue. Call forward dials a phone number, not a 8x8 Contact Center queue ID.
- **Customer context:** this phone transfer does not deliver an automatic summary, transcript or 8x8 Contact Center call variables. Have the human confirm the case reference, or implement a separately authorized business-system context exchange.
- **Failures:** a rejected forward can end the call; this path does not expose an automatic Voiceflow busy/no-answer recovery branch. Test the destination's configured hours and unavailable-agent behavior.

<a id="agent-assist"></a>

## Adding agent assist

Give staff policy guidance and reply drafts alongside their 8x8 interaction.

This is an on-demand assistant, separate from the caller's phone session. Staff ask a question and review the suggestion before speaking or sending it to the customer. The recipe does not listen to calls, transcribe audio or send customer replies automatically.

Use a separate assistant with approved Knowledge, task Playbooks and only read-only tools/Workflows and no customer-mutating tools or Workflows. The staff endpoint authorizes case access; it does not restrict which tools the agent can execute.

### Prepare the staff assistant

#### Studio

Open a separate **Chat** staff-assistant project in **Agent studio → Agent → Instructions**. Tell it to answer the staff member, use approved Knowledge and label suggested customer replies. Keep the assistant read-only; the application below does not propagate staff permissions into agent tool calls.

Staff assistant Instructions for policy guidance and reviewed customer reply drafts — Keep suggestions staff-facing and require human review before replying to the customer.

Publish to a dedicated test Environment. Give your integration developer the project ID and Environment alias, and provision a server credential through your team's secret-management process. Obtain the authenticated application URL and screen-pop setup from the integration developer before continuing below.

#### Developer

Your Voiceflow builder or integration developer prepares a separate **Chat** project with at least one task Playbook and approved Knowledge, sets staff-facing Instructions and publishes its test Environment. Use the [agent-assist setup guide](/docs/guides/integrations/contact-centers/agent-assist) for the project and context workflow, [Agent v2](/docs/api-reference/agent/update-agent) to configure it and [Publish Environment](/docs/cli/commands/environment/publish) to create its Published version. Read the agent back and confirm every attached tool/Workflow is read-only; Instructions alone do not restrict tool execution.

Set `VF_ASSIST_PROJECT_ID` to that separate project's ID, `VF_ASSIST_ENVIRONMENT_ALIAS` to its published test Environment and `VF_ASSIST_API_KEY` to a server-side personal/service credential authorized to read/run that project. Keep these separate from the phone project's configuration. Have the builder verify an approved policy answer before connecting staff. Download [assist.mjs](/docs/examples/contact-center-assist/assist.mjs) and [client.mjs](/docs/examples/contact-center-assist/client.mjs). Mount the handler as a same-origin `POST /api/agent-assist` route in your Node.js 22+ staff application:

```js title="Authorize the staff member and selected case"
import { createAssistHandler } from './assist.mjs';

export const POST = createAssistHandler({
  projectID: process.env.VF_ASSIST_PROJECT_ID,
  environmentAlias: process.env.VF_ASSIST_ENVIRONMENT_ALIAS,
  apiKey: process.env.VF_ASSIST_API_KEY,
  requireStaff,
  loadCaseForStaff,
});
```

Implement `requireStaff(request)` with the application's verified staff session. Implement `loadCaseForStaff(staff, caseId)` against your trusted case service: return `{id: caseId, context: approvedText}` only if that staff member can read the case; otherwise return `null`. Set the allowed fields on the server. An 8x8 sign-in or browser-supplied case ID is not authorization to your case service. Apply your host's CSRF protection for cookie sessions.

The handler starts an isolated Voiceflow session, sends `launch`, then streams the staff question with the authorized context. Voiceflow credentials and runtime session keys stay on the server. Build a case picker from the staff member's authorized cases; a 8x8 telephone transfer does not populate it automatically.

```js title="Request a suggestion from the embedded application"
import { askAssist } from './client.mjs';

let pending;
const clear = () => {
  pending?.abort();
  pending = undefined;
  output.textContent = '';
};
casePicker.addEventListener('change', clear);
window.addEventListener('pagehide', clear);
askButton.onclick = async () => {
  clear();
  const caseId = casePicker.value;
  if (!caseId) return;
  const active = pending = new AbortController();
  try {
    for await (const text of askAssist({
      caseId, question: questionInput.value, signal: active.signal,
    })) {
      if (pending === active && casePicker.value === caseId) output.textContent += text;
    }
  } catch {
    if (pending === active && !active.signal.aborted) {
      output.textContent = 'Assistance unavailable. Try again.';
    }
  }
};
```

`casePicker`, `questionInput`, `askButton` and `output` are elements in your application's UI. Populate the picker through an authenticated case-list endpoint; reauthorize each request in the handler. Clear its selection and any pending answer when staff finish or change the case. Render suggestions with `textContent`, not `innerHTML`.

### Receive the screen pop in your application

#### Studio

Your integration developer must deploy the HTTPS staff application, a `POST /screen-pop` launch route and the authenticated assistance endpoint. Obtain the application URL and staff access before changing 8x8 settings. The screen-pop launch alone does not sign staff into the application or select an authorized case.

#### Developer

8x8 posts interaction fields to the configured screen-pop URL. Mount [screen-pop.mjs](/docs/examples/8x8-contact-center/screen-pop.mjs) at `/screen-pop` in the same application as `/assist` and `/api/agent-assist`. It accepts the launch and redirects to `/assist` without copying posted fields into HTML, a URL or an authenticated session:

```js title="Launch the staff application after an 8x8 screen pop"
import { handleScreenPop } from './screen-pop.mjs';

export const GET = handleScreenPop;
export const POST = handleScreenPop;
```

Configure your host's body-size limit for this launch route. It intentionally does not use ANI, event or case fields as authentication or select a case from them. The `/assist` page still requires your verified staff sign-in and authorized case picker; `/api/agent-assist` retains its separate case authorization and CSRF protection. See [8x8's HTTP POST screen-pop contract](https://help.8x8.com/documentation/docs/configure-screen-pop-for-inbound-calls).

### Show assistance beside the interaction

For a pilot tenant using **Customer 360 without Local CRM**, 8x8 supports a **Custom** screen pop in the Customer management workspace or a separate window. Have the 8x8 administrator review the existing CRM configuration first. Replacing its **Target Type** or disabling its CRM landing page can displace the current CRM integration. If that integration must stay, use the assistant's authorized standalone URL alongside Agent Workspace until your administrator has integrated its launch into the existing CRM.

### 1. Prepare staff access

Obtain the developer's HTTPS `/screen-pop` URL and sign in to the assistant at its `/assist` URL. Verify allowed and denied case access before embedding it. The application must allow the actual 8x8 frame origins and support sign-in in the embedded browser context; use the separate-window option if embedded sign-in is blocked.

### 2. Configure the pilot screen pop

In **8x8 Configuration Manager → Integration → Screen Pop**, enable **Enable Screen Pop**, select **Custom** as **Target Type** and enter the HTTPS `/screen-pop` **URL**. For the described Customer 360 setup without Local CRM, disable **Enable 8x8 CRM** in **Landing Pages**. Preserve the prior settings for rollback.

### 3. Choose when and where the application opens

Under **Trigger A Popup Window**, select **When an agent accepts an interaction** for **Phone**. Leave **Open new window for screen pop** disabled to display the custom page in the Customer management workspace beside Customer 360, or enable it for a separate browser window. **Save** the configuration. See [Customer 360 configuration](https://help.8x8.com/documentation/docs/about-8x8-customer-360) and [screen-pop events](https://help.8x8.com/documentation/docs/configure-screen-pop-for-inbound-calls).

### 4. Check a real staff interaction

Accept a pilot call in **8x8 Agent Workspace**. Confirm the assistant opens, sign in and select an authorized case. Ask for policy guidance and review the response before using it with the caller. Change cases while a response is pending: the old request must abort and its output must clear. Close the interaction and clear the selected case before the next customer.

### Keep assistance separate from call control

- **Case selection:** use the application's authorized case picker. This procedure does not automatically feed 8x8 Contact Center's current call or live transcript into the assistant.
- **Read-only scope:** the assistant suggests answers; it does not update 8x8 Contact Center records, transfer a live call or send a customer reply.
- **Authentication:** an 8x8 sign-in, iframe variable or browser message does not authorize access to your case service. The application must verify that access on every request.

<a id="testing-and-launch"></a>

## Testing and launching

Prove the telephone and staff-assistance paths before routing customer traffic.

### Compile and call the test Draft

#### Studio

After changing the agent, run a test from **Agent → Run**. Keep the isolated phone line assigned to the test Environment's **Draft**, then place a real call through the 8x8 test number. Studio's test conversation alone cannot verify external telephone routing.

#### Developer

Compile after agent or tool edits. The line assigned earlier must target this same Environment's Draft:

#### API

```bash title="Compile the test Draft"
curl --fail-with-body --request PUT \
  "https://realtime-api.voiceflow.com/v1/stable/environment/$ENVIRONMENT_ALIAS/compile?projectID=$PROJECT_ID" \
  --header "Authorization: Bearer $VF_TOKEN"
```

#### CLI

```bash title="Compile the test Draft"
vf environment compile --project-id "$PROJECT_ID" \
  --environment-alias "$ENVIRONMENT_ALIAS"
```

Confirm the compile succeeds, then call the 8x8 test number. This is the phone path; creating a text runtime session is not an equivalent test.

### Exercise the complete journey

- **Self-service:** a policy question and a real test-order question reach the intended Playbook and produce spoken replies.
- **Human agent hand-off:** a request for a person reaches the human-only 8x8 Contact Center number, a teammate answers and both parties can hear each other. Confirm no route loops back to the AI branch.
- **Unavailable destination:** call the AI branch with an unavailable Voiceflow destination; separately test the human route's Queue Timeout, Overload and configured Schedule paths. External-number forwarding has no failure/resume exits.
- **Caller exit:** hang up during the AI conversation; verify the telephone leg ends. Check that the external destination does not leave a connected call leg behind.
- **Agent assist:** confirm sign-in, allowed/denied case access and clearing a pending answer when changing case inside the configured 8x8 screen pop and authenticated assistant.

### Publish and retain rollback

#### Studio

In the test Environment, choose **Publish**, enter a release name and publish the tested configuration. Open **Phone numbers**, select the connected line's Environment assignment, change **Draft** to **Published** and save. Keep the intended Environment selected.

#### Developer

Publish only after the Draft telephone checks pass. This creates a release and updates that Environment's Published version:

#### API

```bash title="Publish the tested Environment"
curl --fail-with-body --request POST \
  "https://realtime-api.voiceflow.com/v1/stable/environment/$ENVIRONMENT_ALIAS/publish?projectID=$PROJECT_ID" \
  --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
  --data '{"name":"8x8 Contact Center phone pilot","description":"Verified AI entry and human return route."}'

jq '.version = "published"' assignment.json | \
  curl --fail-with-body --request PUT \
    "https://realtime-api.voiceflow.com/v1/stable/phone-number/$PHONE_NUMBER_ID/assign?workspaceID=$WORKSPACE_ID" \
    --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
    --data-binary @-
```

#### CLI

```bash title="Publish the tested Environment"
vf environment publish --project-id "$PROJECT_ID" \
  --environment-alias "$ENVIRONMENT_ALIAS" --name '8x8 Contact Center phone pilot' \
  --description '"Verified AI entry and human return route."'

vf phone-number assign --workspace-id "$WORKSPACE_ID" \
  --phone-number-id "$PHONE_NUMBER_ID" --project-id "$PROJECT_ID" \
  --target voice --environment-alias "$ENVIRONMENT_ALIAS" --version-param published
```

Check the returned release/Environment, then read the phone line back using the API or CLI **get** command above. Confirm `phoneNumber.voice.version` is `published` with the intended project and Environment alias. Publishing alone does not change a Draft line's assignment. The API procedure reuses `assignment.json` from **Routing calls to Voiceflow**.

Call the Published line again before changing the public 8x8 number to the approved phone script. Retain the previous 8x8 channel/script assignment and the prior Voiceflow release so the administrator can restore routing if the live test fails.

Use the shared [Test and launch your integration](/docs/guides/integrations/contact-centers/test-connection) guide for the release handover.
