Learn What’s New with Agentforce and Service Cloud
Learning Objectives
After completing this unit, you’ll be able to:
- Build an agent that answers questions based on knowledge articles.
- Connect an agent to a digital channel.
AI agents are only as helpful as the data they can access. By configuring an Agentforce Data Library (ADL) to use knowledge articles, you give your agent a rich, searchable source of information to answer questions accurately and consistently.
Knowledge articles provide trusted, internal documentation that can power AI-generated responses for customers and employees alike.
Set Up a Data Library with Knowledge Articles
Agentforce Data Libraries work with Data Cloud and are key to grounding your AI with enterprise content. This update is available for Lightning Experience, Enterprise, and Unlimited Editions with the Einstein for Sales, Einstein for Platform, or Einstein for Service add-on. Before you begin, make sure:
- Data Cloud is enabled in your org.
- You have the Data Cloud Admin permission set.
From there, here’s how you can get started.
- Create a new data library and give it a unique, descriptive name.
- Select the data source for your library—options include knowledge articles, file uploads, or web search. The selected data source is indexed in Data Cloud, where a search index and retriever are automatically generated for you. When the library is used with AI agents, its search index and retriever power the Answer Questions with Knowledge action.
- Assign data libraries to features. For more information, review Setting Up Data Libraries.
- To ensure everything works as expected before deploying, test your data library in a Salesforce sandbox—a safe environment for development, testing, and training. Agentforce Data Libraries are supported in all sandbox types: Developer, Developer Pro, Partial Copy, and Full Copy.
Connect Agents to Digital Channels
Connecting AI service agents to digital customer channels enables your business to automate support across popular messaging platforms such as WhatsApp, Facebook Messenger, and more. This connection involves configuring Omni-Channel routing in Service Cloud, creating service deployments, and managing conversations so your agent can interact seamlessly with customers.
Prerequisites and Editions
- Available in Lightning Experience.
- Available in Performance, Unlimited, and Developer Editions with the Einstein for Service, Einstein Platform, or Agentforce Service Agent add-on.
- User permissions required to manage agents:
- Manage Agentforce Service Agents AND Manage AI Agents OR
- Customize Application permissions
- Manage Agentforce Service Agents AND Manage AI Agents OR
Supported Languages, Models, and the Trust Layer
Agentforce Service Agents support over 25 languages and locales, including English (US, UK, Australia), French (France, Canada), German, Japanese, Spanish (Mexico, Spain), Portuguese (Brazil, Portugal), and several languages in beta such as Danish, Finnish, Swedish, and Korean.
The primary large language model (LLM) supported is OpenAI GPT-4o, integrated via the Einstein Trust Layer. This layer provides critical AI safety features.
- Zero data retention policy: No customer data is stored or used for model training by third parties.
- Dynamic grounding: Ensures responses reference trusted company data or configured knowledge bases.
- Prompt defense: Detects and mitigates harmful or inaccurate LLM outputs.
- Toxicity detection: Flags potentially harmful responses.
- Audit and feedback: Logs all prompts and responses to provide visibility and improve the system.
Configure Service Agent Deployment
Deploying an Agentforce Service Agent involves multiple key components in Salesforce Service Cloud and Messaging. Let’s take a look.
Enable Messaging and Configure Omni-Channel
- Go to Setup > Messaging Settings and toggle Messaging to On.
- Create a routing configuration: In the Quick Find box, search for and select Routing Configurations.
- Click New.
- Set the 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 Save.
Next, create a queue.
- From Setup, in the Quick Find box, search for and select Queues.
- Click New.
- Then, set the following values:
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 Save.
Now, define a Presence Status.
- In the Quick Find box, search for and select Presence Statuses.
- Click New.
- Set fields as follows:
Field | Value |
---|---|
Label | Available |
Developer Name | Available |
Status Options | Keep default: Online |
Selected Channels | Messaging |
- Click Save.
- From Setup, in the Quick Find box, search for and select Permission Sets.
- Click New.
- Set field values as follows, and then click Save.
Field | Value |
---|---|
Label | Agentforce Service Agent |
API Name | Agentforce Service Agent |
Description | This permission set grants access to messaging and the Available Messaging Status. |
License | Keep default: None |
- Click Save.
- Under Apps, click Service Presence Statuses Access.
- Click Edit.
- Mark Selected to previously created Available Service Presence Statuses.
- Click Save.
- Click Manage Assignments.
- Click Add Assignments.
- Check the box next to Admin User.
- Click Save.
- Click Done.
- In the Setup Quick Find, search for and select Presence Configuration.
- Click 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 Save.
- From Setup, in the Quick Find box, search for and select Messaging Settings. Click New Channel > Start > Messaging for In-App and Web.
- Set the following field values, and then Click Save.
Field | Value |
---|---|
Channel Name | Agent Channel |
Developer Name | Agent_Channel |
Nice! Now, let’s focus on creating an Omni-Channel routing flow.
Build an Omni-Channel Flow to Route Messages
Use Flow Builder to create an Omni-Channel Flow named Route to Agent that can:
- Retrieve the relevant Messaging Session record.
- Route the session to your Agentforce Service Agent.
- Specify a fallback queue to handle overflow or unavailable agents.
- Activate this flow once configured.
- In Setup, in the Quick Find box, search for and select Flows.
- Click New Flow > Start From Scratch > Next.
- Select Omni-Channel Flow and click Create.
- Open the Toolbox.
- Click New Resource.
- Open the Resources panel.
- Click New Resource.
- Define the following variables:
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 | Checked | Unchecked |
- Click + and select Get Records.
- 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. |
Data Source | Salesforce Object |
Object | Messaging Session |
Condition Requirements | All Conditions Are Met (AND) |
- Define the conditions as follows:
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.
- 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 | Agentforce Service Agent |
Fallback Queue | Select Queue |
Fallback Queue Id | Messaging Queue |
- Click Save.
- Set the following values:
Field | Value |
---|---|
Flow Label | Route to Agent |
Flow API Name | Route_to_Agent |
- Click Activate.
Associate the Flow with Your Messaging Channel
Next, you’re going to edit your messaging channel’s Omni-Channel Settings to use the newly created Route to Agent flow and fallback queue.
- From Setup, in the Quick Find box, search for and select Messaging Settings.
- Open the Agent Channel.
- Click Edit, and then configure these settings:
Field | Value |
---|---|
Routing Type | Omni-Flow |
Flow Definition | Route to Agent |
Fallback Queue | Messaging Queue |
- Click Save.
- Then, click Activate and accept the Terms and Conditions.
Create and Publish an Embedded Service Deployment
Create an Embedded Service deployment that can be used to distribute your agent.
- From Setup, in the Quick Find box, search for and select Embedded Service Deployments.
- Click New Deployment.
- Select Messaging for In-App and Web, and then click Next.
- Select Web.
- Then 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 Save.
- Then, click Publish.
Important Limitations and Considerations
- Agentforce Service Agent supports inbound conversations only (initiated by the customer).
- Certain standard topics and actions are not supported, such as querying records, updating fields, or drafting emails.
- Agentforce APIs currently support only the default dataspace in Data Cloud.
- Messaging character limits vary by channel:
- Facebook: 2,000 characters
- LINE: 5,000 characters
- SMS: 912 characters (lower if special characters)
- WhatsApp: 4,096 characters
- Apple Messages for Business: 50,000 characters
- Facebook: 2,000 characters
- When customers send multiple messages in quick succession, they are processed sequentially. Use UI code snippets to prevent message spamming on web channels.