Configure external routing of Salesforce chats

Note: This article applies to Genesys Cloud for Salesforce.

Prerequisites:
  • A Salesforce routing configuration with External Routing as the routing model.
  • A Salesforce queue linked with the external routing configuration.

After you install and configure the Omni-Channel external routing package, create a flow in Salesforce to route a Salesforce chat through Genesys Cloud. Genesys Cloud routes and delivers the chat to the appropriate agent. The agent handles the chat within Salesforce and can also transfer the chat to another agent. Genesys Cloud for Salesforce handles the life cycle of the chat within Genesys Cloud and creates an activity record in Salesforce to log all critical information.

Create a flow

A flow in Salesforce automates the routing process. You use elements, connectors, and resources to build a flow. For more information, see Flows in the Salesforce documentation.

  1. In Salesforce, create a flow using the Omni-Channel Flow template. 
    1. From Setup, search for Flows in the Quick Find box and select Flows.
    2. Click New Flow.
    3. Click All + Templates, and then click Omni-Channel Flow.
    4. Click Next, and then select Freeform to build the flow.
  2. Create the recordId and input_record variables as described in the Salesforce documentation.
  3. Drag the Route Work action onto the canvas and enter the values for the new action.
    1. Give the action a Label and API Name and optionally, a Description.
    2. Under Set Input Values > RecordID, select the recordId that you created.
    3. Under Service Channel, select the channel created for chats.
    4. Under Route To, select Queue.
    5. Under Queue, select the Salesforce queue that you want to route through Genesys Cloud.
    6. Click Done.
  4. Drag the Create Records action onto the canvas and enter the details of the record. This image shows the record creation for creating a flow in Salesforce.
      1. Type a name for the record.
      2. Select One to create a single record.
      3. Select the option Use separate resources, and literal values to set the record fields.
      4. Select the object External Routing Request from the list.
      5. Add the two fields Open_Messaging_Integration__c and Work_Item_ID__c and set the values for the fields.
        • Open Messaging Integration – Select the picklist values retrieved from Genesys Cloud.
        • Work Item ID – Select the recordId variable that you created for the Chat Transcript object.
      6. Optionally, you can also add the field Custom_Attributes__c and the values in the format customAttribute1=customAttr1, customAttribute2=customAttr2. If you are adding any Salesforce objects, use the format customAttribute={!Object.Value}.
      7. Click Done.
    Note: You can add or edit the external routing package message attributes in the OpenMessageService.apxc file except for the custom attribute, SF_ExternalRoutingWorkItemId. Ensure that you do not edit or remove the custom attribute, SF_ExternalRoutingWorkItemId. See Inbound open messages for more information about the API referenced by the routing package.
  5. Connect the Start element to the Route Work action element in the flow. 
  6. Connect the Route Work action element to the Create Record element in the flow. 
    The image shows the Salesforce Omni-Channel flow created with an action and record.
  7. Click Save.
  8. Click Activate.

Activate the Request Deletion flow

The package for external routing includes the External Routing Request Deletion flow. This flow cleans up the request records that are created when either of the following occurs:

  • Disconnected work items that are successfully routed and completed.
  • The user closes the chat before it is routed to an agent.

Activate this flow before using external routing.

  1. In Salesforce Setup, search for Flows.
  2. In the list of flows, click External Routing Request Deletion.
  3. Click Activate.

Create chat buttons

When you create chat buttons in Salesforce, you can specify how the incoming chat requests are directed to agents. In the Salesforce chat button setting, select Omni-Channel in the Routing Type field and use the Omni-Channel flow created for routing the specific queue.

The image shows the routing information selected while creating a chat button in Salesforce.

For more information about how to use Omni-Channel sync settings, see How to use Omni-Channel sync.

For more information about the integration, see About Genesys Cloud for Salesforce.