Skip to main content

Campaign Activation and Trafficking Agent on Snowflake

A media team spent hours turning approved insertion orders into live campaigns. For every order they checked the sales opportunity, built a trafficking sheet, then set up each campaign by hand on every ad platform. They wanted an agent that could take an approved order and do the setup for them.

15custom agent tools
16/16test cases passed
9ad platform tools built
Pausedby default
HOW THE PIECES CONNECT

A Snowflake Cortex Agent with 15 tools turns approved insertion orders into paused campaigns across ad platforms. Passed 16 of 16 test cases.

  1. 01

    Approved insertion order

  2. 02

    Approve the opportunity

  3. 03

    Build trafficking workbook

  4. 04

    Create paused campaigns

Conceptual workflow for this use case. Not a screenshot or a claim about measured results.

Generative AI Solutions

Marketing & Advertising

The full story

We built a Cortex Agent on Snowflake with 15 custom tools written as Python stored procedures. The agent reads the insertion order, approves the matching sales opportunity, builds a trafficking workbook and creates paused campaigns on each ad platform. Each platform tool calls that platform’s API through Snowflake External Access Integrations, with credentials stored in Snowflake Secrets.

Kevel runs live end to end, and the agent creates the advertiser automatically if it does not exist yet. Tools for Google Ads, Microsoft Ads, Pinterest, Snapchat, Reddit, The Trade Desk, Criteo and LinkedIn are built and connected to each platform’s API. Any line with no platform connection goes to manual trafficking, and the agent logs a follow-up case for it.

Media planners can now activate an order with a chat message. Every campaign starts paused, so a person reviews it before any money is spent. The agent passed all 16 of its test cases.

Every approved order meant hours of repeated setup across ad platforms.

01

Planners checked the sales opportunity by hand for each insertion order.

02

A trafficking sheet was built manually for every order.

03

Each campaign was set up by hand on every ad platform.

How we structured the engagement

One agent, one tool per step and per platform, and nothing goes live without review.

  1. Phase 01

    Order and opportunity

    Tools to read the insertion order and approve the matching sales opportunity.

  2. Phase 02

    Trafficking workbook

    A tool that builds the trafficking workbook from the order lines.

  3. Phase 03

    Platform tools

    Platform tools that call each API through External Access Integrations with credentials in Snowflake Secrets. Kevel runs live end to end, including automatic advertiser creation.

  4. Phase 04

    Fallback and testing

    Lines with no platform connection route to manual trafficking with a logged follow-up case. The agent passed all 16 test cases.

What we built, component by component

  1. 01

    Cortex Agent

    Takes the planner’s chat request and orchestrates the 15 tools.

  2. 02

    Order and opportunity tools

    Read the insertion order and approve the matching sales opportunity.

  3. 03

    Trafficking workbook tool

    Builds the trafficking workbook for the order.

  4. 04

    Ad platform tools

    Kevel (live end to end), Google Ads, Microsoft Ads, Pinterest, Snapchat, Reddit, The Trade Desk, Criteo and LinkedIn, each calling its platform API.

  5. 05

    External Access Integrations and Secrets

    Outbound API access from Snowflake, with platform credentials held in Snowflake Secrets.

  6. 06

    Manual trafficking fallback

    Unconnected lines go to manual trafficking and a follow-up case is logged.

A planner asks the agent to activate an approved order. The agent reads the insertion order, approves the sales opportunity, builds the trafficking workbook and calls each platform tool, which creates the campaign in a paused state through the platform API. Lines without a platform connection are routed to manual trafficking with a follow-up case.

Cortex Agent
Order and opportunity tools
Trafficking workbook tool
Ad platform tools
External Access Integrations and Secrets

The trade-offs we made and why

Decision 01Lead trade-off

Every campaign is created paused

A person reviews each campaign before any money is spent, so the agent saves setup time without taking spend decisions on its own.

Decision 02

API calls and credentials stay in Snowflake

External Access Integrations and Snowflake Secrets keep platform credentials out of code and keep the whole workflow inside the governed platform.

Decision 03

Explicit fallback for unconnected lines

Instead of failing silently, any line without a platform connection goes to manual trafficking and the agent logs a follow-up case.

What changed for the client

15

custom agent tools

Python stored procedures covering the order, opportunity, workbook and ad platform steps.

16/16

test cases passed

The agent passed all 16 of its test cases.

9

ad platform tools built

Kevel live end to end; Google Ads, Microsoft Ads, Pinterest, Snapchat, Reddit, The Trade Desk, Criteo and LinkedIn built and connected.

Paused

by default

Every campaign starts paused for human review before spend.

The tools behind the system

Built with a deliberate stack chosen for production reliability and operational velocity.

5 componentsProduction-grade
Snowflake Cortex AgentsPython stored proceduresExternal Access IntegrationsSnowflake SecretsKevel API

Similar delivery work usually starts in these service areas

If you are exploring a similar product, workflow, or implementation challenge, these are the service tracks that usually fit best.

Where this project sits in the bigger market picture

AI for campaign activation, performance analysis, testing, and marketing data.

Talk to the team that built this.

Tell us where your project stands. In a free 30-minute consultation we map what carries over from this build, what is different for you, and what a first milestone would cost.

FREE 30-MINUTE CONSULTATION

Bring the problem.
Leave with a plan.

A reply within one business day.
A written plan and a fixed quote.
100% of the code and IP is yours.
If AI is the wrong tool, we will say so.

Book your free consultation