April 17, 2025
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.
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:
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:
Empowering teams to deploy AI use cases without deep AI prompt engineering skills.
https://trailhead.salesforce.com/promo/orgs/earn-the-prompt-builder-templates-superbadge-unit
Before creating template we need to enable some configuration to make it available prompt template in salesforce org.
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.
"""
Output:
This is an example of a Sales Email Prompt Template — I hope it helps you better understand how Agentforce Prompt Templates work.
Thanks