You are here:
Batch Test Lead Nurturing Reply Emails in Testing Center
To see how your Lead Nurturing agent generates reply emails at scale to prospects using the prospect record details and the Draft Reply Email prompt template action, use Testing Center.
Required Editions
| Available in: Lightning Experience in Enterprise, Performance, and Unlimited editions with Sales and Einstein for Sales. |
| User Permissions Needed | |
|---|---|
| To set up and test Agentforce Lead Nurturing: | Configure Agentforce SDR Agent |
In Testing Center, set test conditions, upload a CSV file, and view the resulting reply emails.
- In Setup, enter Testing Center in the Quick Find box. Then click Testing Center.
- Click New Test.
- Give your test a name and choose the Agentforce Sales Development Rep agent as the agent to test. Add a description for your test if you wish. Click Next.
- On the Test Conditions page, click Include context variables. Context variables define the conditions for your testing scenario, such as whether you’re testing leads, contacts, or person accounts, intro emails or replies, etc.
-
From the list of context variables, select the variables needed for your test. Then
click Next.
For testing reply emails, choose the Record Type, Email Scenario, Action Cadence Step Tracker ID, Record, Email Body, and Lead Owner’s Inbox Enabled variables.
- On the Test Data tab, Upload Test Cases (.csv) is selected by default. Use this option to create and upload a CSV file. Click Template to download a CSV file containing the columns you’ll need for your test. You’ll fill in only the columns needed for testing reply emails.
-
Open the template CSV file in a spreadsheet editor like Microsoft Excel or Google
Sheets. Delete the placeholder data beginning on row two. Then populate the rows with the
lead, contact, or person account records and the associated context values that define
your nudge email testing scenario. For nudge emails, the CSV file includes these
columns.
- Utterance: the request sent to the LLM to initiate drafting the reply email.
- Expected Subagent: the subagent used to draft the email.
- Expected Actions: the agent action used to draft the email.
- Expected Response: the type of response requested from the agent.
- Context Variable OrchestrationStage: the email testing scenario. In this case the scenario is Nudge.
- Context Variable currentRecordId: This is a record ID of a lead, contact, or person account you want to test with.
- Context Variable actionCadenceStepTrackerId: Your agent uses Sales Engagement Cadences to orchestrate its outreach. This is the ID of the email cadence step tracker associated with the lead, contact or person account record. In Testing Center, use the dummy ID 8HF000000000000.
- Context Variable currentObjectApiName: the name of the object you are testing. Valid values are Lead and Contact. To test with person accounts, use Contact.
- Context Variable emailBody: the body of the prospect email to which the agent is replying.
- Context Variable Lead_Owner_has_Inbox: indicates whether the record owner has Inbox enabled. To allow your agent to include a meeting booking link in a reply, Inbox must be enabled for the record owner. Valid values are True and False.
Fill the rows of your CSV file according to these guidelines.
Here’s an example of a valid CSV file for testing reply emails to leads.Column NAME Different Values Per Row? Input Value Details Utterance No Respond to this email. Do not schedule the email. Your response should be a text-formatted email and not JSON. Expected Subagent No Respond to Prospect Expected Actions Yes ['Answer QuestionsWithKnowledge', 'DraftQuestionAnswerEmail'] This value will change based on the emailBody.
If emailBody contains a product inquiry, use ['AnswerQuestionsWithKnowledge', 'DraftQuestionAnswerEmail']
If emailBody contains a meeting request only, use ['DraftMeetingRequestEmail']
If emailBody contains an off-topic question only, use ['DraftGenericReplyEmail']
Expected Response No A reply email is successfully drafted. Context Variable OrchestrationStage (Email Scenario) No Reply Context Variable currentRecordId Yes A valid record ID For nudge email testing, this is the only column that will contain different values per row. The record ID appears in the URL of the record detail page. Context Variable actionCadenceStepTrackerId No 8HF000000000000 This is a dummy value used for testing. Context Variable currentObjectApiName No Lead or Contact To test person accounts, use Contact. Context Variable emailBody Yes What products do you offer? There are three types of SDR Email Body utterances for replies, product inquiry, meeting request, and off-topic question. Context Variable Lead_Owner_has_Inbox Yes True Can be True or False 
- On the Test Data screen, click Upload Files. Choose the CSV file you created and click Open. When the upload is complete, click Done.
-
On the Evaluations screen, a list of the available output quality evaluations appears.
Choose the evaluations you want to see for the generated output. Then click
Save & Run.
Your new test appears in the Tests list in Testing Center.
- To run your test, click the test name in the Tests list.
The agent generates a reply email to each of the prospects using the parameters in your CSV file. The generated output and evaluations appear in the Test Results list. Because you aren’t actually sending the generated email during testing, email scheduling errors can appear in the results. You can ignore these errors.
Check the results to see if the generated emails meet your business requirements.

