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
          Create Custom Fields on the Messaging Session Object

          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.

          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

          Use these steps for each of the required context variables such as lastViewedArticleId or lastSearchQuery to create a corresponding custom field on the Messaging Session object.

          1. From Setup, in the Quick Find box, enter Object Manager, and then select Object Manager.
          2. On the Object Manager page, use the internal Quick Find box to search for Messaging Session, and then click Messaging Session to open its detail page.
          3. From the left menu, click Fields & Relationships.
          4. Click New.
          5. Select the Text field type, and then click Next.
          6. Set the field label and field name to exactly match the context variable name. For example, if the variable is lastSearchQuery, the API Name must be lastSearchQuery.
          7. Complete the remaining steps of the field creation wizard, setting appropriate Field-Level Security (FLS) and adding the field to necessary page layouts.
          8. To complete the wizard steps, set the correct Field-Level Security and add the field to the necessary page layouts for agents to view the data.
          9. Repeat steps 4 through 7 for every required context variable to make sure all data can be captured.
           
          Loading
          Salesforce Help | Article