AI-Native Marketing
A Marketing-as-Code Guide with Treasure Data and Claude Code

Marketing has always been about reaching the right people with the right message. But the tools we use to make that happen? They've been stuck in a world of clicks, menus, and manual processes.
This book introduces a different approach: Marketing as Code.
What You'll Learn
With AI as your partner, you can now do things that used to require engineering support:
- Explore your data — Ask AI to investigate your customer tables and explain what you can target
- Write SQL queries — Describe what you want to know; AI writes the query
- Build audience segments — Tell AI who you want to reach; AI creates the targeting rules
- Design customer journeys — Describe the experience; AI builds the workflow
- Automate everything — AI writes scheduling logic that runs daily without your intervention
No SQL knowledge required. No YAML experience needed. You describe what you want. AI writes the code. You review and deploy.
The Learning Path
Day 1: You don't need to know SQL or YAML. AI handles the syntax.
Over time: Each chapter teaches you concepts that make you more powerful—not because you have to learn them, but because understanding them lets you guide AI more effectively.
The goal: You become a marketer who can manage complex customer journeys with accurate, efficient data pipelines—without waiting for engineering tickets.
How This Book Works
Each chapter follows the same pattern:
- A marketing problem — Something you've struggled with before
- How AI helps — What to ask, what AI generates
- What to review — How to understand what AI produced
- How to deploy — Getting your work into production safely
The examples are real. The conversations with AI are actual prompts you can use. The code is copy-paste ready.
Table of Contents
Part 1: The Shift
- Chapter 1: A New Paradigm — Why AI needs code, not UIs, to help you
- Chapter 2: Claude Code Basics — What makes Claude Code different
Part 2: Getting Started
- Chapter 3: Setting Up Your AI Partner — Installing tdx and launching Claude Code
- Chapter 4: Understanding YAML — What AI writes, and how to read it
Part 3: Your Data
- Chapter 5: Your Customer Data — Where customer data comes from
- Chapter 6: Exploring Your Data — Asking AI to investigate your tables
- Chapter 7: Writing Queries — AI writes SQL, you review results
Part 4: Audiences with AI
- Chapter 8: Your First Segment — Building your first audience
- Chapter 9: Refining Rules — Complex targeting with AI
- Chapter 10: Connecting Channels — Sending audiences to Salesforce, email, and more
Part 5: Journeys with AI
- Chapter 11: Your First Journey — Multi-step customer experiences
- Chapter 12: Journey Logic — Waits, branches, and A/B tests
Part 6: Automation
- Chapter 13: Workflows — Scheduling and automation
- Chapter 14: Building AI Agents — Create AI assistants for your team
Part 7: Ship with Confidence
- Chapter 15: Review and Deploy — Validation, testing, and safe deployment
Part 8: Team Collaboration
- Chapter 16: Version Control — Tracking changes with Git
- Chapter 17: GitHub Workflows — Team review and approval
Appendix
- Terminal Quick Reference — Common commands at a glance
- References — Further reading and resources
Before You Start
You'll need:
- A Treasure Data account
- Access to Claude Code (via
tdx claudecommand) - A terminal application (don't worry—we'll make friends with it)
Ready? Start with Chapter 1.