This guide walks through the workflow a marketer follows inside Treasure AI Studio — from a campaign brief to a live customer journey with email activations. You describe what you want in plain language, and the AI handles the YAML, validation, and deployment commands so you can focus on strategy.
The AI generates CDP configurations (segments, journeys, activations) in the exact YAML format your Treasure AI platform expects. Every definition it produces is validated before you push it to production. You see a visual preview of the journey canvas and can click through each step to verify the logic before anything goes live.
Enable marketers to go from "We need a re-engagement campaign for lapsed customers" to a live, validated customer journey with email activations — in one conversation, instead of clicking through separate console screens, handing work between teams, or waiting on engineering.
The head of marketing drops a brief in your project channel: "We're seeing churn in the 30-60 day inactive segment. Build a 3-touch re-engagement journey — offer a discount on the second touch, escalate to a personal outreach on the third. I need it live by Thursday."
Normally this means: request a segment from the data team and wait for it, build the journey in the console, configure each activation, set up the email templates in Engage, and QA the result. Pieces owned by different teams, stitched together over days.
In Studio, it's one conversation. You describe the campaign strategy, the AI builds the segment, designs the journey flow, generates the email templates, configures the activations, and gives you visual previews at each step. You steer the strategy — the AI handles the implementation.
Before starting the workflow, configure your environment:
| Setup Step | How | Why |
|---|---|---|
| Create a work folder | Create a work folder for campaign work and add an instruction describing your conventions — for example, the parent segment and connections you usually use | The instruction is saved as the folder's CLAUDE.md and applied to every chat inside it |
| Install CDP skills | From the Skills page, install segment, journey, engage, and connector-config | Gives the AI your CDP's YAML schemas and validation rules to follow |
| Choose a model tier | Use Balanced for most campaign work; switch to Pro for complex branching logic | Balances speed with reasoning quality on multi-step tasks |
The work folders you set up on Web or Desktop are available on Mobile too, since they're tied to your account. You can review journey previews, check on campaign status, and send follow-up instructions from your phone — useful for quick approvals or adjustments when you're away from your desk.
Start by describing the audience in business terms:
Create a segment for customers who haven't made a purchase in 30 to 60 days
but were active in the last 90 days. Call it "lapsed_reengagement".What the AI does behind the scenes:
- Runs
tdx ps descto inspect your parent segment's available attributes and behaviors - Determines the correct operators (
TimeWithinPast,Between) and field names - Generates the segment YAML with proper rule structure (guided by the segment skill)
- Validates the YAML with
tdx sg validate - Renders a visual segment preview
Every command runs as an expandable tool call in the chat. When it finishes, the file panel shows an interactive segment preview — the rule tree, condition operators, and attribute sources — so you can verify the logic matches your intent.
If the segment looks right, you can push immediately: "Push this segment." The AI runs tdx sg push and reports the result. But for this workflow, we'll continue to the journey first.
Now describe the journey flow in conversational terms:
Build a re-engagement journey with 3 stages:
Stage 1 (Awareness): Wait 1 day after entry, then send a "We miss you" email.
Stage 2 (Incentive): Wait 5 days. If they haven't purchased, send a 15%
discount email. If they purchased, end the journey.
Stage 3 (Escalation): Wait 7 days. If still no purchase, trigger a personal
outreach via a Salesforce task. If purchased, end.
Entry: the lapsed_reengagement segment we just created.
Goal: any purchase event.What the AI does:
- Structures the journey YAML with three stages, each containing wait steps, decision points, and activation steps (guided by the journey skill)
- References the
lapsed_reengagementsegment for entry criteria - Defines the goal as a purchase behavior
- Validates the YAML with
tdx journey validate - Renders the journey canvas
The file panel opens the journey canvas — a visual flow diagram of the three stages, showing each wait, decision point, and activation, along with the entry segment and the goal. Review it to confirm the flow matches your brief before continuing.
Click through the journey canvas to verify each step. Select any node to see its configuration:
- A decision node shows the segment condition that determines the branch
- An activation node shows the connector configuration and field mappings
- A wait node shows the duration and any early-exit conditions
Change the Stage 2 wait from 5 days to 3 days, and make the discount 20%
instead of 15%.The AI updates the YAML, re-validates, and re-renders the canvas — you see the changes reflected immediately.
With the journey structure validated, create the email content:
Create the email templates for this journey:
Touch 1 — "We miss you" email: warm, personal tone.
Subject: "It's been a while, {{first_name}}"
Touch 2 — Discount email: urgency tone with a clear CTA.
Subject: "{{first_name}}, here's 20% off — just for you"What the AI does:
- Generates email template YAML with HTML content, merge tags (
{{first_name}}), subject lines, and preheader text (guided by the engage skill) - Renders a live email preview
The file panel shows rendered email previews — full HTML with merge tags in place — so you can see how each email will look before deploying.
The discount email needs a bigger CTA button and a countdown timer mention
in the preheader. Fix those.The AI updates the HTML template and re-renders the preview.
With templates and journey validated, configure the activation connectors:
Configure the email activations to use our SendGrid connector, and the
Stage 3 Salesforce activation to create a task assigned to the account owner.What the AI does:
- Runs
tdx connection schema sendgridto discover available fields (guided by the connector-config skill) - Runs
tdx connection schema salesforcefor the Salesforce activation - Updates the journey YAML with
connector_configblocks that map customer attributes to connector fields - Re-validates the complete configuration
The updated YAML and each schema lookup are visible in their tool calls, so you can confirm the field mappings before pushing.
Final review before going live:
Show me the final journey one more time, then push everything.What the AI does:
- Renders the final journey canvas for one last review
- Runs
tdx sg push "<parent segment>"to deploy the segment and its journey together - Reports what was created and confirms the journey is live
Once pushed, customers who match the segment begin entering the journey on the next refresh cycle.
Later that evening, you want to verify the journey is running. Open Studio on your phone:
How is the re-engagement journey performing so far?The AI runs a journey stats check and reports how the journey is performing — stage populations and conversion so far. Because commands run server-side, this works the same from your phone; you can keep asking follow-up questions from Mobile.
The re-engagement campaign is one pattern. Here are other common marketer workflows:
Build a segment of high-value customers (>$500 lifetime spend) in the US
who visited the pricing page in the last 7 days. Push it so I can use it
for a Google Ads audience.The AI inspects the parent segment with tdx ps desc, writes the segment YAML (spend, geo, and recency rules), validates it with tdx sg validate, renders a visual rule preview, and pushes it with tdx sg push.
Create a journey that A/B tests two subject lines for our welcome email —
split 50/50, and measure by open rate after 3 days.The AI writes a journey YAML with a 50/50 A/B-test step, two activation branches using different email templates, and a wait-then-decision step to measure opens, renders the canvas, then validates and pushes the journey.
Create a product launch email campaign. Use our brand template and target
the "engaged_users" segment.The AI writes the template YAML with HTML content and shows an email preview, then writes the campaign YAML (audience and UTM parameters), shows a campaign preview, and deploys with tdx engage campaign push.
Throughout this workflow, the AI is making decisions you can see and override:
| AI Decision | What You See | How to Override |
|---|---|---|
| Segment rule operators | YAML visible in the Write tool call | "Use GreaterThan instead of Between for the spend filter" |
| Journey stage structure | Canvas preview with clickable nodes | "Add a merge step before Stage 3" or "Remove the decision point" |
| Email content and tone | HTML preview in the file panel | "Make the CTA button red and bigger" or "Rewrite in a more urgent tone" |
| Connector field mappings | Config visible in the updated YAML | "Map account_owner_email to the Salesforce owner_id field instead" |
| Push target | CLI command visible in the Bash tool call | "Push to staging first" or "Do a dry run" |
The AI follows active skills (segment, journey, engage, connector-config) for your CDP's exact YAML schemas and validation rules. Every generated file is validated before push, and every push command supports --dry-run for safe testing.
| Capability | Web | Desktop (Mac) | Mobile (iOS) |
|---|---|---|---|
| Describe segments and journeys in natural language | Yes | Yes | Yes |
| Visual segment preview | Yes | Yes | Yes |
| Journey canvas with clickable nodes | Yes | Yes | Yes |
| Email template preview | Yes | Yes | Yes |
| Push segments and journeys to production | Yes | Yes | Yes |
Set up your campaign work folders on Desktop, then use Mobile for quick reviews, status checks, and approvals throughout the day. Your work folders are tied to your account, so they're available on every platform.
At the end of this workflow, you have:
- A validated audience segment — Targeting rules verified against the parent segment schema
- A live customer journey — 3-stage flow with wait steps, decision branches, and activations, visually confirmed on the canvas
- Email templates — HTML content previewed inline with merge tags resolved
- Configured activations — SendGrid for email and Salesforce for personal outreach, with field mappings verified against connector schemas
- A record of the session — The full conversation captures every decision and the exact commands run, from segment criteria to journey branching logic
All produced in a single session — instead of coordinating across teams and clicking through separate console UIs.
After following this workflow, you can:
- Describe a target audience in business terms and receive a validated segment YAML
- Design a multi-stage journey with decision points and A/B tests using natural language
- Preview the journey canvas and click through each step to verify logic
- Generate and preview email templates with merge tags
- Configure activation connectors using schema discovery
- Push the complete campaign to production and verify deployment
| Issue | Solution |
|---|---|
| Segment validation fails | Expand the error details from tdx sg validate. Common causes: referencing attributes not in the parent segment, or using an incorrect operator for the attribute type |
| Journey canvas does not render | Make sure the file uses the .journey.yaml (or .journey.yml) extension — a plain .yaml file opens as code, not a canvas. Then confirm the YAML is valid with tdx journey validate |
| Email template preview shows broken HTML | Check the HTML in the template YAML for unclosed tags or missing merge-tag syntax. Ask the AI to "fix the HTML in the email template" |
tdx sg push reports a conflict | Another user may have modified the segment. Run tdx ps desc to check the current state, then reconcile changes before pushing again |
- Journey Canvas Visualization — Deep dive into reading and navigating the canvas
- Skills & Marketplace — Configure segment, journey, and engage skills
- Agent Orchestrator — Understand how the AI chains tools together
- File Output — Export campaign documentation as PPTX or PDF
- Core Concepts — Set up work folders and install skills for campaign work