# AI-Native Marketing *A Marketing-as-Code Guide with Treasure Data and Claude Code* ![AI-Native Marketing](/assets/ai_native_cover.e1f14b62385777c95b51d318255e91b971b2eeb3b9bf2336413c32212cda09f0.cabec8d9.avif) 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: 1. **A marketing problem** — Something you've struggled with before 2. **How AI helps** — What to ask, what AI generates 3. **What to review** — How to understand what AI produced 4. **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](/treasure-code/book/01-new-paradigm) — Why AI needs code, not UIs, to help you - [Chapter 2: Claude Code Basics](/treasure-code/book/02-claude-code) — What makes Claude Code different ### Part 2: Getting Started - [Chapter 3: Setting Up Your AI Partner](/treasure-code/book/03-ai-setup) — Installing tdx and launching Claude Code - [Chapter 4: Understanding YAML](/treasure-code/book/04-understanding-yaml) — What AI writes, and how to read it ### Part 3: Your Data - [Chapter 5: Your Customer Data](/treasure-code/book/05-customer-data) — Where customer data comes from - [Chapter 6: Exploring Your Data](/treasure-code/book/06-exploring-data) — Asking AI to investigate your tables - [Chapter 7: Writing Queries](/treasure-code/book/07-writing-queries) — AI writes SQL, you review results ### Part 4: Audiences with AI - [Chapter 8: Your First Segment](/treasure-code/book/08-first-segment) — Building your first audience - [Chapter 9: Refining Rules](/treasure-code/book/09-segment-rules) — Complex targeting with AI - [Chapter 10: Connecting Channels](/treasure-code/book/10-activations) — Sending audiences to Salesforce, email, and more ### Part 5: Journeys with AI - [Chapter 11: Your First Journey](/treasure-code/book/11-first-journey) — Multi-step customer experiences - [Chapter 12: Journey Logic](/treasure-code/book/12-journey-logic) — Waits, branches, and A/B tests ### Part 6: Automation - [Chapter 13: Workflows](/treasure-code/book/13-workflows) — Scheduling and automation - [Chapter 14: Building AI Agents](/treasure-code/book/14-agents) — Create AI assistants for your team ### Part 7: Ship with Confidence - [Chapter 15: Review and Deploy](/treasure-code/book/15-review-deploy) — Validation, testing, and safe deployment ### Part 8: Team Collaboration - [Chapter 16: Version Control](/treasure-code/book/16-version-control) — Tracking changes with Git - [Chapter 17: GitHub Workflows](/treasure-code/book/17-github-workflows) — Team review and approval ### Appendix - [Terminal Quick Reference](/treasure-code/book/appendix-commands) — Common commands at a glance - [References](/treasure-code/book/appendix-references) — Further reading and resources ## Before You Start You'll need: - A Treasure Data account - Access to Claude Code (via `tdx claude` command) - A terminal application (don't worry—we'll make friends with it) Ready? [Start with Chapter 1](/treasure-code/book/01-new-paradigm).