
What is a Customer Service Agent in Salesforce?
A Customer Service Agent built with Agentforce is an AI-powered assistant in Salesforce designed to interact with customers, answer inquiries, and perform support-related actions. These agents can automate tasks like checking case status, retrieving customer data, and assisting with order inquiries based on how topics and actions are configured in the agent. They help service teams provide faster, consistent support.
Why Email Verification is Necessary for Customer Service
Verifying a customer’s email before exposing sensitive information or allowing private actions ensures that:
- The support agent interacts only with authenticated customers.
- Personal data (cases, orders, account details) isn’t revealed to unauthorized users.
- Customer interactions are secure and traceable.
- System integrity and organizational trust are maintained.
In Agentforce, adding verification ensures that actions like Get Cases for Verified Contact only run after the customer has proven ownership of their email/contact record.
Overview of Email Verification Flow
Salesforce provides out-of-the-box standard actions that help authenticate customers in messaging sessions:
-
Send Email with Verification Code
Agent sends a one-time code to the customer’s email address. -
Verify Customer
Agent prompts the customer for that code and checks it against Salesforce records. -
Apply Filters/Variables
After successful verification, variables like Verified can be used to control access to private topics or actions.
How to Setup Email Verification for Customer Service Agents
Below is a high-level implementation flow based on best practices and Trailhead guidance for Deploy Agent Authentication.
1. Enable Agentforce and Related Features
Ensure your Salesforce org has:
- Einstein GPT enabled.

- Agentforce Agents enabled in setup.
- Flows required by the agent are activated.
(This prepares your org for service agent authentication.)

2. Use the Out-of-the-Box Customer Verification Topic
Salesforce includes a built-in Customer Verification topic that simplifies the verification process:
- This topic contains two actions:
- Send Email with Verification Code – sends a one-time code to the customer’s email.
- Verify Customer – checks the entered code against Salesforce identity. You add this topic to your service agent to protect private actions.

3. Add Required Variables
In Agentforce Builder:
- Open the Customer Verification topic.
- Create variables to store outputs of verification actions, typically:
- Authentication_Key
- Customer_ID
- Customer_Type
- Verified (Boolean status)
- Map outputs of Send Email with Verification Code to these variables.
- Map inputs of Verify Customer action to the same variables — this ensures that the verification code sent to the customer is correctly used to verify their identity.
- Map outputs of Verify Customer to the Verified and Customer_ID variables.
- Variables like Verified can then be used in filters to gate access to sensitive actions.

4. Apply Filters to Protect Private Actions
Once you have verification variables:
- Create a filter (e.g., Is_Verified) that checks if the Verified variable is True.
- Apply this filter at:
- Topic level – e.g., Case Management
- Action level – specific actions that should only run after verification
With this in place, actions like Get Cases for Verified Contact are only accessible when a customer’s email is successfully verified.

This gives customers a secure way to verify their identity before the agent accesses or shares sensitive data.

5. Test the Verification Flow
Within Agentforce Builder or Conversation Preview:
- Start a chat (or messaging session) and trigger a private topic — e.g., ask about case status.
- The agent should prompt for an email address.
- After providing the email, the agent sends a verification code to that address.
- The agent then asks for the verification code.
- Upon entering the correct code, the agent confirms verification.
- Only then are private actions available for execution.
Output:

Conclusion
Adding email verification to a Customer Service Agent using Salesforce Agentforce ensures secure and authenticated interactions. By leveraging the Customer Verification topic and its standard actions — Send Email with Verification Code and Verify Customer — paired with variables and filters, you can control who gets access to sensitive service actions. This strengthens your support process, improves trust, and protects customer data while maintaining an automated support experience.
References
- Salesforce Help: Send Email with Verification Code
- Salesforce Help: Verify Customers with Standard Topics in the Legacy Builder