Sub topic 5
Sales Email templates
This chapter assumes you know Salesforce records, fields and relationships, and that you have used Setup in Lightning Experience. It also assumes Einstein generative AI is enabled in your org. You should already know what a prompt template contains and how merge fields ground a prompt.
What a Sales Email template is
A Sales Email template is a prompt template that drafts an email to a person in your CRM. It is bound to a recipient record, which is a Contact or a Lead. When the template runs, Salesforce resolves the merge fields against that record, sends the finished prompt to the model, and returns a draft email.
The output is a draft for a person to review, not a message that sends itself. It appears where sellers write email, such as the email composer in Sales Cloud, so the seller can edit it before sending.
How it runs
The flow has four steps.
Grounding with the recipient record
The prompt gets real values through merge fields. The input name sets the syntax, so a template based on a Contact uses the $Input:Contact prefix. You can follow relationships from the Contact, for example to its Account.
Write a short, friendly follow-up email to {!$Input:Contact.FirstName} {!$Input:Contact.LastName}, who works at {!$Input:Contact.Account.Name}.
Mention that we met recently and offer to schedule a call.
Keep it under 120 words and do not invent product details.Each part of this prompt does a job:
| Part | Purpose |
|---|---|
| Merge fields | Supply the recipient's name and company from the record |
| Task and tone | "Short, friendly follow-up" sets the style |
| Content hook | "We met recently" gives the model one fact to build on |
| Constraints | The word limit and the "do not invent" rule limit what the model can make up |
Only reference fields that exist and that the seller can see. If a merge field points at an empty value, the prompt reaches the model with a gap in it, and the draft may read awkwardly.
Building one
- In Setup, open Prompt Builder and create a new template.
- Choose the Sales Email type and give it a name.
- Select the recipient object, Contact or Lead.
- Write the instructions and insert merge fields with the resource picker instead of typing them by hand. This avoids typos in field names.
- Select a model, then preview against a real record.
- Save, then activate the template so sellers can use it.
Common errors
- Hard-coding the name or company. The template then only works for one person. Use merge fields.
- Asking for facts the record does not hold. If you ask for "our latest product launch" and no field supplies it, the model will guess. Pass the facts in as fields or state them in the prompt, and keep the "do not invent" instruction.
- Choosing the wrong recipient object. A template bound to Contact will not resolve
$Input:Leadfields. If your team emails both, plan for both objects. - Skipping the preview. A prompt can look correct in the editor and still produce an odd draft when a field is blank. Preview with a complete record and a sparse one.
Where this fits
Sales Email is the type to pick when the result is outbound communication to one named person. If you want to fill a field on a record, or summarize a record for an internal reader, a different type fits better. Chapter 9 covers that choice.
Exercise
A template uses {!$Input:Contact.Account.Name} to mention the recipient's company. A seller reports that drafts for some contacts say "works at ," with no company. What is the likely cause, and what are two ways to fix it?
Show answer
Those Contacts have no Account, so the merge field resolves to an empty value. One fix is to add an instruction such as "If a value is empty, leave it out instead of guessing", so the model words the sentence without the company. Another is to fill in the Account on those Contacts. You can also preview the template against a record with no Account to confirm the result.