AI Case Summaries with Prompt Builder + Flow

Every handoff starts with "let me read the case history…" — automate it, with zero code. A hands-on AI Projects Lab build.

The scenario

Falcon Telecom escalates ~80 cases a day to Tier 2. Each engineer spends 5–10 minutes reading months of case comments and emails before touching the problem. That's more than 10 engineer-hours daily spent reading, not fixing. We'll generate a structured summary on the case automatically whenever it's escalated.

For beginners: Prompt Builder is Salesforce's tool for reusable, grounded AI prompts — templates that merge real record data into the prompt at run time and send it to an LLM through the Einstein Trust Layer (masking, audit, zero retention). You use it from Flow, Apex, agents or record pages.

Step 1 — The prompt template

In Setup → Prompt Builder, create a Flex template with a Case input. Ground it with the fields and related lists you need, then write the instruction:

You are helping a Tier 2 support engineer take over a case.
Summarize for a technical reader. Use ONLY the data provided.

Case subject: {!$Input:Case.Subject}
Description:  {!$Input:Case.Description}
Comments:     {!$Input:Case.Comments}

Produce exactly this structure:
ISSUE: one sentence.
WHAT WAS TRIED: bullet list, chronological.
CURRENT STATE: one sentence.
SUGGESTED NEXT STEP: one sentence, only if clearly supported
by the history — otherwise write "No clear next step in history."
Why the rigid structure? Free-form summaries drift. A fixed skeleton makes outputs scannable, comparable across cases, and easy to test — you can literally assert the headings exist.

Step 2 — Invoke it from Flow

  1. Create a record-triggered Flow on Case: when Escalated becomes true.
  2. Add the standard "Prompt Template" action, select your template, pass the triggering case.
  3. Write the response into a rich-text field AI_Handoff_Summary__c, stamped with generation time.
  4. Show the field prominently on the Tier 2 case page layout, labeled clearly as AI-generated.

Step 3 — Make it trustworthy

Sources: Models and Prompts — Agentforce Developer Guide · Trailhead: Prompt Builder