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.

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
  1. Create Your First Enhanced Chat Channel and Deployment. During channel setup:
    1. Give your channel a descriptive name. For example, User Journey Context Channel.
    2. Set the Routing Type to Omni-Flow.
  2. Configure the deployment settings. See Configure an Enhanced Web Chat Deployment.
  3. Set the context parameters. See Customize the Embedded Pre-Chat Form.
    Add Custom Parameters in Messaging Settings using the exact, case-sensitive names: lastViewedArticleId, lastSearchQuery, lastViewedTopicId (Aura), and lastViewedNDCId (LWR). Select these parameters under Pre-Chat Hidden Variables within the Embedded Service Deployment settings.
  4. Save all your changes and publish the deployment.