---
name: coppica-generate-ad-set
description: Use when the user wants a full set of ad variations for a client in one go (multiple angles and hooks), not a single piece. Covers the server-orchestrated ad-set workflow and deploying the variants with tracking.
---

# Generate an ad set

When the user wants breadth (several angles and hooks to test), let Coppica orchestrate the whole
chain instead of generating pieces one at a time.

## Prerequisites

A client with a populated intake. See `coppica-onboard-client`.

## Steps

1. **Generate the set.** `coppica_generate_ad_set` runs a server-orchestrated angle to hook to ad
   chain in one call. It returns a `workflow_id` and produces N finished ads, with lineage
   (`parent_output_id`, `variant_group_id`, `workflow_id`) populated server-side.
2. **Handle async.** If it returns `status='processing'`, poll `coppica_get_workflow` with the
   `workflow_id` until the ads are ready.
3. **Deploy + track.** For each variant you deploy, attach a tracking link and prepare to report
   outcomes. Load `coppica-close-the-loop` and do this for every variant. Per-variant tracking is
   what lets the next step (`coppica-optimization-loop`) tell winners from losers.

## Decision branches

- **User wants variations of one existing winner**, not a fresh set? Use
  `coppica-optimization-loop` (it calls `coppica_iterate_on_winner`) instead.

## Verify

`coppica_get_workflow` shows the set complete with N outputs, each with lineage fields set.

## Next

`coppica-close-the-loop`, then `coppica-optimization-loop` once outcomes accumulate.
