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.
From Setup, in the Quick Find box, enter Object Manager, and then
select Object Manager.
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.
From the left menu, click Fields & Relationships.
Click New.
Select the Text field type, and then click
Next.
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.
Complete the remaining steps of the field creation wizard, setting appropriate Field-Level
Security (FLS) and adding the field to necessary page layouts.
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.
Repeat steps 4 through 7 for every required context variable to make sure all data can be
captured.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.