IBM Cloud Docs
Integrating with phone and Genesys Cloud

Integrating with phone and Genesys Cloud

IBM CloudPlus

You can use the phone integration to help your customers over the phone and transfer them to live agents inside of Genesys Cloud. If in the course of a conversation with your assistant, a customer asks to speak to a person, you can transfer the conversation directly to a Genesys Cloud agent.

Before you begin

To use this integration pattern, you need:

  • watsonx Assistant Plus or Enterprise plan (required for phone integration).
  • A working assistant that you are ready to deploy.
  • A Genesys Cloud account.

Integrating with Genesys Cloud

To integrate your assistant with Genesys Cloud, follow these steps:

  1. Log in to the Genesys Cloud console.

  2. Click Admin.

  3. On the Telephony tab, click Trunks.

  4. In the External Trunks section, click Create new. Specify the following information:

    • In the External Trunk Name field, type a descriptive name (for example, Watson).

    • In the Type field, select BYOC Carrier and then Generic BYOC Carrier.

    • In the Inbound SIP Termination Identifier field, specify any name that you want to use (for example, Watson). This value is not used for now, but it is required by Genesys Cloud.

    • In the Protocol field, select TLS.

    Genesys create trunk

  5. Under Outbound, scroll to the SIP Servers or Proxies section.

    • In the Hostname or IP Address field, type the SIP URI (not including sips:) from your watsonx Assistant phone integration settings.

    • In the Port field, type 5061.

    Click the + button.

    Currently, SIPS and digest authentication are supported.

  6. Under SIP Access Control, add the IP addresses for the data center where your assistant is located.

    Data center IP addresses
    US-South 67.228.108.82
    169.63.5.162
    150.239.30.146
    US-East 52.116.100.158
    169.61.70.162
    169.59.136.194
    EU-DE 161.156.178.162
    169.50.56.146
    149.81.86.82
    EU-GB 158.176.120.162
    141.125.102.34
    158.175.99.34
    AU-SYD 168.1.47.2
    135.90.86.50
    168.1.106.130
    JP-TOK 165.192.69.82
    128.168.105.178
    161.202.149.162
  7. Under Identity, toggle the Address Omit + Prefix switch to Disabled.

    Disable address omit + prefix

  8. Under Media, remove Opus from the Preferred Codec List. Click Select a Codec and then select g729 to add it to the list. Leave PCMU as the first item in the list.

    Genesys select codec

  9. Under Protocol

    • In the Header/Invite section, toggle the Conversation Headers switch to Enabled.

    • Enable Take Back and Transfer.

  10. Click Save External Trunk.

  11. Under Sites, select the existing site that you want to use this trunk with. To create a new site, specify a name and location, and click Create.

  12. Click Number plans. Create a number plan and specify the following information:

    • In the Number Plan Name field, type a descriptive name (for example, Watson).

    • For Match type, select E. 164 Number List.

    • In the Numbers field, type a number in the Start and End fields. You can make up any number to use as an identifier to assign to Watson. Specify the same number in both fields.

      To create a PSTN number you can give to your clients, you must create a Direct Inward Dialing (DID) or Bring Your Own Carrier (BYOC) number. For more information, see the Genesys documentation.

    • In the Classification field, type a classification name (for example, Watson).

    Click Save Number Plans.

    Genesys number plan

  13. Click Outbound Routes. You can either edit the default outbound route or create a new one. Specify the following information:

    • In the External Trunks field, click Select External Trunks. Select the trunk that you created for watsonx Assistant.

    • In the Classifications field, add the applicable classifications. You need to include National and the classification you created for watsonx Assistant earlier. (The National route is used only to simulate the call to ensure that the trunk is operational.)

    • Toggle the State switch to Enabled.

    Genesys outbound route

  14. Click Save Outbound Routes.

  15. Go to the Simulate Call tab, and click the Simulate Call button. The trunk should show as operational. No actual call is made during the simulation.

    Genesys simulate call

  16. Go to Phone Management and click Create new.

    • In the Phone Name field, enter a descriptive name.

    • In the Base Settings field, select WebRTCPhone.

    • In the Site field, select the site that you want to use.

    • In the Person field, select yourself.

  17. In the watsonx Assistant user interface, create a new phone integration.

    • When prompted, select Use an existing phone number with an external provider.

    • Enter the phone number that you assigned in the Genesys Number Plans setting. It is not necessarily a real phone number; it is an identifier that you assigned.

    • Complete the phone integration setup process. For more information, see Integrating with phone.

    • After the phone integration is set up, go to the SIP trunk tab and deselect the Don't place callers on hold while transferring to a live agent option.

  18. In the Genesys Cloud console, click the circle in the upper left. Select Phone, and then choose the phone that you created in the Phone management section. Set yourself as available. The phone icon on the left is now active.

  19. Click + to start a new call. Specify the number that you assigned to watsonx Assistant, and then click Dial. You should hear your assistant speak.

