How to Use Agentforce Prompt Template: Sales Email Type

April 17, 2025


 

 

After completing this unit, you will able to:

  • Introduction to Prompt Template
  • How to Create Sales Email Prompt Template

 

Introduction

In this blog, We will explore about the Agentforce Prompt template use cases and how to use prompt tempates to make tasks easy. let's get started.

 

🔍 What is a Prompt Template in Salesforce?

A Prompt Template in Salesforce is a reusable AI instruction pattern that tells the generative AI (like Einstein GPT or Agentforce) what to do, what data to use, and how to respond.

It acts as a blueprint that:

  • Standardizes how AI gets instructions.
  • Injects Salesforce record data automatically into those instructions.
  • Controls and governs AI outputs in a consistent, secure, and scalable way.

 

🧠 Why Are Prompt Templates Important?

With Salesforce integrating more deeply with generative AI tools, you don’t want every user or developer writing their own prompts from scratch. Templates help by:

  • Ensuring consistent tone and output.
  • Using secure, predefined data inputs.
  • Saving time through reusability.
  • Empowering teams to deploy AI use cases without deep AI prompt engineering skills.

 

🔄 Types of Prompt Templates

  • Flex - Content for any business purposes that other templates don’t cover. Flex prompt templates let you define your own resources.
  • Field Generation - Content for record fields in Lightning Experience. In Salesforce, users click a button to run this prompt and populate the field with output.
  • Sales Emails - Personalized customer email based on record data.

 

Create a Developer Edition Org with Special Configuration:

https://trailhead.salesforce.com/promo/orgs/earn-the-prompt-builder-templates-superbadge-unit

 

How to Create Sales Email Prompt Template

Before creating template we need to enable some configuration to make it available prompt template in salesforce org.

  1. Click on Setup and Search in Quick Find box Einstein Setup
  2. Click on Einstein Setup 
  3. Turn on the Turn on Einstein radio button
  4. Refresh the browser tab
  5. Search in Quick Find box Einstein for Sales and click Einstein for Sales
  6. Enable the Turn on Sales Emails option
  7. Refresh the browser tab

 

Create a Prompt Template for an Engagement Email

  1. Search in Quick find box Prompt
  2. Click on Prompt Builder
  3. Click on New Prompt Template
  4. Choose Prompt Template Type Sales Email
  5. Prompt Template Name Program Recommendation Email
  6. API Name will remain as it is
  7. Template Description Same as Prompt Template Name
  8. Select recipient as Contact
  9. Do not configure a Related Object
  10. Click on Next Button
  11. In the Prompt Template Workspace Write below text:

    You are a wellness specialist from a company called Tranquil Trails and the sender of this email, [sender's full name]. You are writing an email to an individual client, [recipient's full name].
    Instructions: """
    Follow these instructions precisely. Don’t add any information not provided.
    Do not use phrases like "I hope this email finds you well" or any other variation that expresses well-wishes for the recipient's well-being. Use clear, concise, and straightforward language in the active voice, strictly avoiding filler words and phrases or redundant language.
    The email should include the following:
    Generate a subject line that can increase open rate using words and content related to the email body content.
    The salutation must only contain the recipient's first name.
    Refer to the sender in the singular voice, using references such as "I" and not "we" in the email.
    Convey that you are checking in to follow up and encourage the client's progress.
    The message should evoke enthusiasm with intensifiers, but limit the use of exclamation points.
    Maintain a casual tone by using contractions and referring to the recipient in the first person, but do not use discourse markers.
    Below are two sets of reference information.
    The first is a list of the recipient's interests tagged as :Goals.
    The second is a list of the current active programs in a JSON object tagged as :Programs.
    Craft a sales email identifying a maximum of two programs that would be of key interest to the recipient based on their :Goals and the available :Programs.
    ### Goals
    [Insert the related list of all Fitness records for this contact.]
    ### Programs
    [Call the Apex class Prompt_Program_Recommendation_Invocable.]
    Follow these instructions strictly to generate the message to be sent to the client.
    """
  12. Replace the brackets text with the relevant fields using Record input box.
  13. Click on Save button and Activate the template
  14. Search in Quick Find box Einstein for Sales and click Einstein for Sales
  15. Click Assign Permission Sets link Next to the Who Can Use Sales Emails
  16. Find Einstein Sales Emails Permission Set 
  17. Assign Einstein Sales Emails permission set to Victoriya Bryant
  18. Go to Contacts tab
  19. Test the feature as a user would by sending an email to Robinette Bullman using the Program Recommendation Email template.

Output:

 

This is an example of a Sales Email Prompt Template — I hope it helps you better understand how Agentforce Prompt Templates work.

Thanks