创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成(练习操作步骤)

《创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成》的分步练习操作指南。...

📅 2026/10/2 ✍️ ponybai 🏷️ agentforce, salesforce, prompt-builder

本文是《创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成》的练习操作步骤。阅读原文请见:创建 Prompt Builder Flex Template — AI 驱动的个性化内容生成。

1. Sign Up for a Custom Playground

  1. Click Create Playground (org is auto-attached to your Trailhead account).
  2. Note the expiration date and complete the badge before then.

2. Enable Einstein

  1. In the Challenge section, click Launch to open your org.
  2. Click the gear icon and select Setup.
  3. In Quick Find, search for and select Einstein Setup, and ensure the toggle is On.
  4. Refresh your browser.

3. Add Experience Data

  1. Open the App Launcher, enter Experience, and click Experiences.
  2. 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.
  3. 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.

4. Create a Flex Template

  1. Click the gear icon and select Setup.
  2. In Quick Find, enter prompt and click Prompt Builder.
  3. 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
  4. Click Next.

5. Create the Prompt

  1. Paste the provided "Director of Fun" newsletter prompt into the Prompt workspace.

6. Add Merge Fields

  1. 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
  2. Under Models, select OpenAI GPT 4 Omni Mini.
  3. Click Save.

7. Test the Prompt

  1. Click Preview.
  2. In Reservation, type er and select any reservation.
  3. In Experience, type Sun and select Sunrise Yoga.
  4. Click Preview and review the output.

8. Create a Template-Triggered Prompt Flow

  1. Open the App Launcher, enter auto, and select Automation.
  2. In the Flows panel, click New, enter prompt, and select Template-Triggered Prompt Flow.
  3. Leave the input type as Manual Inputs.
  4. Add a Get Records element: Label Guest Experience, Object Experience, Condition None - Get All Experience Records, How Many Records All records, then Save.
  5. Set Flow Label Get Experience Newsletter Data, API Name Get_Experience_Newsletter_Data, Description Filter all guest experience data to return to guests., then Save.
  6. Add a Loop element: Label Loop Experiences, Collection Variable Experiences from Guest Experience, then Save.
  7. In the For Each path, add Add Prompt Instructions: Label Send Experience Details to the Prompt Template, then paste the provided prompt-instructions text.
  8. Click Save, then Activate.

9. Add the Flow to Your Prompt Template

  1. Exit Flow Builder and return to Setup.
  2. In Quick Find, enter prompt and click Prompt Builder.
  3. Select New Guest Newsletter.
  4. Delete the three Experience merge fields.
  5. Click Insert Resource and select Flows > Get Experience Newsletter Data.
  6. Click Save As, then Save as a New Version.

10. Test and Activate

  1. In Reservation, type er and select any reservation.
  2. In Experience, type Family and select Family Karaoke Night.
  3. Click Preview and review (response now includes both experiences).
  4. Click Activate.