You are here:
Create Context Variables for Messaging Sessions
Before you create your agent, personalize agent conversations with context variables. Context variables enable your agent to use messaging session record fields as inputs to send site context to the agent.
-
In your Salesforce org, at the top of the page, click
and select Setup.
- Select the Object Manager tab.
- In the Quick Find box, find and select Messaging Session
- Click .
-
Add these new fields.
Assign all the fields except for QueryFacets the Text data type. For QueryFacets, assign the Long Text Area data type, which has a maximum character limit of 131,072.
- Currency
- DomainURL
- IsCartMgmtSupported
- Organization ID
- QueryFacets - Use Long Text Area
- RefreshToken
- SiteID
- UsId
- UserLocale
-
For SFRA stores, add these new fields.
Assign all the fields to the Text data type.
- BooleanTrue
- BooleanFalse
- SfraNamedCredential
- SfraAuthToken
- CsrfToken
- Accept the default values for field-level security and click Next.
- Save the new field.
For more information about messaging, see these resources.

