Loading

Agentforce : Service Agent Update to Email Context Variables

Date de publication: Feb 25, 2026
Description

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.

Résolution

Follow these steps to manually add the new variables:

  1. Go to Setup → Agentforce Agents → Select the agent and click Open in Builder.
  2. Your agent must be deactivated to make changes.
  3. Go to the Context tab in the Builder.
  4. Click “New Variable.”
  5. Add the variable details listed below and click “Save.”
  6. Click “Activate” at the top of the Builder.

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

Numéro d’article de la base de connaissances

005315906

 
Chargement
Salesforce Help | Article