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 — without writing YAML by hand, switching between tools, or waiting for engineering support.


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, wait for it, design the journey in the console UI, configure each activation manually, set up the email templates in Engage, test, and pray the YAML validates. 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 projectCreate a project named "Campaign Ops" with CDP skills pre-selectedEvery conversation starts with the right context
Activate skillsSelect segment, journey, engage, and connector-configTeaches the AI your CDP's exact YAML schemas and validation rules
Choose a modelUse Balanced (Sonnet) for most campaign work; Pro (Opus) for complex branching logicBalances speed with reasoning quality on multi-step tasks

Mobile (iOS)

If you configured the "Campaign Ops" project on Web or Desktop, it's automatically available on Mobile with the same pre-selected skills. 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:

You: 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

What you see:

AI: [Tool: Bash] tdx ps desc "Customer 360"
    [Tool: Write] Created segment: lapsed_reengagement.yaml
    [Tool: Bash] tdx sg validate lapsed_reengagement.yaml → Passed
    [Tool: open_file] Rendering segment preview...

    I've created a segment "lapsed_reengagement" with these rules:

    - Last purchase: between 30 and 60 days ago
    - Any page view: within the last 90 days
    - Status: active (not churned)

    Validation passed. Here's the visual preview:

The file panel shows an interactive segment preview with 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:

You: 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 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 via open_file

What you see:

AI: [Tool: Write] Created journey: reengagement_journey.yaml
    [Tool: Bash] tdx journey validate reengagement_journey.yaml → Passed
    [Tool: open_file] Rendering journey canvas...

    Journey "Lapsed Re-engagement" created with 3 stages:

The file panel displays the journey canvas — a visual flow diagram showing:

  • Entry node (blue circle) linked to the lapsed_reengagement segment
  • Stage 1: Wait (1 day) → "We miss you" email activation (green square)
  • Stage 2: Wait (5 days) → Decision point (yellow diamond): purchased? → Yes: End / No: Discount email
  • Stage 3: Wait (7 days) → Decision point: purchased? → Yes: End / No: Salesforce task
  • Goal badge showing "any purchase event"

Step 3: Inspect and Adjust the Journey

Click through the journey canvas to verify each step:

  • Click a decision diamond → See the segment condition that determines the branch
  • Click an activation square → See the connector configuration and field mappings
  • Click a wait circle → See the duration and any early-exit conditions
You: 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:

You: 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

What you see:

AI: [Tool: Write] Created template: touch1_we_miss_you.yaml + .html
    [Tool: open_file] Rendering email preview...

    [Tool: Write] Created template: touch2_discount.yaml + .html
    [Tool: open_file] Rendering email preview...

The file panel shows rendered email previews — full HTML with merge tags highlighted. You can see exactly how the email will look before deploying.

You: 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:

You: 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 proper connector_config blocks mapping customer attributes to connector fields
  4. Re-validates the complete configuration
AI: [Tool: Bash] tdx connection schema sendgrid
    [Tool: Bash] tdx connection schema salesforce
    [Tool: Write] Updated journey with activation configs
    [Tool: Bash] tdx journey validate reengagement_journey.yaml → Passed

    Activations configured:
    - Stages 1 & 2: SendGrid email with first_name, email, segment_name
    - Stage 3: Salesforce Task with subject, owner_id, description, due_date

Step 6: Preview and Push

Final review before going live:

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

What the AI does:

  1. Renders the final journey canvas with all activations configured
  2. You review the complete flow one last time
  3. Pushes the segment: tdx sg push "Customer 360"
  4. Reports the deployment result
AI: [Tool: open_file] Final journey preview rendered.
    [Tool: Bash] tdx sg push "Customer 360"

    Successfully pushed:
    - Segment: lapsed_reengagement (created)
    - Journey: reengagement_journey (created, 3 stages, 5 activations)

    The journey is now live. Customers matching the lapsed_reengagement
    segment will begin entering Stage 1 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:

You: How is the re-engagement journey performing so far?

The AI queries the journey's entry counts and stage distribution, giving you a quick status check. You can also ask follow-up questions or make adjustments directly from Mobile.


Workflow Variations

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

Quick Segment for Ad Targeting

You: 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.

AI: 1. [Bash] tdx ps desc → schema inspection
    2. [Write] Segment YAML with spend + geo + recency rules
    3. [Bash] tdx sg validate → passed
    4. [open_file] Visual rule preview
    5. [Bash] tdx sg push → deployed

A/B Test Journey

You: Create a journey that A/B tests two subject lines for our
     welcome email — split 50/50, measure by open rate after 3 days.

AI: 1. [Write] Journey YAML with A/B test step (50/50 split)
    2. Two activation branches with different email templates
    3. Wait step + decision point to measure opens
    4. [open_file] Canvas showing the A/B split visually
    5. [Bash] tdx journey validate + push

Email Campaign with Preview

You: Create a product launch email campaign. Use our brand template
     and target the "engaged_users" segment.

AI: 1. [Write] Template YAML with HTML email content
    2. [open_file] Visual email preview
    3. [Write] Campaign YAML with audience and UTM params
    4. [open_file] Campaign preview
    5. [Bash] tdx engage campaign push → deployed

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 (via project)
Journey canvas with clickable nodesYesYesYes (via project)
Email template previewYesYesYes (via project)
Push segments and journeys to productionYesYesYes
Review journey status on the go----Yes
Pro Tip

Set up your campaign projects on Desktop with the right skills and instructions, then use Mobile for quick reviews, status checks, and approvals throughout the day. The same project context applies across all platforms.


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
  • An auditable trail — The full conversation documents every decision, from segment criteria to journey branching logic

All produced in a single session, without writing YAML by hand, waiting for engineering support, or switching between 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 renderEnsure the journey YAML is valid — run tdx journey validate first. The canvas requires at least one stage with an entry step
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