Enable Bi-Directional Presence Sync in Salesforce
You can enable bi-directional presence sync for CXone Agent Embedded for Salesforce and the Omni-Channel widget. This ensures that when the agent's state The availability status of an agent changes in one of these apps, it changes in the other.
Complete each of these tasks in the order given.
Prerequisites
-
Your CXone Account Representative must enable Salesforce for your tenant High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment under Applications & Features > Adapters.
-
Users must have the CXone Agent Permission. This is managed in Salesforce under Setup > Setup > Permission Sets.
-
Users must be assigned to the NICE CXone Agent for Salesforce license. This is managed in Salesforce under Setup > Setup > Installed Packages.
Create Presence Statuses in Salesforce
If you haven't already, create presence statuses in Salesforce. These are the statuses that appear in the Omni-Channel widget. Later on, you'll map them to the CXone agent states that appear in CXone Agent Embedded for Salesforce.
-
Log in to Salesforce Lightning as an administrator.
-
Click Setup in the top right corner of the page and select Setup from the drop-down.
-
Use the Quick Find box to search for Presence, then click Presence Statuses.
-
Click New.
-
Enter a Status Name. For example, Available for Chats. The Developer Name is generated automatically; it's the Status Name without spaces. For example, Available_for_Chats.
-
Under Status Options, select one of these options:
-
Online: Make this an available status.
-
Busy: Make this an unavailable status.
-
-
If you selected Online in the previous step, add channels to the status. Under Service Channels, select a channel in the list on the left, then click Add . Repeat for each channel you want to add.
-
Click Save. Repeat these steps for each presence status you want to create.
Add Presence Statuses to User Profiles
Once you've created presence statuses, give Salesforce user profiles access to the statuses.
-
In Salesforce, use the Quick Find box to search for Profiles, then click Profiles.
-
Select the user profile you want to add presence statuses to.
-
Scroll down to the Enabled Service Presence Status Access section. Click Edit.
-
Select a status in the list on the left, then click Add . Repeat for each status you want to add.
-
Click Save. Repeat these steps for each user profile you want to add presence statuses to.
Create a Connected App
Create a connected app in Salesforce to connect Salesforce to CXone. You must configure OAuth 2.0 in this connected app so that data can be shared securely between Salesforce and CXone.
-
In Salesforce, use the Quick Find box to search for App Manager, then click App Manager.
-
Click New Connected App in the top right of the Lightning Experience App Manager.
-
Enter a Connected App Name. For example, Salesforce Connector. The API Name is generated automatically; it's the Connected App Name without spaces. For example, Salesforce_Connector.
-
In Contact Email, enter a valid email address.
-
Under API (Enable OAuth Settings), select Enable OAuth Settings and configure the fields that appear.
-
In Callback URL, enter the URL where you want the authorization code to be sent once the authentication is successful.
-
In Selected OAuth Scopes, select the following scopes and click Add :
-
Access Visualforce applications (visualforce)
-
Full access (full)
-
Manage user data via APIs (api)
-
Manage user data via Web browsers (web)
-
Perform requests at any time (refresh_token, offline_access)
-
-
-
Make sure Require Secret for Web Server Flow and Require Secret for Refresh Token Flow are selected.
-
Click Save.
Get Consumer Key and Consumer Secret
Once you've created a connected app in Salesforce, find and save its Consumer Key and Consumer Secret.
-
In Salesforce, use the Quick Find box to search for App Manager, then click App Manager.
-
In the Lightning Experience App Manager, find the connected app you created. Click Actions > View in the row for that connected app.
-
Under API (Enable OAuth Settings), click Manage Consumer Details.
-
If prompted, authenticate by entering the code sent to your email.
-
Click Copy next to Consumer Key and Consumer Secret and store them in a secure location.
Create an Account Mapping in CXone
Required permissions: Account Mapping Create
Before you can complete these steps, your CXone Account Representative needs to enable Salesforce Presence Sync for your tenant High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment under Applications & Features > Adapters.
Once you've created a connected app in Salesforce, create an account mapping in CXone to connect CXone to Salesforce.
-
In CXone, click the app selector and select Adapters.
-
Click Account Mapping in the left menu, then click the Salesforce tab.
-
Click Map Accounts.
-
In User for Access Key, select the user you want to generate an access key for. When you do this, the Access Key ID is generated automatically.
-
In the Salesforce Environment section, click ADD NEW.
-
Fill out the fields in the Add New Environment form that appears.
Learn more about fields in this stepField Details Salesforce Environment Give your Salesforce environment a name. Organisation ID
Enter your Salesforce.com organization ID. This is found in Salesforce under Setup > Setup > Company Information in the Salesforce.com Organization ID field. It's 15 characters long and typically begins with 00D.
Salesforce Platform Version Choose whether your Salesforce environment is a Salesforce Production environment or a Salesforce Sandbox. Username The username of your Salesforce administrator account. Password The password of your Salesforce administrator account. Client ID The Consumer Key of the connected app you created in Salesforce in the previous section. Client Secret The Consumer Secret of the connected app you created in Salesforce in the previous section. Email Address The email addresses associated with your Salesforce administrator account. -
Click Map & Register.
-
In the Salesforce Environment drop-down, select the Salesforce environment you just created.
-
Click Save at the top.
Create a Presence Rule
Required permissions: Rules Create
Once you've created an account mapping in Adapters, create a presence rule. This maps Salesforce statuses to CXone agent states, and CXone agent states to Salesforce statuses.
-
In CXone, click the app selector and select Adapters.
-
Click Presence Sync in the left menu, then click Get CXone Users. This refreshes the list of users.
-
Click Create Rule.
-
Give your presence rule a Name.
-
In the Publisher States section, use the ACD State and Salesforce State drop-downs to map agent states. This tells Salesforce what status to display for a CXone agent state.
For example, If you select Open in ACD State and Available for Chats in Salesforce State, the Omni-Channel widget displays Available for Chats whenever CXone Agent Embedded displays Open. Click Add Row to add more mappings.
-
In the Subscriber States section, use the Salesforce State and ACD State drop-downs to map agent states. This tells CXone what agent state to display for a Salesforce status.
For example, if you select Available for Chats in Salesforce State and Open in ACD State, CXone Agent Embedded displays Open whenever the Omni-Channel widget displays Available for Chats. Click Add Row to add more mappings.
-
Click Create.
-
To apply the presence rule to teams of users, click the Teams tab, then click Add Teams. Select the teams you want to add, then click Confirm.
-
To apply the presence rule to individual users, click the Users tab, then click Add Users. Select the users you want to add, then click Confirm.
-
Click Save.