Skip to content
Last updated

Workflows for Marketers

WebDesktopMobile

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.

Note

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.

Objective

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.


A Day in the Life

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 StepHowWhy
Create a work folderCreate a work folder for campaign work and add an instruction describing your conventions — for example, the parent segment and connections you usually useThe instruction is saved as the folder's CLAUDE.md and applied to every chat inside it
Install CDP skillsFrom the Skills page, install segment, journey, engage, and connector-configGives the AI your CDP's YAML schemas and validation rules to follow
Choose a model tierUse Balanced for most campaign work; switch to Pro for complex branching logicBalances speed with reasoning quality on multi-step tasks

Mobile (iOS)

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.


Step-by-Step Workflow: Lapsed Customer Re-Engagement

Step 1: Define the Audience

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:

  1. Runs tdx ps desc to inspect your parent segment's available attributes and behaviors
  2. Determines the correct operators (TimeWithinPast, Between) and field names
  3. Generates the segment YAML with proper rule structure (guided by the segment skill)
  4. Validates the YAML with tdx sg validate
  5. 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.

Pro Tip

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.

Step 2: Design the Customer Journey

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:

  1. Structures the journey YAML with three stages, each containing wait steps, decision points, and activation steps (guided by the journey skill)
  2. References the lapsed_reengagement segment for entry criteria
  3. Defines the goal as a purchase behavior
  4. Validates the YAML with tdx journey validate
  5. 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.

Step 3: Inspect and Adjust the Journey

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.

Step 4: Create the Email Templates

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:

  1. Generates email template YAML with HTML content, merge tags ({{first_name}}), subject lines, and preheader text (guided by the engage skill)
  2. 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.

Step 5: Configure Activations

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:

  1. Runs tdx connection schema sendgrid to discover available fields (guided by the connector-config skill)
  2. Runs tdx connection schema salesforce for the Salesforce activation
  3. Updates the journey YAML with connector_config blocks that map customer attributes to connector fields
  4. 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.

Step 6: Preview and Push

Final review before going live:

Show me the final journey one more time, then push everything.

What the AI does:

  1. Renders the final journey canvas for one last review
  2. Runs tdx sg push "<parent segment>" to deploy the segment and its journey together
  3. 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.

Step 7: Check Status from Mobile

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.


Workflow Variations

The re-engagement campaign is one pattern. Here are other common marketer workflows:

Quick segment for ad targeting

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.

A/B test journey

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.

Email campaign with preview

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.


AI Transparency: How the Orchestrator Works

Throughout this workflow, the AI is making decisions you can see and override:

AI DecisionWhat You SeeHow to Override
Segment rule operatorsYAML visible in the Write tool call"Use GreaterThan instead of Between for the spend filter"
Journey stage structureCanvas preview with clickable nodes"Add a merge step before Stage 3" or "Remove the decision point"
Email content and toneHTML preview in the file panel"Make the CTA button red and bigger" or "Rewrite in a more urgent tone"
Connector field mappingsConfig visible in the updated YAML"Map account_owner_email to the Salesforce owner_id field instead"
Push targetCLI 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.


Platform-Specific Notes

CapabilityWebDesktop (Mac)Mobile (iOS)
Describe segments and journeys in natural languageYesYesYes
Visual segment previewYesYesYes
Journey canvas with clickable nodesYesYesYes
Email template previewYesYesYes
Push segments and journeys to productionYesYesYes
Pro Tip

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.


Success Criteria: The Business Result

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.


Verification

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

Troubleshooting

IssueSolution
Segment validation failsExpand 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 renderMake 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 HTMLCheck 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 conflictAnother user may have modified the segment. Run tdx ps desc to check the current state, then reconcile changes before pushing again

Next Steps