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

# Screen Pop for AI Handoffs to Your Contact Center

> Show your agents what the AI already learned, beside the call, the moment Simple AI hands a caller to a person.

When Simple AI hands a call to one of your agents, your contact center can open a page beside the call that shows the AI's summary of the call, the data it collected, and the live transcript.

## How It Works

The page lives at one address. The only part that changes per call is a token:

```text theme={null}
https://api.usesimple.ai/screen-pop#token=<token>
```

The token goes after the `#`, as `token=<token>`. That part of an address is written like a query string, and `token` is the one parameter the page reads. A browser never sends that part of an address to a server, so the token stays out of server logs on the way. The token names one call and stops working four hours after the call started. Anyone holding it can read that call's page until then, so treat it like a link to the call and do not store it longer than you need to.

Your call flow gets the token, keeps it in a call variable, and your platform's screen pop feature opens the address built from that variable. Nothing is stored in Simple AI. In the dashboard, **Configuration > CCaaS Handoffs** builds the address for your platform, lets you choose what the page shows, and previews it with one of your own calls.

## Choosing What It Shows

By default the page shows the summary, every piece of data the AI collected, and the transcript. Add options to the address to change that:

| Option | Meaning | Example |
| - | - | - |
| `show` | The sections to show: `summary`, `data`, `transcript` | `?show=summary,data` |
| `fields` | The collected fields to show, in order. Add `:Label` to name one | `?fields=order_number:Order,customer.name` |

```text theme={null}
https://api.usesimple.ai/screen-pop?show=summary,data&fields=order_number:Order,customer.name#token=<token>
```

Options go before the `#`. After it, the page reads only `token`.

The options are fixed text in the address you configure, so different queues can show different things. They tidy the page; they do not restrict access. Anyone holding the token can open the call without them.

## Getting the Token

Every call returned by the [calls API](https://docs.usesimple.ai/api-reference/calls/get-call.md) carries a `screen_pop_token`. From a call flow, the usual request is [find by attribute](https://docs.usesimple.ai/api-reference/calls/find-by-attribute.md) with the identifier your platform sent Simple AI when it forwarded the caller. Simple AI keeps every `X-` header from that first SIP message as a call parameter named `sip.headers.<header name in lowercase, dashes as underscores>`.

```bash theme={null}
curl "https://api.usesimple.ai/api/v1/calls/find_by_attribute?param_key=sip.headers.x_callsessionid&param_value=<session id>&fields=screen_pop_token" \
  -H "Authorization: Bearer <api key>"
```

## Platform Steps

### Five9

1. Add a Query module to the IVR script that calls find by attribute with `Call.session_id` and stores `screen_pop_token` in a call variable.
2. Create a connector and type the whole URL, `https://api.usesimple.ai/screen-pop#token=@<Group>.<variable>@`, with trigger **On Call Accepted** and execution mode **Use embedded tab for Web**. Leave the connector's Parameters table empty: Five9 adds parameters to the end of the URL, where they would run into the token.
3. Add the connector to the campaigns your agents take handoffs on.

### NiCE CXone

1. Before the script places the call to Simple AI, add your contact ID as a header with SIPPUTHEADER, for example `X-ContactID` = `{contactid}`.
2. After the call returns to the script, add a REST API action that calls find by attribute with `param_key=sip.headers.x_contactid` and keeps `screen_pop_token` in a variable.
3. After ONANSWER, add a POPURL action with the URL `https://api.usesimple.ai/screen-pop#token={token}` and PopDestination **ContactPanel**.

Agents who use CXone inside Salesforce get the page in a new browser tab; CXone does not embed outside pages there.

### Genesys Cloud

1. In Architect, get the token into a flow variable with a web services Data Action that calls find by attribute using the identifier you sent Simple AI.
2. Create a script with one Web Page component that fills the page, and set its source to a string variable marked as an input. Publish the script.
3. In the flow, before **Transfer to ACD**, add **Set Screen Pop**, choose the script, and set its input to `https://api.usesimple.ai/screen-pop#token=` followed by the token.

Genesys stores script inputs on the conversation, where supervisors can see them. The token expires, which is why it is safe to pass this way.

### Talkdesk

These steps assume the AI takes calls through Talkdesk's **Connect to Autopilot Voice** component, which sends Simple AI the Talkdesk interaction ID in an `X-Talkdesk-Interaction-Id` header and continues the flow at its **Escalation** exit when the AI hands the caller back.

1. In **Connections**, add a custom connection to `https://api.usesimple.ai` with authentication type **Header X API Key**, header name `Authorization`, and value `Bearer <api key>`. Give it an action that calls find by attribute with `param_key=sip.headers.x_talkdesk_interaction_id` and `fields=screen_pop_token`, taking the interaction ID as `param_value`, with `call.screen_pop_token` in its output schema.
2. In Studio, on the **Escalation** exit of Connect to Autopilot Voice, add an **Execute Action** step that runs the action with the call's interaction ID and keeps `call.screen_pop_token` in a flow variable named `screen_pop_token`. Select that variable in **Manage context** so automations can read it.
3. In **Automation Tools**, add a task with the trigger **An inbound call starts** and the action **Open URL**, with the URL `https://api.usesimple.ai/screen-pop#token={{context.screen_pop_token}}`.

To show the page inside the agent's Conversations app instead of in a browser tab, build a Workspace Designer card with an iframe whose source is the same address, reading the variable with `Context.getVariable("screen_pop_token")`.

### Amazon Connect

Amazon Connect sends Simple AI nothing to find a call by. A **Transfer to phone number** block places an ordinary phone call, with no SIP headers and no contact attributes (see [Amazon Connect](https://docs.usesimple.ai/integrations/ccaas/amazon-connect.md#what-neither-option-carries)). The lookup in step 1 therefore needs an identifier your flow gives Simple AI some other way; work that out with your account team before you build the rest.

1. In the flow of the number Simple AI hands calls back to, add an **AWS Lambda function** block with response validation set to **JSON**. The Lambda calls find by attribute with that identifier and `fields=screen_pop_token`, and returns the address as `screen_pop_url`: `https://api.usesimple.ai/screen-pop#token=` followed by `call.screen_pop_token`. The address has to be built in the Lambda, because a string map response only allows letters, digits, dashes, and underscores.
2. Add **Set contact attributes** to keep `$.External.screen_pop_url` as the user-defined attribute `screen_pop_url`.
3. Before **Transfer to queue**, add **Set event flow** with the event **Default flow for agent UI**, pointing at a flow whose **Show view** block shows the **Detail** view with a link in its attribute bar: `{"Label": "Simple AI", "Value": "Open handoff", "LinkType": "external", "Url": "$.Attributes.screen_pop_url"}`.

The agent who accepts the call opens the page from that link, in a new browser tab. Agents need the security profile permission **Agent Applications - Custom views - All** to see the view.

### Other Platforms

Any platform whose screen pop can build an address from a call variable works the same way: get the token from the API in the call flow, then open `https://api.usesimple.ai/screen-pop#token=<token>`. The page can be embedded in any agent desktop or opened in a new tab.

## Related

* [CCaaS Integrations](https://docs.usesimple.ai/integrations/ccaas/overview.md)
* [Find a call by attribute](https://docs.usesimple.ai/api-reference/calls/find-by-attribute.md)


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