---
schema_version: "1"
id: 155c3f97d232da52a8faf8b2ea2d545d87e83a4ea72a248ab724108388baa95e
title: Integrate Open CTI with Lightning Flow for Service
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce_guided_engagement/guides/guided-engagement-integrate-cti.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-integrate-cti.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 137224378a05cb7748a6c98e37aa2ee69377eef7af0f400742af71d1b61d4cb0
products:
  - Lightning Flow for Service Developer Guide
  - Service Cloud Developer Content
---

# Integrate Open CTI with Lightning Flow for Service

Open CTI provides a set of APIs that enables third-party telephony services to integrate with Salesforce. Lightning Flow for Service takes advantage of three Open CTI methods: `getSoftphoneLayout()`, `screenPop()`, and `searchAndScreenPop()`.

1.  Update your Open CTI implementation to allow incoming calls to screen-pop to flows.

    You can also pass call data, such as the phone number or customer name, directly to a flow when it’s screen-popped.

    Use Open CTI API version 42.0 and later with the following methods.

    -   [getSoftphoneLayout()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_getsoftphonelayout_lex.htm)
    -   [screenPop()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_screenpop_lex.htm)
    -   [searchAndScreenPop()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_searchandscreenpop_lex.htm)
    **note:** Before updating your implementation, make sure that you understand how Open CTI arguments are passed.

    Flows can accept input variables, which are also called arguments. The Actions & Recommendations component on a record page automatically attempts to pass the parent record ID to the flow. To use this information, the flow defines an input variable called `recordId` of type `Text`. The Open CTI API allows for more complex variable passing. Single variables and collection variables, like lists and arrays, can be passed through the `flowArgs` parameter available in the `screenPop` and `searchAndScreenPop` methods.

2.  [Create flows](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-flow.md).

    For example, create an Unknown Caller screen flow for when there’s an incoming call and there’s no match in Salesforce for the caller. In Flow Builder, create a screen flow to verify the caller.

    -   Add a screen with input components First Name, Last Name, Phone Number, and Address.
    -   Add the Create Records element to create a contact and set the contact fields using the screen input components.
    -   Connect the start element to the Unknown Caller screen.
    In addition to the Unknown Caller flow, create other flows and actions that you want your agents to use when talking to customers on the phone.

3.  Configure screen-pop settings in the softphone layout.

    From Setup, go to the Softphone Layouts page.

    For No matching records, select **Pop to flow**. Then select the flow you created for Unknown Callers.

    **note:** When you use the Pop to flow option, flows open as primary tabs in the console.

    For Single-matching records, select **Pop detail page**. This setting allows the contact record page, for example, to be popped.

    ![Screen shot of the Screen Pop Settings page.](https://developer.salesforce.com/docs/media/guided_engagement_open_cti_pop_settings.png)

4.  Create an Actions & Recommendations deployment and configure default actions for the phone channel.

5.  [Customize the record page](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-component.md).

    Add the Actions & Recommendations component to a record page, such as the contact page. Select the deployment in the component properties. When calls match a Salesforce record and users get popped to that page, they can see which actions to complete for the call.


**See Also**  


-   [*Open CTI Developer Guide*](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_intro.htm)
-   [*Salesforce Help*: Designing a Custom Softphone Layout](https://help.salesforce.com/articleView?id=cti_admin_phonelayoutscreate.htm)
-   [*Salesforce Help*: Assigning a Softphone Layout to a User Profile](https://help.salesforce.com/articleView?id=cti_admin_phonelayoutsassign.htm)
-   [*Lightning Components Developer Guide*: Set Flow Variable Values from a Lightning Component](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_inputs_set.htm)
