Superbadge: Prompt Builder Templates
Create Prompt Builder templates to supercharge AI-powered insights and engagement.
Superbadge: Prompt Builder Templates
What You'll Be Doing to Earn This Superbadge
1. Use the Prompt Template Workspace to configure Flex, Field Generation, and Sales Email prompt template types.
2. Adjust an existing flow to incorporate a prompt template.
3. Send an email using an email prompt template.
Concepts Tested in This Superbadge
- Creating prompt templates
- Prompt template instructions
- Calling a prompt template in a simple flow
Introduction to Superbadges
Heads-up! A superbadge is different from other learning on Trailhead. It's a hands-on technical skills assessment where you take business requirements and apply your skills to build something amazing, without the step-by-step guidance. We have provided recommended learning and Help articles filled with resources to aid you along your journey. The estimated completion time assumes prior experience with the superbadge concepts and completion of the recommended learning. Your hard work will pay off!
Prework and Notes
Sign Up for a Developer Edition Org with Special Configuration
To complete this superbadge, you need a special Developer Edition org that contains specific configuration and sample data. Note that this Developer Edition org is designed to work with the challenges in this superbadge.
-
Sign up for a free Developer Edition org with special configuration.
Fill out the form. For Email address, enter an active email address.
- After you fill out the form, click Sign me up.
When you receive the activation email (this might take up to an hour), open it and click Verify Account.
Complete your registration by setting your password and challenge question. Tip: Save your username, password, and login URL in a secure place—such as a password manager—for easy access later.
You are logged in to your superbadge Developer Edition org.
Additional Configuration
You must enable Einstein Generative AI to work with Prompt Builder templates. For part of this challenge, your org must be configured with English as the user language. We recommend that you deselect “Enable secure and persistent browser caching to improve performance” in Session Settings.
Now, connect your new Developer Edition org to Trailhead.
Make sure you’re logged in to your Trailhead account.
In the Challenge section at the bottom of this page, select Connect Org from the picklist.
On the login screen, enter the username and password for the Developer Edition org you just set up.
On the “Allow Access?” page, click Allow.
On the “Want to connect this org for hands-on challenges?” page, click Yes! Save it. You are redirected back to the Challenge page and ready to use your new Developer Edition org to earn this superbadge.
Now that you have a Salesforce org with special configuration for this superbadge, you’re good to go.
Prework and Notes
Use Case
Tranquil Trails Wellness Co. (Tranquil Trails) is a leading wellness provider with a global presence. Established to promote holistic health and wellness, the company helps clients meet their fitness goals by connecting them with personal wellness coaches for guidance and encouragement. Tranquil Trails wants to incorporate new AI-driven features to help the coaches better engage with clients, creating more personalized interactions at scale.
As a Salesforce administrator for Tranquil Trails, your task is to complete the necessary steps to achieve the company’s goals with the Agentforce Platform. The company is focusing on improving the client experience by collecting clients’ feedback about their goals and recent activities. Tranquil Trails will use this feedback to provide personalized suggestions to clients and ensure that all coaches are aware of their clients’ evolving needs and objectives.
Business Requirements
Translate Text with a Prompt Template and Record-Triggered Flow
Tranquil Trails offers a Goals and Interests survey in a client portal. Clients complete their first survey before they begin working with a coach and can have several form submissions over time. Each survey submission creates a new record in the Tranquil Trails Salesforce instance in a custom object called Fitness. A field on this object called Survey Input captures comments in a variety of languages.
Create a Template That Translates Text
While clients are always assigned a coach who speaks their language, some managers of coaches only speak English. Managers need to be able to read the comments in English, even if the client originally entered the content in a different language. Your job is to configure a feature that automatically translates the survey comments into English and updates a field called Translated Survey Input with an AI-generated translation.
Managers want the translated text to incorporate resources from multiple objects: Fitness, Account, and Contact. Create a new prompt template that can work with multiple objects named
Translate Survey Input with API name AccountAccount with API name ContactContact with API name FitnessFitness
Use the following prompt text provided, replacing the text found in brackets with the appropriate resource. Remove any placeholder text. We won't check for the specific model you select, but don't forget to test your prompt template to make sure it's working as expected. Be sure to experiment with different models and select one that limits the response to the number of characters the Survey Input field can accommodate.
You are a wellness specialist from a company called Tranquil Trails. Review the content in [Survey Input field]. If the content is in a language other than English, translate the text into English, following the instructions below. Instructions: """ Follow these instructions precisely. Don’t add any information not provided. - If the content in the Survey Input field is not in English, translate it into English without copying the text in the original language. - Do not explain what you are doing in this situation—simply translate the text. - Strictly limit the characters returned to fewer than 255. """
We recommend that you preview the translation capability in the Prompt Template Workspace using Kyrstin Strong's account and contact records and Fitness Interest-0906, but we won’t check for that.
Work with the Prompt Template in a Flow
Your next step is to automate the translation service. Any new records that are created in the system should automatically form with survey input translated by the prompt template. An existing flow called Translate Fitness Survey Input is partially built. The flow already has a Start element and two Get Records elements.
Update the flow to ensure that the language translation feature runs whenever a new survey record is created. Add a new Action element immediately after the two existing Get Records elements. Configure this action to call the Translate Survey Input prompt template you created. Do not manually assign variables; rather allow the system to automatically store the response from the action. Label the action
Translate Survey InputConfigure the input values for the action using the following values.
- Account: Account from Get Account or {!Get_Account}
- Contact: Contact from Get Contact or {!Get_Contact}
- Fitness: Triggering Fitness__c or {!$Record}
Next, add an Update Records element called
Update Translated Survey InputTest the flow using a sample Fitness record you manually create for Latisha Bryce, an Italian client, from her contact record. Configure the values for the Fitness record using the following values and any other record details you’d like to include.
- Survey Input:
Ho sempre desiderato correre una maratona - Interest Type:
Running
Build an AI-Generated Overview of Related Records
The Tranquil Trails marketing team wants to use AI to create personalized profile insights for their clients based on clients' surveys. Each survey submission creates a new Fitness record in Salesforce related to a client’s Contact record. Over time, each client can have several related Fitness records. Rather than reviewing each record, wellness coaches want to generate an overview of all Fitness submissions directly inside a field on the Contact record.
Populate a Field with an AI-Generated Overview
Your strategy is to create a custom field on the Contact record that will store this AI-generated content. Create a rich text custom field on Contact called
Interest SummaryCreate a new prompt template that can generate content for a specific field called
Summarize Client GoalsEnter the text provided by the marketing team in the prompt template workspace, making sure to replace the text in brackets with the appropriate dynamic resources. Remove any placeholder text. You can use any LLM model you’d like.
You are a wellness coach at Tranquil Trails reviewing a client’s fitness records.
Fitness records: [Related list of all Fitness records]
Contact first name: [Input the contact's first name]
Instructions: """
Prepare a concise summary of the client’s fitness interests based solely on the information contained in the provided Fitness records.
Refer to the Contact as “client” throughout the summary and use the client’s first name in the opening sentence.
Writing guidelines:
- Use clear, direct language in the active voice.
- Maintain a friendly, informal, and informative tone.
- Avoid filler language and redundancy.
- Do not introduce information that is not present in the Fitness records.
- If data is unavailable, omit it without commentary.
Content requirements:
- Include one brief introductory sentence.
- Include several bullet points highlighting key interests, patterns, or relevant observations.
- Use varied emoji as bullet points.
- Include one brief closing sentence.
- Limit the entire response to a maximum of seven sentences.
Stress interpretation:
If a stress level is provided, interpret it using the following scale.
- 1–6 indicates stress balance may need improvement.
- 7–10 indicates strong stress balance.
"""
Test the Prompt Template for the Marketing Team
After you preview the response to confirm the model runs as expected, make sure it is ready for use in the system. Update the Contact Lightning Record Page for the Tranquil Trails app so that users can run the prompt from the new custom field.
Finally, test the feature using the contact record for Robinette Bullman. Use the features you’ve just created to update the Interest Summary field with an AI-generated overview of her related Fitness records.
Create a Prompt Template for an Engagement Email
The team is thrilled that these new prompt templates and automations are in place to summarize and translate client information. Now, Tranquil Trails wants to help wellness coaches easily create engaging, personalized emails that encourage clients to keep working toward their wellness goals. To do this quickly, the team wants the system to compare client information with available programs to suggest activities and offerings that align with client interests. This will save the coaches time from having to manually sort through interest and program records.
Create the Program Recommendation Prompt Template
Create a prompt template that will quickly create personalized email drafts for common sales scenarios. Name the template
Program Recommendation EmailThe template will also reference an Apex class already available in the Tranquil Trails system called Program_Recommendation with API name Prompt_Program_Recommendation_Invocable. This Apex class uses just a few lines of code to generate personalized program suggestions dynamically, informed by a client’s specific fitness interests.
Use the following instructions in the Prompt Template Workspace. Be sure to include full names where specified.
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 Program_Recommendation]
Follow these instructions strictly to generate the message to be sent to the client.
"""
Send AI-Powered Sales Emails
Preview the response to confirm that the model runs as expected and confirm that the prompt template is ready for use in the system. Make sure that wellness coach Victoria Bryant can select the Draft with Einstein feature in the native email activity. Test the feature as a user would by sending an email to Robinette Bullman using the Program Recommendation Email template. You do not need to log in as Victoria to test the feature.
After your successful test, it's time to share the results with the marketing and sales teams to demonstrate the features Prompt Builder offers. They can already tell that they will save countless hours previously spent manually sifting through client surveys, recommending program offerings, and drafting individual emails. The teams can’t wait for you to roll out more AI-powered features.



