How to Set Up Agentforce for an Experience Cloud Portal
Introduction
Agentforce is Salesforce's next-generation AI platform that enables organizations to deploy autonomous, conversational AI agents across their digital channels. When integrated with Salesforce Experience Cloud – Salesforce's portal and community platform – Agentforce becomes a powerful self-service engine that can handle customer queries 24/7, reduce repetitive workloads for human agents, and deliver personalized, data-driven interactions at scale.
Unlike traditional Einstein Bots that rely on rigid, scripted dialog flows, Agentforce Service Agents use generative AI grounded in your CRM data, Knowledge articles, and custom data sources. They can understand context, handle nuanced language, and even escalate to live agents when necessary – all while respecting your org's sharing settings and security model. This makes them especially well-suited for Experience Cloud portals, where customers, partners, or employees expect fast, relevant answers without waiting in a support queue.
This guide walks you through the complete process of setting up Agentforce for an Experience Cloud portal – from enabling the required features in Setup to publishing a fully functioning AI agent on your community site. Screenshots placeholders are included throughout; replace each one with the corresponding screenshot from your own Salesforce org as you work through the steps.
Step 1: Enable Agentforce in Your Org
Agentforce is not active by default in any Salesforce org, even if it is included in your license. To activate it:
1. From Setup, use the Quick Find box to search for Einstein Setup.
2. Enable Turn on Einstein, if it’s not already turned on.
3. From Setup, in the Quick Find box, enter Agentforce Agent.
4. To enable Agentforce, turn on the Agentforce.
Step 2: Create and Configure Your Agentforce Service Agent
This is where you define the intelligence of your agent. Topics tell Agentforce what categories of conversations it can handle. Actions are the specific tasks the agent can perform within each topic, such as looking up a case, retrieving account details. The quality of your agent's responses depends entirely on how well-scoped your topics are. A well-configured agent can deflect a significant portion of inbound support volume without human intervention.
Step 3: Enable Messaging and Configure Omni-Channel
Agentforce does not operate as a standalone chat system – it works within Salesforce's Omni-Channel framework, the same routing engine used by human service agents. This means every conversation that flows to Agentforce is a work item in Omni-Channel. Setting up these correctly is what allows the platform to direct incoming conversations intelligently: routing to the AI agent first, and falling back to a human agent when needed.
Enable Omni-Channel
5. In Setup, use Quick Find to search for Omni-Channel Settings.
6. Toggle the Enhanced Omni-Channel Routing checkbox and accept the terms.
7. Make sure that the Enable Omni-Channel checkbox is enabled.
Setup > Omni-Channel Settings
Create a Routing Configuration and Fallback Queue
Routing Configuration is needed to define the work size and priority when assigning conversations to the messaging queue. Fallback Queue ensures that when an AI agent cannot handle a request, or if technical errors occur, the interaction is not lost, but rather handed over to a human agent.
8. In Setup, search for Routing Configurations. Click New. Name the configuration (e.g., Agentforce Routing), set the Routing Priority, Model, Capacity Type and save.
Setup > Routing Configurations > New
9. Navigate to Setup > Queues. Click New. Give the queue a clear name (e.g., Messaging Queue), as a Routing Configuration select the previously created one, set the Supported Object as a Messaging Session. Save.
Setup > Queues > New
Step 4: Build an Omni-Channel Routing Flow
The Omni-Channel Routing Flow is the traffic controller of your implementation. It determines what happens the moment a visitor on your portal starts a chat – specifically, whether that conversation goes to the Agentforce AI agent, a human agent, or both in sequence. Without this Flow, Omni-Channel does not know where to send incoming work items, and conversations will simply sit unrouted. The Flow also enables the escalation pathway: when Agentforce determines it cannot resolve a query, the Flow handles the graceful handoff to a human agent queue, preserving the full conversation context so the customer does not have to repeat themselves.
10. In Setup, use Quick Find to search for Flows. Click New Flow.
11. Select Omni-Channel Flow as the flow type and click Create.
12. Add a Route Work action as the first element. Configure it to route incoming Messaging Sessions to the Agentforce Service Agent and set a Queue created in Step 3 as a Fallback Queue. Save and Activate the Flow.
Setup > Flows > Omni-Channel Routing Flow – Route Work element
Step 5: Set Up the Experience Cloud Site
The Experience Cloud site is the front-end layer your customers, partners, or employees interact with. It is where the Agentforce chat widget will surface. The site also carries its own security model (guest user profile, sharing settings), which controls what data unauthenticated or community-authenticated users can access – important for an AI agent that will be querying Salesforce data on behalf of those users.
Enable Digital Experiences
13. In Setup, navigate to Feature Settings > Experiences > Settings.
14. Check the Enable Digital Experiences checkbox. Click Save.
Create and Publish the Experience Site
15. In Setup, search for All Sites. Click the New button.
16. Choose a template – Customer Service or Customer Account Portal are the recommended starting points for Agentforce deployments. Click Get Started.
17. Set the site name and URL suffix (e.g., /support or /portal) and click Create.
18. From Setup > All Sites, click Builder next to your new site to open Experience Builder.
19. Customize the site: update the branding colors and logo in the Theme panel, edit the navigation menu, and adjust page layouts as needed.
20. Make sure that the site is Active: from Administration > Settings check the Status. Click Publish.
Step 6: Create a Messaging Channel and Embedded Service Deployment
The Messaging Channel is the bridge between your Experience Cloud portal and the Agentforce backend. It defines the communication protocol (Embedded Messaging), links to your Omni-Channel routing configuration, and generates the deployment code that powers the chat widget on your portal. The Embedded Service Deployment then packages the visual and behavioral settings of the chat widget – button color, greeting messages, pre-chat fields – that your customers will actually see and interact with. Without these two components, there is no way for a visitor on your portal to initiate a conversation with the agent.
Set Up the Messaging Channel
21. In Setup, use Quick Find to search for Messaging Settings. Make sure Messaging is enabled. If not, activate it. Click the New Channel.
22. Click Start. From the Native Channels list select the Enhanced Chat.
23. Give the channel a descriptive name (e.g., Service Agent Channel) and set the Domain as your Experience site domain.
Setup > Messaging Settings > New Embedded Messaging Channel > Name your channel
24. Select Omni-Flow as a Routing Type. Flow Definition - Flow from Step 4, Fallback Queue - Queue from Step 3. Click Save.
Setup > Messaging Settings > New Embedded Messaging Channel > Channel Routing
Embedded Service Deployment
The Embedded Service Deployment defines how the chat button and window look and behave on your portal. After the latest Salesforce release the Embedded Service Deployment created automatically during the Embedded Messaging Channel creation.
25. In Setup, search for Embedded Service Deployments. Open the newly created Embedded Service Deployment.
26. Click Publish.
Setup > Embedded Service Deployments – Deployment
Step 7: Configure CORS
Modern browsers enforce strict security policies that prevent web pages from making requests to domains they were not explicitly permitted to contact. Salesforce respects these standards through Content Security Policy (CSP) and Cross-Origin Resource Sharing (CORS) configurations. When the Agentforce chat widget loads on your Experience Cloud site, it makes background API calls to your Salesforce org to establish sessions, send messages, and receive responses. If your site's URL is not listed as a Trusted URL and as a CORS-allowed origin, the browser will block these calls entirely and the chat widget will fail silently. This is one of the most common reasons why chat widgets appear on-screen but do not function.
27. In Setup, use Quick Find to search for CORS. Click New.
28. Enter your Experience Cloud site URL as the Origin URL Pattern (include the protocol: https://). Click Save.
Setup > CORS – Allowed origins configuration
Step 8: Embed the Agentforce Chat Widget in the Experience Site
All the backend configuration up to this point has been invisible to end users. This step surfaces the Agentforce agent as a visible, interactive chat button on your Experience Cloud portal. Salesforce provides a native Embedded Service Chat component in Experience Builder that handles the integration without requiring custom code – it simply needs to be pointed at the Embedded Service Deployment you created in Step 6. However, the placement, visibility rules (e.g., show only on certain pages, only for authenticated users), and styling all matter significantly for adoption. A poorly placed or visually inconsistent chat button will be ignored by users, wasting your configuration effort.
29. From Setup > All Sites, click Builder next to your Experience Cloud site to open Experience Builder.
30. In the left panel, click the Components icon (puzzle piece). Use the search box to find the Embedded Service Chat component.
31. Drag the Embedded Service Chat component onto the page – typically the footer area so it appears on all pages, or a dedicated Support page.
32. In the component's property panel on the right, select your Embedded Service Deployment from Step 6 from the dropdown.
33. Configure visibility rules if needed: click the Visibility tab and set conditions (e.g., show only when the user is authenticated, or only on specific pages).
34. Preview the page to confirm the chat button appears and matches your portal's branding.
35. Click Publish to push the updated page live.
Experience Builder > Page editor – Embedded Service Chat component properties
Conclusion
Setting up Agentforce for an Experience Cloud portal requires careful coordination across multiple areas of the Salesforce platform – Omni-Channel, Messaging, Experience Builder, and the Agentforce Builder itself. While the number of steps may seem daunting at first, each component plays a distinct and necessary role. Omni-Channel provides routing intelligence. The Messaging Channel and Embedded Service Deployment provide the communication layer and chat widget. The Agentforce agent provides AI reasoning and knowledge retrieval. The Experience Cloud site provides the user-facing interface. Together, they form a cohesive self-service platform that can significantly reduce support volume while improving customer experience.

