本文是《Superbadge Prompt Builder Templates | 提示模板超级徽章:动手技能评估》的练习操作步骤。阅读原文请见:Superbadge Prompt Builder Templates | 提示模板超级徽章:动手技能评估。
1. Create a Template That Translates Text
- In Prompt Builder, create a new prompt template named
Translate Survey Input(API nameTranslate_Survey_Input). - Add three input objects:
Account(Account),Contact(Contact),Fitness(Fitness). - Paste the provided prompt text, replacing the bracketed placeholders with the appropriate resources, and remove any placeholder text.
- Test the prompt template (e.g., preview with Kyrstin Strong's account/contact and Fitness Interest-0906) and select a model that keeps the response within the Survey Input field's character limit.
2. Work with the Prompt Template in a Flow
- Open the existing Translate Fitness Survey Input flow (already has a Start element and two Get Records elements).
- Add a new Action element immediately after the two Get Records elements.
- Configure it to call the Translate Survey Input prompt template (do not manually assign variables; let the system store the response). Label
Translate Survey Input, API nameTranslate_Survey_Input. - Configure inputs:
- Account:
{!Get_Account} - Contact:
{!Get_Contact} - Fitness:
{!$Record}
- Account:
- Add an Update Records element
Update Translated Survey Inputthat updates the triggering Fitness record, setting Translated Survey Input from the prior action's response.
3. Test the Flow
- Create a sample Fitness record for Latisha Bryce with Survey Input
Ho sempre desiderato correre una maratonaand Interest TypeRunning. - Save the record and confirm the Translated Survey Input is filled with an English translation.
4. Build an AI-Generated Summary of Related Records
- Create a rich text custom field on Contact named
Interest Summary(API nameInterest_Summary__c). - Create a prompt template
Summarize Client Goals(API nameSummarize_Client_Goals) configured for the Interest Summary field. - Paste the provided prompt text, replacing bracketed placeholders with dynamic resources.
5. Update the Contact Lightning Record Page
- Update the Contact Lightning Record Page for the Tranquil Trails app so users can run the prompt from the Interest Summary field.
- Test using Robinette Bullman, generating an AI overview of her related Fitness records into the Interest Summary field.
6. Create the Program Recommendation Email Template
- Create a Sales Email prompt template
Program Recommendation Email(API nameProgram_Recommendation_Email). - Specify Contact as the Recipient (no Related Object).
- Reference the Apex class Program_Recommendation (API name
Prompt_Program_Recommendation_Invocable). - Add the provided instructions (including full names where specified).
7. Send AI-Powered Sales Emails
- Preview the response to confirm the template runs as expected.
- Ensure coach Victoria Bryant can use the Draft with AI feature.
- Test by sending an email to Robinette Bullman using the Program Recommendation Email template.