With the recent changes, Agentforce for Service introduces an important update to how email context data is handled when using the Service Email Connection.
When using the Service Email Connection, context information that was previously passed as part of the user message will now be passed directly to context variables configured on the agent. This provides a significant benefit to admins, who can now directly reference these variables in their topics and actions.
New agents (Agentforce Service Agent) will have these variables predefined. Existing agents will not, and you must create them manually.
This is a potentially impactful change for topics and actions that were using plain text instructions like “the case ID” to obtain context. Going forward, please use syntax like “the variable emailCaseId” in your topic instructions and directly reference the variables in your action inputs.
Follow these steps to manually add the new variables:
Name and API Name: emailCaseId
Description: Stores the Salesforce Case ID created by an inbound email.
Data Type: Text
Allow value to be set by API: true
Allow LLM to use value: true or false depending on your use case
Name and API Name: endUserEmail
Description: Stores the email address of the end user who sent the inbound email.
Data Type: Text
Allow value to be set by API: true
Allow LLM to use value: true or false depending on your use case
Name and API Name: endUserContactId
Description: Stores the Salesforce Contact ID associated with the end user who sent the inbound email.
Data Type: Text
Allow value to be set by API: true
Allow LLM to use value: true or false depending on your use case
Access Email Context with Agentforce Service Agent Variables
005315906

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 are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security 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 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.