Set Up External Routing

External routing allows you to route cases from NICE CXone to the Salesforce Omni-Channel widget. This way, your agents can use the native Omni-Channel widget screens they're familiar with to handle chats and cases.

Before completing the tasks in this topic, you need to have a campaignClosed A grouping of skills used to run reports. that you want your external routing skills assigned to. If you don't have this campaign set up yet, create one. You also need to create three ACD skillsClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge, one Studio script, and one point of contactClosed The entry point that an inbound contact uses to initiate an interaction, such as a phone number or email address.. This topic covers these tasks.

Complete each of these tasks in the order given.

Configure Salesforce for External Routing

Visit developer.salesforce.com to start. Use the search box at the top to search for Integrate External Routing for Omni-Channel. Use the instructions to finish setting up external routing in Salesforce. You need a Salesforce account with admin permissions to complete this task.

Presence Sync in the Salesforce Agent Settings should not be selected with using External Routing. If Presence Sync is selected, the Work Item will not be routed to the Salesforce Omni-Channel widget and the Work Item will be refused.

Create ACD Skills in CXone

Required permissions: Skills Create

You need to create three  ACD skillsClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge in CXone. One skill needs to be for the Work Item media type and is used for Omni-Channel. The other two need to be for the channels you're routing to the Omni-Channel widget.

Salesforce Agent does not support persistent work items. You cannot switch skills from Real-Time to persistent after they're set.

  1. Click the app selector and select ACD.

  2. Go to Contact SettingsACD Skills.

  3. Click Create New  >  Single Skill.

  4. In the Skill Information section, set the Media Type to Work Item for the first skill you create. For the other two skills, choose the media type of the channels you're routing to Omni-Channel.
  5. Enter a Skill Name that identifies which channel this skill routes.
  6. Select the Campaign you want the skill to be a part of.
  7. Configure other settings on the Name & Other Details page as needed.
  8. Click Create.
  9. Repeat this task to create two more skills.

Create a Script in CXone

Required permissionsScripts Create

The script you create reads the work item payload from the Omni-Channel skill that you created. It must map the service channel ID (received from the payload) to the skill ID.

In the script, use a Snippet Studio action to define the logical flow for routing chats and cases to one of the three skills you created earlier in this topic. You can also use the snippet to set up other variables for routing.

  1. In Studio, click File  >  New.

  2. In the Create New Script window, select Work Item as the script type. Verify that the correct Business Unit is selected and click OK.
  3. Add the Begin action, Snippet action, and Reqagent action to the canvas and connect them in this order.

  4. Double-click the Snippet action and click Text View to edit.
  5. Add scripting logic in the text editing field, following the example provided in this section.

    If you need help or have questions about coding Snippet actions, contact your CXone Account Representative.

  6. Configure the Reqagent properties according to the needs of your organization.
  7. Customize the script with additional actions if there are other things that you want to occur during messaging events, such as when the interaction begins, is transferred, or ends.
  8. Save the script.

Create a Point of Contact in CXone

Required permissionsPoints of Contact Create

  1. Click the app selector and select ACD.

  2. Go to Contact SettingsPoint of Contact.

  3. Click Create New and select Single Point of Contact.
  4. For Media Type , select Work Item.
  5. Enter a Name for this point of contact.
  6. Select the work item Skill you created for Omni-Channel.
  7. Select the Script you created to route externally to Omni-Channel.
  8. If you want the interactions that come through this point of contact to be included in IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. reporting, click IVR Reporting Enabled.
  9. Click Create Point of Contact.
  10. Copy the Point of Contact ID and save it to use when you configure Salesforce.

Create a PushTopic for External Routing

Complete this task in Salesforce. You need a Salesforce account with admin permissions to complete this task.

  1. In your Salesforce Agent organization, click your profile name > Developer Console.
  2. Select the Debug tab and click Open Execute Anonymous Window.
  3. Paste the following code into the box:

    PushTopic pushTopic = new PushTopic();

    pushTopic.Name = '{ }'; // replace {} with your desired name for push topic, within 25 characters long

    pushTopic.Query = 'Select Id, Serial, QueueId, WorkItemId, IsPushed, ServiceChannelId, LastDeclinedAgentSession, CreatedDate from PendingServiceRouting where RoutingModel =\'ExternalRouting\'';

    pushTopic.ApiVersion = 44.0;

    pushTopic.NotifyForOperationCreate = true;

    pushTopic.NotifyForOperationUpdate = true;

    pushTopic.NotifyForOperationDelete = true;

    pushTopic.NotifyForFields = 'All';

    insert pushTopic;

  4. Click Execute and the push topic is created.

Configure Salesforce Agent and Org Wide Settings

Complete this step in Salesforce. The API user that you create must have Read access to the PushTopic you created in the previous step.

  1. If you are using Salesforce Classic, click All Tabs > Salesforce Agent Settings.

    If using the Lightning Experience, click the App Launcher icon (indicated by a grid of dots) > View All > Salesforce Agent Settings.

  2. Enter the API username for Username for Salesforce API User.
  3. Enter the password for Password and Security Token for Salesforce API User.

    If your Salesforce user is not configured to have login IP ranges in the profile, you must generate a security token to enter with your password. To generate a security token, click your profile name > My Settings > Personal > Reset My Security Token. Enter the Salesforce API user password followed by the security token with no added spaces.

  4. Enter the Salesforce Push Topic Name for Salesforce PushTopic Name for PendingServiceRouting.
  5. Enter the NICE CXone Point of Contact ID for Point of Contact ID.