# Migrate Screen Pop

Replace the Open CTI screen pop pattern with an Omni-Channel flow screen pop action.

The Open CTI pattern looks like this:

```sfdocs-code {"lang":"javascript"}
sforce.opencti.screenPop({
    type: sforce.opencti.SCREENPOP_TYPE.SOBJECT,
    params: { recordId: contactId }
});
```

The screen pop in Salesforce Voice with Partner Telephony is a declarative Omni-Channel Flow action triggered at routing time, server-side. You configure it using Flow Builder, not adapter JS.

:::note
Screen pops don't work with apps that use standard navigation. Screen pops work only if a service rep is accepting work from an app using console navigation.
:::

## Build the Flow

1. In Setup, enter **Flows** in the Quick Find box, then select **Flows**.

2. Click **New Flow**, then search for and select **Omni-Channel Flow**.

3. Configure the flow by adding elements and actions. Your flow will be unique to your business logic.

   ![Example Omni-Channel flow to replace screenpop](https://a.sfdcstatic.com/developer-website/sfdocs/service-cloud/media/api-cti/cti-migrate-screenpop-example.png)

4. Save and activate your flow.

## Assign the Flow to Your Voice Channel

1. From Setup, enter **Contact Centers** into the Quick Find box, then select **Partner Telephony Contact Centers**.
2. Select your contact center.
3. Under **Channels**, select your channel and edit the **Routing** information to assign the flow.

## Full Screen Pop Migration Mapping

| Open CTI Call                                   | Omni-Channel Flow Equivalent                                     |
| ----------------------------------------------- | ---------------------------------------------------------------- |
| `screenPop(SCREENPOP_TYPE.SOBJECT, recordId)`   | Route Work → Screen Pop → SObject Record                         |
| `screenPop(SCREENPOP_TYPE.SEARCH_PAGE, params)` | Route Work → Screen Pop → Search                                 |
| `screenPop(SCREENPOP_TYPE.NEW, defaultFields)`  | Route Work → Screen Pop → New Record + field prepopulation       |
| `screenPop(SCREENPOP_TYPE.URL, url)`            | Route Work → Screen Pop → URL                                    |
| Custom lookup + `screenPop`                     | Get Records (Contact/Account by phone) + Route Work → Screen Pop |

## See Also

- [Salesforce Help: Add a Screen Pop Action to a Flow](https://help.salesforce.com/s/articleView?id=service.omnichannel_add_screen_pop_action.htm\&type=5)
- [Salesforce Help: Use Multiple Screen Pop Actions in a Flow](https://help.salesforce.com/s/articleView?id=service.omnichannel_multiple_screen_pop_actions.htm\&type=5) — useful when you need conditional pops based on call attributes (caller is known vs. unknown, calling for different products, etc.)