If you encounter errors, click Performance -> Interactions and view the PCAP file to read the diagnostics.

Transferring to a live agent

Now that your Genesys Cloud environment can connect to watsonx Assistant, you can set up the ability for your assistant to transfer calls back to your live agents.

  1. In the Genesys Cloud console, go to DID Numbers -> DID Ranges and create a new range.

    • In the DID Start and DID End fields, specify a phone number. (You do not need to use a real phone number; you can make up an identifier for your Genesys environment, such as 1-888-888-1234.)

    Genesys create range

    • In the Service Provider field, enter a descriptive name (for example, Watson).
  2. If you did not set up a queue to enable callers to wait for available agents, follow these steps to create one.

    1. Click Admin.

    2. Under Contact Center, click Queues.

    3. Create a queue, and give it a descriptive name.

    4. Add yourself as a member.

    5. Click Save.

  3. Create a simple call flow. Your business might already have something more complex for routing.

    1. Click Admin.

    2. Click Architect.

    3. In the Flows: Inbound Call section click + to create a new flow. Give it a descriptive name (for example, Escalate to Agent).

    Genesys create flow

    1. In the toolbox, click Task and drag it into Reusable Tasks.

    Genesys task

    1. From your toolbox under Data, drag a Set Participant Data widget into the first action. Click on the widget and specify an attribute that is named uuiData. For the value to assign, choose the Expression type and enter Call . UUIData.

    2. From your toolbox, under Transfer, drag the Transfer to ACD widget into the first action.

    Genesys transfer widget

    1. Select the queue that you want to use.

    2. In the toolbox, click the Disconnect widget and drag it into the action after Failure. (This tool disconnects the call if transfer fails.)

    3. Click the three dots under Reusable tasks and click Set this as the starting task. You can remove the Initial Greeting because your assistant speaks before handing off the call.

    4. Click Publish in the menu bar to make this transfer live.

    5. Return to the main Genesys Cloud console.

    6. Click Admin and then navigate to Call Routing in the Routing section.

    7. Give the route a descriptive name (for example, Escalate to Agent).

    8. Under Regular Routing, for all calls, select your new flow.

    9. Assign the DID number that you previously created.

    10. Click Save.

  4. Make sure that your assistant is configured to transfer calls to an agent by using the Connect To Agent response_type. For more information, see Transferring a call to a live agent.

    For the sip.uri parameter, use the DID number that you created in Genesys Cloud, and the inbound SIP URI from your Genesys trunk. Use the following format:

    {
      "generic": [
        {
            "response_type": "connect_to_agent",
            "transfer_info": {
              "target": {
                "service_desk": {
                  "sip": {
                    "uri": "sip:+18883334444\\@example.com",
                    "transfer_headers_send_method": "refer_to_header"
                  }
                }
              }
            },
            "agent_available": {
              "message": "Ok, I'm transferring you to an agent"
            },
            "agent_unavailable": {
              "message": ""
            }
        }
      ]
    }
    

    Make sure you use the \\ escape characters so watsonx Assistant does not misinterpret the @ as part of the entity shorthand syntax.

  5. Make a test call and say something that initiates a transfer to an agent. In your Genesys Cloud console, you can see the transfer take place.

Share the conversation history with service desk agents

To enable the service desk agent to get a quick view of the conversation history between the visitor and the assistant, set up the watsonx Assistant Agent App app for your Genesys Pure Cloud Environment. For more information, see the Genesys starter kit.