本文是《创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成》的练习操作步骤。阅读原文请见:创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成。
1. Sign Up for a Custom Playground
- Click Create Playground (org is auto-attached to your Trailhead account).
- Note the expiration date and complete the badge before then.
2. Enable Einstein
- In the Challenge section, click Launch to open your org.
- Click the gear icon and select Setup.
- In Quick Find, search for and select Einstein Setup, and ensure the toggle is On.
- Refresh your browser.
3. Add Experience Data
- Open the App Launcher, enter
Experience, and click Experiences. - Click New and create the first event:
- Experience Name:
Family Karaoke Night - Activity Level: Low; Capacity:
50; Default Start Time:6:00 PM - Description: paste the provided karaoke night text
- Duration:
2; Location:Melody Lounge; Type: Family & Kids' Activities - Click Save & New.
- Experience Name:
- Create the second event:
- Experience Name:
Sunrise Yoga - Activity Level: Medium; Capacity:
35; Default Start Time:7:00 AM - Description: paste the provided yoga text
- Duration:
1; Location:Cocoa Shore; Type: Fitness & Exercise - Click Save.
- Experience Name:
4. Create a Flex Template
- Click the gear icon and select Setup.
- In Quick Find, enter
promptand click Prompt Builder. - Click New Prompt Template with these values:
- Type: Flex; Name:
New Guest Newsletter; API Name:New_Guest_Newsletter - Description:
Newsletter for incoming resort guests. - Resource 1: Name
Reservation, Source Type Object, Object External Reservation - Resource 2: Name
Experience, Source Type Object, Object Experience
- Type: Flex; Name:
- Click Next.
5. Create the Prompt
- Paste the provided "Director of Fun" newsletter prompt into the Prompt workspace.
6. Add Merge Fields
- Replace each placeholder with Insert Resource:
{the new guest}→ Reservation > External Guest > First Name{Check-in Date}→ Reservation > Check-in Date{Check-out Date}→ Reservation > Check-out Date{Room Type}→ Reservation > Room Type{Experience Name}→ Experience > Experience Name{Experience Location}→ Experience > Location{Experience Details}→ Experience > Description
- Under Models, select OpenAI GPT 4 Omni Mini.
- Click Save.
7. Test the Prompt
- Click Preview.
- In Reservation, type
erand select any reservation. - In Experience, type
Sunand selectSunrise Yoga. - Click Preview and review the output.
8. Create a Template-Triggered Prompt Flow
- Open the App Launcher, enter
auto, and select Automation. - In the Flows panel, click New, enter
prompt, and select Template-Triggered Prompt Flow. - Leave the input type as Manual Inputs.
- Add a Get Records element: Label
Guest Experience, Object Experience, Condition None - Get All Experience Records, How Many Records All records, then Save. - Set Flow Label
Get Experience Newsletter Data, API NameGet_Experience_Newsletter_Data, DescriptionFilter all guest experience data to return to guests., then Save. - Add a Loop element: Label
Loop Experiences, Collection Variable Experiences from Guest Experience, then Save. - In the For Each path, add Add Prompt Instructions: Label
Send Experience Details to the Prompt Template, then paste the provided prompt-instructions text. - Click Save, then Activate.
9. Add the Flow to Your Prompt Template
- Exit Flow Builder and return to Setup.
- In Quick Find, enter
promptand click Prompt Builder. - Select New Guest Newsletter.
- Delete the three Experience merge fields.
- Click Insert Resource and select Flows > Get Experience Newsletter Data.
- Click Save As, then Save as a New Version.
10. Test and Activate
- In Reservation, type
erand select any reservation. - In Experience, type
Familyand select Family Karaoke Night. - Click Preview and review (response now includes both experiences).
- Click Activate.