setup_processes/{eid} resource — one
row per event that holds the draft and, after publish, drives the
running configuration. Get this right and you have Wave.
State model — conceptual, not enums
TreatDRAFT / VALIDATED / PUBLISHED as conceptual labels, not
explicit server/FE enum values. The reference FE derives state from
observable facts:
Payload structure — arrays, not TC-keyed objects
The setup payload uses arrays for creatives / targeting / integration details, each entry carrying itstc and tc_run_id. It
does not use taste-cluster-keyed objects.
goal is enum-style: UTILIZATION, ROAS, VISIBILITY, LINK_CLICKS —
not tickets / revenue / reach.
Step 1 — wizard prefetch
Endpoints used by the reference wizard:| Endpoint | Purpose |
|---|---|
GET /events/{eid}/default_campaigns_parameters | Seed budget / goal / clusters / integration defaults. |
GET /events/{eid}/budget_min_max?runtime_in_days= | Clamp the budget slider ({ upper_limit, lower_limit }). |
GET /events/{eid}/suggested_tcs?budget=&goal= | Ranked cluster suggestions ([{ tc, tc_run_id }]). |
GET /setup_processes/call_to_action/?goal=&has_pixel=&lead_form_id= | Allowed CTAs. |
GET /setup_processes/event_types?... | Event-type metadata (ad-platform step). |
Step 2 — create the draft
PUT.
Step 3 — autosave (debounced + abort)
Debounce edits ~1s, thenPUT the full payload. The reference FE uses
a module-level AbortController so only the most recent PUT survives:
Step 4 — publish (boost)
The reference publish flow, in order:- Re-fetch
GET /setup_processes/{eid}to confirm server state. - Abort any in-flight autosave PUT.
- Enrich accounts via
enrichAccountsAsync(notenrichAssets). - Run client-side validation over integrations + creatives + targeting.
On failure: log to Sentry tagged
INVALID_SETUPand do not call boost. POST /setup_processes/{eid}/boost— no request body; FE expects200.
Step 5 — edit a published cluster
Cancel
?cancel=true,
expects 200 (not 204), and additionally calls
deleteUserReports({ setup_process_ids: [...] }).
Reset
PUT /events/{eid}/reset_campaigns_setup exists in the API layer, but the
current reference webapp UI does not invoke it. Document it as
available-but-unused rather than part of the core flow.
Media uploads
Optional / context-specific endpoints
These belong to other contexts — not core lifecycle calls:| Endpoint | Where it’s actually used |
|---|---|
GET /campaigns/meta_tags?url= | Social-share modal |
GET/POST/PUT /prompts/custom_prompt | Settings |
Gotchas
Payload is arrays, not TC-keyed objects
Payload is arrays, not TC-keyed objects
creatives[], targeting[], integration_details[], each entry
carrying tc + tc_run_id.Goal values are enum-style
Goal values are enum-style
UTILIZATION / ROAS / VISIBILITY / LINK_CLICKS.State labels are conceptual
State labels are conceptual
DRAFT/VALIDATED/PUBLISHED aren’t server enums. Published is
derived from GET /events/{eid}/campaigns.Boost has no body and expects 200
Boost has no body and expects 200
POST /setup_processes/{eid}/boost with no payload; success is 200.Cancel: no ?cancel=true, expects 200
Cancel: no ?cancel=true, expects 200
Plain
DELETE /setup_processes/{eid}; also clears user reports.`/campaigns_setup` ≠ `/setup_processes/{eid}`
`/campaigns_setup` ≠ `/setup_processes/{eid}`
Published-cluster edits vs draft edits — different endpoints.
Media via storage multipart, not /media
Media via storage multipart, not /media
Wizard uploads go through
api/storage presigned multipart.clusters / campaigns_expected_value / init_campaigns_setup unused
clusters / campaigns_expected_value / init_campaigns_setup unused
Not part of the current wizard flow.
Related
- Campaign detail — page above the wizard.
- Audience Recommendations — taste clusters and suggested targeting feed the wizard.
- Polling long-running jobs.
- File uploads — for creative media.