Wednesday, December 31, 2025

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

Salesforce Agentforce brings intelligent automation to your digital experiences, enabling AI-powered agents to interact with customers directly on your Experience (Community) Site. But deploying an agent isn’t just a drag-and-drop affair—it requires a series of well-orchestrated steps. Here’s your go-to guide for getting it done right.

Step-by-Step Deployment Checklist

1. Create a Service Agent

Start by creating the Agentforce agent in Salesforce. Define its topic, instructions, and actions—these determine what the agent can do and how it responds to users. Once configured, activate the agent.

2. Assign Permissions to Einstein Service Agent User

Salesforce automatically creates a Service Agent user when you create an Agentforce agent. This user needs the right permissions:

Object and field-level access to query/update records

Apex class access for custom logic

Flow access for orchestrations

Use permission sets or profiles to grant these.

3. Enable Omni-Channel

Omni-Channel is the backbone of routing in Salesforce. Enable it to allow your agent to receive and respond to incoming requests.

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

4. Create Routing Configurations

Define how conversations are routed to your agent. This includes:

Routing Configurations: Set capacity and routing priority

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

Fallback Queue: Ensure there's a backup if the agent is unavailable.

Under routing config select routing config.

Under supported objects select "Messaging Session". This is the object where incoming request and agent response will be recorded.

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

5. Build an Omni-Channel Flow

Create a flow that handles incoming request. With the help of this flow incoming messages are assigned to agents and agent responds back.

Before building the Omni Channel Flow. Have a look at the Connection tab on your agent which you want to put on Community.

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

Flow Configuration:


Add a variable for taking input and make it available for input:


Add a Route Work element:


6. Enable Digital Experiences

Go to Setup and enable Digital Experiences to allow creation and customization of community sites.

7. Create a Community Site

Use the Experience Builder to create your site. Choose a template that supports messaging and embed the agent interface.

I am creating a Customer Service Portal.


Make sure to Activate the site from Administration.

8. Create and Activate a Messaging Channel

Set up a Messaging Channel (e.g., Web, SMS, WhatsApp) and link it to your community site. Activate it so customers can start conversations.

Under Setup > Enable Messaging Settings

Create a new Channel:






Click Save and Activate the messaging channel.

9. Create Embedded Service Deployments

Deploy the agent interface using Embedded Service Deployments. This allows the agent to appear as a chat widget on your site.


Now go to Builder and search "Embedded" as shown below and add the messaging component anywhere on the page as shown in image 1 and ensure to select "EBD_For_AF" the embedded service deployment which we just created as shown in image 2 and publish the site.


How to Deploy an Agentforce Service Agent to a Salesforce Community Site
How to Deploy an Agentforce Service Agent to a Salesforce Community Site


10. Add CORS URL

To ensure secure cross-origin communication, add your community site’s URL to the CORS whitelist in Setup.

Now, go to site and refresh the page, you will be able to see your Agentforce Agent as shown below.

How to Deploy an Agentforce Service Agent to a Salesforce Community Site

No comments:

Post a Comment