Sub topic 2
Sales Email Templates and Other Prompt Template Types
Assume you understand Salesforce objects, records, fields, relationships, and Lightning Experience. Also assume Einstein generative AI is enabled in the org.
Sales Email templates
A Sales Email template creates a personalized email from a record, usually a Contact or Lead. Its output is an email draft that a user can review and send. Ground the prompt with merge fields so the model receives values from Salesforce instead of guessing.
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.The template's record context supplies the Contact values. The related Account name is available through the relationship.
Field Generation templates
A Field Generation template fills one text field on a record. It is useful for descriptions, summaries, or other stored text that users need while editing a record.
Using the information below, write a one-sentence description of this account for a sales rep.
Account name: {!$Input:Account.Name}
Industry: {!$Input:Account.Industry}
Annual revenue: {!$Input:Account.AnnualRevenue}
If a value is empty, leave it out instead of guessing.The output is generated for a specific field and record. The prompt should state what to do with missing or unreliable values.
Record Summary templates
A Record Summary template produces a summary of one record for a person who needs a quick view. For example, a Case summary can help a support manager understand the issue and its current status.
Summarize this case for a support manager in three bullet points: the problem, what has been tried, and the next step.
Subject: {!$Input:Case.Subject}
Description: {!$Input:Case.Description}The output is typically displayed in a Salesforce record experience rather than saved as a normal field.
Flex templates and flexible inputs
A Flex template is not tied to one standard output location or one fixed object context. You define the inputs, such as a record, text value, or another resource, and then invoke the template from supported Salesforce features or automation.
| Template type | Main purpose | Typical input |
|---|---|---|
| Sales Email | Draft an email | Contact or Lead |
| Field Generation | Fill a field | Record fields |
| Record Summary | Explain a record | One record |
| Flex | Support custom use cases | Defined inputs |
Flex templates provide flexibility, but they also require more design decisions. Name each input clearly, document its expected value, and tell the model how to handle empty inputs.
Exercise
Which template type should generate a short description and save it into an Account text field?
Show answer
Field Generation. It is designed to produce text for a field on a specific record.