Generative UX · Prompt Builder & Flow

Prompt engineering, flow integration & content orchestration

Moving beyond the “chatbox” to a structured AI utility. This series documents the technical orchestration required to turn large language models into reliable UX components, shifting from random outputs to grounded, predictable, context-aware systems that cut cognitive load and eliminate information fragmentation.

Role
Product & Interaction Designer
Platform
Salesforce Einstein
Focus
Prompt Engineering
Discipline
Content Orchestration
Prompt Builder Flow Builder Einstein AI Data Cloud GPT-4o Mini
Case Study 01 · Coral Cloud Resorts

Orchestrating predictable content with Prompt Builder

How do we stop AI from guessing? By grounding it. I built a Field Generation template that uses real-time CRM data to turn complex case histories into 100-word “Quick Summaries”, putting the most important context exactly where support agents need it.

Client
Coral Cloud Resorts
Surface
Case Record Page
Pattern
Field Generation
Model
GPT-4o Mini
Prompt Builder · Quick Summary · Resolved Prompt → Generated Response
Prompt Builder showing the resolved prompt grounded in case data and the generated single-paragraph summary
The outcome. A grounded prompt concatenates real case comments, subject, priority and type, and returns a single, factual “Quick Summary” in ~3 seconds.
01 The Challenge

Context overload on every new case

Support agents at Coral Cloud had to manually parse long threads of comments, subjects and metadata just to understand a case, slowing “time to resolution” and fragmenting the experience.

The goal: build a system that auto-summarises complex case data into a single, high-utility paragraph, without losing factual accuracy.

01

Manual synthesis

Agents read entire comment threads before they could even start helping.

02

Slower resolution

Time spent parsing history is time not spent solving the problem.

03

Fragmented context

Key facts scattered across subject, priority, type and comments.

02 The Solution · Step 1

Environmental readiness & infrastructure

Before designing the logic, I made sure the generative ecosystem was active, enabling the Einstein Generative AI layers so the LLM could communicate securely with proprietary data.

Turned on Einstein & the generative AI infrastructure inside the platform.
Integrated AI directly into the record page to reduce “app switching.”
Kept the user focused on the case, not hunting across tabs for summaries.
Setup · Welcome, Dapo
Salesforce Setup home environment
The environment. The Salesforce Setup foundation.
Einstein Setup · Turn on Einstein
Einstein Setup page with Turn on Einstein toggled on
Readiness. Enabling Einstein Generative AI.
03 The Solution · Step 2

Dynamic grounding & resource mapping

A summary is only useful if it’s accurate. I replaced static placeholders with dynamic merge fields, mapping the prompt to pull specifically from Case.CaseComments, Case.Subject and Case.Priority.

Instead of “summarise this case,” I instructed it to “summarise the concatenation of these specific data points.” That’s grounding, the LLM only uses facts present in the record.

Prompt Builder · Quick Summary · Template
Prompt template using dynamic merge fields for case comments, subject, priority and type
Grounded by design. Dynamic merge fields bind the prompt to the record’s real data, no guessing.
04 The Solution · Step 3

Deterministic governance: the guardrails

To keep the design predictable, I selected GPT-4o Mini and applied strict instructional guardrails, constraining the output to a single short paragraph so the AI never becomes verbose.

One consistent format means agents build a reliable mental model of where to look.
A bounded length protects the user’s cognitive load on every case.
Predictable structure > creative variation for a business-critical tool.
05 The Solution · Step 4

Interface integration with Dynamic Forms

The final step brought the AI to the user’s fingertips. I upgraded the Case record page to Dynamic Forms and associated the “Quick Summary” field with the prompt template, adding the “Einstein Sparkle” that signals AI assistance is available.

Lightning App Builder · Case Record Page · Quick Summary
Case record page in Lightning App Builder with the Quick Summary field and Einstein sparkle icon
At their fingertips. The Quick Summary field lives in the record’s Case Information, AI-generated in place, no app switching.
· Key results & impact

Seconds, not minutes. 100% factual

Grounding the prompt in real case data turned minutes of manual reading into an instant, trustworthy summary.

~5 seconds
Efficiency gain
vs. 2–3 minutes of manual reading per case.
Zero-friction UI
In-context generation
Generated right inside the Quick Summary field.
100% factual
High fidelity
Grounded in case comments, no hallucinations.
Case Study 02 · Coral Cloud Resorts

Context-aware newsletters with Flex templates

Personalisation often fails to a “data silo” problem, guest reservations and on-site experiences live in separate objects, and static templates can’t bridge them. I built a Flex Prompt Template: a versatile, entry-point-free AI asset that synthesises multiple data sources into one cohesive, branded guest newsletter.

Client
Coral Cloud Resorts
Asset
Flex Prompt Template
Persona
“Director of Fun”
Scope
Omnichannel · Flow-ready

A Flex template acts as a central intelligence hub, portable across Apex, Flows, or Agentforce, so the same personalised voice shows up at every guest touchpoint.

01 The Challenge

Personalisation broken by data silos

Guest reservation data and on-site experience schedules lived in separate objects, and static email templates couldn’t bridge the gap, so communications stayed generic.

01

Data silos

Reservations and experiences sat in different objects, never combined.

02

Generic comms

Static templates couldn’t personalise around a guest’s actual stay.

03

Fragmented view

Guests never saw a holistic picture of their vacation in one place.

02 Phase 1 · Resource Mapping

Cross-object grounding

To build a complete guest mental model, the AI needed more than one data stream. I configured the template with dual inputs, the External Reservation object (stay dates, room types) and the Experience object (activity details).

