Map your custom fields as parameters in the Embedded Service Deployment to pass campaign data to the agent.
Required Editions
| Available in: Salesforce Classic and Lightning Experience |
| Available in: 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. |
| Available in: LWR and Aura |
| Available in: Enhanced Chat with the Einstein for Service, Einstein Platform, Community, Community Plus, or Agentforce for Service add-on |
| Available in: 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 build and manage Service agents: | Manage Agentforce Service Agents AND Manage AI Agents OR Customize Application |
| To set up this feature: | set up this feature: Customize Application AND Modify Metadata Through Metadata API Functions |
Context variables act as a bridge between your CRM (Customer Relationship Management) data and the chat interface. Mapping these variables makes sure that when a proactive chat starts, the system automatically populates the session data required for the agent to function correctly.
- From Setup, in the Quick Find box, enter Messaging Settings, and select Messaging Settings.
- Click the name of the messaging channel you created for proactive service.
- Under Custom Parameters, click New.
-
Create parameters for the Service Campaign ID, Service Campaign Member ID, and Service
Agent prompt.
For the best results, match the parameter name to the channel variable name.
- From Setup, in the Quick Find box, enter Embedded Service and select Embedded Service Deployments.
- Find your deployment and select View from the dropdown menu.
- Select Edit Pre-Chat and make sure that you activate the pre-chat feature.
- Under Hidden Pre-Chat Fields, select your custom parameters from the Available list and move them to the Selected list.
- Save your changes and click Publish on the deployment settings page.