Loading
Salesforce now sends email only from verified domains. Read More
Experience Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Configure the Context Passing Framework for Agentforce

          Configure the Context Passing Framework for Agentforce

          Implement required components, including the User Interaction Context component and an Omni-Channel flow, to track critical user journey data. This framework maps pre-chat variables from your Experience Cloud site and securely delivers the context to your Agentforce Service agent.

          Required Editions

          Available in: Salesforce Classic and Lightning Experience
          Available in: Aura and LWR Experience Cloud Sites
          Available in: Enhanced Chat with the Einstein for Service, Einstein Platform, Community, Community Plus, or Agentforce Service Agent add-on
          Available in: Enterprise, Performance, Unlimited, and Developer Editions with Foundations or Agentforce 1 Editions. Access to some standard agent actions requires additional add-on licenses
          User Permissions Needed
          To create and set up Experience Cloud site: Create and Set Up Experiences AND View Setup and Configuration
          To customize or publish an Experience Cloud site: Create and Set Up Experiences AND View Setup and Configuration AND be a member of the site OR View Setup and Configuration AND be a member of the site AND have appropriate role-based site access
          To create and manage Agentforce Service agents: Create and Set Up Experiences AND View Setup and Configuration AND be a member of the site OR View Setup and Configuration AND be a member of the site AND have appropriate role-based site access
          To enable digital experiences: Customize Application
          To set up this Enhanced Chat: Customize Application AND Modify Metadata Through Metadata API Function
          To add the Embedded Messaging component to an Experience Builder site Create and Setup Experiences
          To set up Embedded Chat Customize Application AND Modify Metadata

          Before you begin, make sure you have these components and configurations in place.

          • An Experience Cloud site built on either the Aura or LWR framework. See Create an Experience Cloud Site.
          • Customer Community or Customer Community Plus licenses in your org. See Experience Cloud User Licenses.
          • An Enhanced Chat Embedded Service Deployment configured to pass hidden pre-chat variables. The variables must be named exactly as shown below:
            • lastViewedArticleId
            • lastSearchQuery
            • lastViewedTopicId (for Aura sites)
            • lastViewedNDCId (for LWR sites)

            See Customize the Embedded Pre-Chat Form.

          • An Agentforce Service agent configured with a custom action or multiple custom actions that can consume these specific context variables. This generally involves defining the variables as Input Variables within the agent action's configuration, which the Agentforce Service agent is designed to execute upon chat transfer. See Use Context Variables in Messaging Conversations.
          • The Quick Chat or Embedded Messaging components set up in your Experience Cloud site. See Embedded Messaging.
          • User verification is enabled, and you have set the pre-chat variable frequency to Every Session. See Set Up User Verification.
          1. Configure the User Interaction Context for Agentforce Component
            The User Interaction Context for Agentforce Lightning web component is the core of the framework. It captures user interaction data and passes it to your Agentforce agent.
          2. Set Up Enhanced Chat for Context Passing
            Set up your Enhanced Chat channel and Embedded Service deployment to accept and pass hidden pre-chat variables. These variables enable the User Interaction Context Lightning web component to function with your Agentforce Service agent.
          3. Create Custom Fields on the Messaging Session Object
            To use the context variables passed by the Context Passing framework in your Agentforce Service agent, create custom fields on the Messaging Session object. These fields will store the data coming from your Experience Cloud site.
          4. Map Context Variables and Route Chat with Omni-Channel Flow
            Configure an Omni-Channel flow to map the pre-chat variables from the chat deployment to the custom fields on the Messaging Session object and route chats to your Agentforce Service agent.
          5. Expose Context Variables in Your Agentforce Service Agent
            To make the custom fields created on the Messaging Session object available to your agent, expose them as context variables in Agentforce Builder. This action establishes the direct data link required for your Agentforce Service agent to reference and utilize user journey data when executing actions and guiding responses.
           
          Loading
          Salesforce Help | Article