Mapping disparate data into a single prompt eliminates information fragmentation, the guest gets a holistic view of their vacation in one interaction.

New Prompt Template · Flex · Inputs
New Flex prompt template with two inputs: External Reservation and Experience
Dual inputs. A Flex template type takes Reservation and Experience objects as grounded data sources.
03 Phase 2 · Persona Engineering

The “Director of Fun” voice

I established a specific brand voice by assigning the AI the role of “Director of Fun,” with strict stylistic guardrails: active voice, no filler words, a three-paragraph limit.

Defining the persona before the task shifts the output from a cold data summary to a warm, welcoming experience that builds brand affinity.

Prompt Builder · New Guest Newsletter · Template
Prompt template written in the Director of Fun persona with grounded reservation and experience fields
Persona first. The prompt opens by casting the agent, then grounds every detail in real reservation and experience fields.
04 Phase 3 · Proactive Discovery

Serving experiences, not searches

To drive engagement, I engineered a structured “Experience” section, turning technical record data into a bulleted list of activities that works as a conversational discovery tool.

This cuts the guest’s search effort: instead of hunting for a resort map or schedule, the most relevant activities are served directly, based on their reservation context.

Preview · Resolved Prompt → Generated Newsletter
Generated newsletter welcoming the guest with check-in details and a Sunrise Yoga experience
Discovery built in. Check-in details plus a curated experience (Sunrise Yoga) arrive in one branded, on-voice newsletter.
05 Phase 4 · Scalability

System scalability & flow readiness

A guest’s stay involves more than one activity, so I built the template to be Flow-compatible, scaling from a single-activity preview to a multi-day itinerary by injecting collections of data via a Template-Triggered Prompt Flow.

Preview · Version 2 · Multi-experience newsletter
Version 2 newsletter listing multiple experiences: Family Karaoke Night and Sunrise Yoga
Scales cleanly. The same template renders a multi-activity itinerary, Family Karaoke Night and Sunrise Yoga, from a collection of records.
· Key results & impact

One voice, zero clicks, fully modular

Synthesising siloed data through a persona-driven Flex template produced a personalised newsletter that scales across every channel.

Cohesive voice
Brand consistency
A consistent “Director of Fun” persona across automated comms.
Zero-click
Reduced interaction cost
Check-in details + activity discovery in one personalised newsletter.
Modular
Reusable everywhere
Same logic for mobile app, guest portal, or email triggers.
Case Study 03 · Coral Cloud Resorts

Scaling AI intelligence with template-triggered flows

A single data point rarely tells the whole story. Previously the AI could only “see” one experience at a time, but a guest stays for multiple days and needs a full itinerary. The challenge was technical: how to inject an entire collection of dynamic records into one prompt without manual data entry.

Client
Coral Cloud Resorts
Mechanism
Template-Triggered Flow
Pattern
1-to-Many
Approach
Systems Design

I engineered a Prompt-Flow bridge, a data harvester that turns the LLM from a record-summariser into an itinerary orchestrator.

01 The Challenge

One prompt, many records

The AI could summarise a single experience, but a real itinerary spans days and many activities, and feeding a whole collection into one prompt by hand doesn’t scale.

01

Single-record ceiling

The template could only “see” one experience at a time.

02

Manual bottleneck

Adding every event by hand is slow, brittle, and unscalable.

03

Incomplete plumbing

Without all the data, the AI writes an incomplete story.

02 Phase 1 · Get Records

Automated data retrieval

I replaced manual resource selection with an automated Get Records element, a background query that retrieves all active resort events at once.

This moves the system from reactive (waiting for someone to pick an event) to proactive (automatically finding every relevant event), cutting interaction cost for the internal team.

Flow Builder · Get Experience Newsletter Data · Get Records → Loop
Template-triggered flow with a Get Records element feeding a Loop over guest experiences
The harvester. A Get Records query gathers every active experience, then a Loop iterates the whole collection.
03 Phase 2 · Looping

Pattern recognition, not data dumps

To give the LLM clean, structured data, I added a Loop element that iterates the collection, capturing each Name, Location and Description in a predictable pattern.

Instead of a messy data dump, the loop organises information into a consistent shape, which is what lets the LLM hold its output integrity.

04 Phase 3 · The Connector

Defining prompt instructions

Inside the loop, I used the Add Prompt Instructions element, a UX-to-logic connector that feeds formatted text back to Prompt Builder, so the AI knows exactly where one event ends and the next begins.

Flow · Add Prompt Instructions · {!Loop_Experiences …}
Add Prompt Instructions element formatting each looped experience's name, location and description
The connector. Each iteration appends a clean Name · Location · Description block for the next event.
05 Phase 4 · Integration

Closing the loop in Prompt Builder

Back in Prompt Builder, I swapped the static single-record fields for the new Flow Resource, letting the “Director of Fun” summarise a dynamic list of events in one cohesive newsletter.

Prompt Builder · Flows: Get Experience Newsletter Data
Prompt template now sourcing its experience list from the flow resource instead of a single static record
Wired up. One swap, static fields → flow resource, turns a single-record summary into a full, dynamic itinerary.
· Key results & impact

From one record to a living itinerary

A flow-powered prompt let the AI handle real one-to-many relationships, a complete, live schedule instead of a single sample.

1-to-Many
Information density
One reservation, many experiences, handled seamlessly.
Live inventory
Dynamic personalisation
Schedules tailored to the resort’s real-time events.
Always complete
Reduced friction
The flow guarantees the data plumbing before the AI writes.