Appearance
Exercise 2: Configure a Service Deployment
In this exercise you will configure a Service deployment that will expose the Coral Cloud Agent to your customers directly. There are quite a few pieces that need to come together to expose an agent, and this is brought together using Omni-Channel in Service Cloud.
Step 1: Enable messaging and configure Omni-Channel
Messaging enables you to create channels to handle messages received from your customers. In this example, we will use messaging to enable customers to engage with the Coral Cloud Agent.
Enable messaging
In the Setup Quick Find, search for and select Messaging Settings.
Set Messaging to On.
Create a routing configuration
In the Setup Quick Find, search for and select Routing Configurations.
Click on New.
Set field values as follows:
Field Value Routing Configuration Name Agent Routing Configuration
Developer Name Agent_Routing_Configuration
Overflow Assignee Leave Blank Routing Priority 1
Routing Model Most Available
Push Time-out(seconds) Leave Blank Capacity Type Keep default: Inherited
Units of Capacity 2
Percentage of Capacity Leave Blank Click on Save.
Create a queue
In the Setup Quick Find, search for and select Queues.
Click on New.
Set field values as follows:
Field Value Label Messaging Queue
Queue Name Messaging_Queue Queue Email Leave Blank Send Email to Members Keep default: False
Routing Configuration Agent_Routing_Configuration
Selected Objects Messaging Session
Selected Members Admin User
Click on Save.
Create presence status
In the Setup Quick Find, search for and select Presence Statuses.
Click on New.
Set field values as follows:
Field Value Label Available
Developer Name Available
Status Options Keep default: Online
Selected Channels Messaging
Click on Save.
Create a presence status permission set
In the Setup Quick Find, search for and select Permission Sets.
Click on New.
Set field values as follows:
Field Value Label Coral Cloud Service Agent
API Name Coral_Cloud_Service_Agent
Description This permission set grants access to messaging and the Available Messaging Status.
License Keep default: None
Click on Save.
Under Apps, click on Service Presence Statuses Access.
Click on Edit.
Add Available to Enabled Service Presence Statuses.
Click on Save.
Click on Manage Assignments.
Click on Add Assignments.
Check the box next to Admin User.
Click on Save.
Click on Done.
Create a presence configuration
In the Setup Quick Find, search for and select Presence Configuration.
Click on New.
Set field values as follows:
Field Value Presence Configuration Name Messaging Presence Configuration
Developer Name Messaging_Presence_Configuration
Capacity 20
Every other value should be left to the defaults.
Click on Save.
Create a messaging channel
In the Setup Quick Find, search for and select Messaging Settings.
Click on New Channel.
Click on Start.
Select Messaging for In-App and Web.
Set field values as follows:
Field Value Channel Name Agent Channel
Developer Name Agent_Channel
Click on Save.
Step 2: Create Omni-Channel routing flows
Use Flow to route customers to an Agentforce Agent directly from your Experience Cloud site.
Create the Route to Agent flow
In Setup, search for Flow in Quick Find and select Flows.
Click New Flow.
Click on Start From Scratch.
Click on Next.
Select Omni-Channel Flow and click Create.
Open the Toolbox on the right hand side of the builder and Click on New Resource.
Open the Resources panel, by clicking the sidebar icon to the left of the Select Elements button.
Using the New Resource button, create a variables defined as follows:
Resource Type API Name Description Data Type Available for input Available for output Variable recordId
The recordId is used to assign a messaging session to an Agent.
Text ✅ Unchecked Mouse over the circle under the Start element, click +, and select Get Records.
In the right panel, configure the Get Records action as follows:
Field Value Label Get Messaging Session
API Name Get_Messaging_Session
Description Get the related messaging session that you would like to route to an agent. Object Messaging Session
Condition Requirements All Conditions Are Met (AND) Define the condition below:
Field Operator Value Id Equals $recordId Leave How Many Records to Store and How to Store Record Data to their defaults.
Mouse over the circle under the Start element, click +, and select Route Work.
In the right panel, configure the Get Records action as follows:
Field Value Label Route to Agent
API Name Route_to_Agent
Description Route the messaging session to the Coral Cloud Agent How Many Work Records to Route? Keep default: Single
Record Id Variable $recordId
Service Channel Messaging
Route To Agentforce Service Agent
Agentforce Service Agent Coral Cloud Agent
Fallback Queue Select Queue
Fallback Queue Id Messaging Queue
Click on Save.
Set the values as follows:
Field Value Flow Label Route to Agent
Flow API Name Route_to_Agent
Click on Activate.
Step 3: Update the Queue Routing flow
Use a flow to route the conversation to a queue.
Create the Queue Routing flow
In Setup, search for Flow in Quick Find and select Flows.
Open the Route to Queue Flow.
This flow is looking up a default contact, Sofia Rodriguez, for the workshop, so that we can illustrate how the agent is connected to a Contact and Case who may be starting the chat. In a real implementation, you should follow best practices to authenticate a contact and look them up in the flow before creating the case and session.
Update the messaging session
Mouse over the circle under the Get Default Case element, click +, and select Update Records.
In the right panel, configure the Update Records action as follows:
Field Value Label Update Messaging Session
API Name Update_Messaging_Session
Description Update the messaging session with the created Case Id.
How to Find Records to Update and Set Their Values Specify conditions to identify records, and set fields individually Object Messaging Session Define the condition below:
Field Operator Value Id Equals $recordId
Set the following field values:
Field Value CaseId {!Create_Case}
Add the Route Work element
Mouse under the circle under the Update Messaging Session element, click +, and select Route Work.
In the right panel, configure the Get Records action as follows:
Field Value Label Route to Queue
API Name Route_to_Queue
Description Route the messaging session to the default queue How Many Work Records to Route? Keep default: Single
Record Id Variable $recordId
Service Channel Messaging
Route To Queue
Queue Select Queue
Queue Id Messaging Queue
Click on Save As.
Click on Save.
Click on Activate.
Step 4: Update the agent and messaging channel with flows
Associate the Coral Cloud Agent to the newly created routing flows.
Add the Route to Queue flow to your agent
Click the back arrow to return to Setup.
In the Setup Quick Find, search for and select Agents.
Open the Coral Cloud Agent.
Click on the Connections tab.
Click on the Edit icon to Choose a Flow under the Outbound Omni-Channel Flow settings.
Select the Route to Queue flow.
Click on Save.
Add the Route-to-Agent flow to the messaging configuration
In the Setup Quick Find, search for and select Messaging Settings.
Open the Agent Channel.
Click on the Edit button under Omni-Channel Settings.
Configure the settings as follows:
Field Value Routing Type Omni-Flow
Flow Definition Route to Agent
Fallback Queue Messaging Queue
Click on Save.
Click on Activate.
Accept the Terms and Conditions.
Step 6: Create an embedded service deployment
Create an Embedded Service deployment that can be used to distribute your agent.
In the Setup Quick Find, search for and select Embedded Service Deployments.
Click on New Deployment.
Select Messaging for In-App and Web.
Click on Next.
Select Web.
Configure the deployment as follows:
Field Value Embedded Service Deployment Name Agent Web Deployment
API Name Agent_Web_Deployment
Domain my.site.com
Messaging Channel Agent Channel
Click on Save.
Once the save has been completed, Click on Publish.
Summary
You have just created a custom service agent that can be used to interact with your customers. Next, we will use the service deployment capabilities in Service Cloud to deploy the Agent to a customer-facing Experience Cloud site.