Skip to content

Combo Suggestions

Generate candidate creative combos as combo suggestions stored in macrodata_artifact rows with kind=combo_suggestion. Each suggestion carries a measurement_confidence score (0.00-1.00) computed from internal performance data, product tags, and agent signals. Staff can accept suggestions to promote them into combo reports.

Goal: Run a generation workflow (ontology: ProcedureExecution) that produces combo suggestions with confidence scoring, and support an acceptance workflow that converts suggestions into combo reports.

MethodPathSpecDescription
GET/creative-ops/combo-suggestionscreative-ops.yamlList combo suggestions
POST/creative-ops/combo-suggestions/{suggestion_id}/acceptcreative-ops.yamlAccept suggestion (converts to combo report)
POST/creative-ops/combo-suggestions/{suggestion_id}/dismisscreative-ops.yamlDismiss suggestion
POST/creative-ops/combo-tests/{test_id}/finalizecreative-ops.yamlFinalize combo test and trigger suggestion generation
GET/macrodata-catalogs/{catalog_id}/artifacts?kind=combo_suggestionmacrodata.yamlList suggestions in a catalog (low-level)
GET/macrodata-artifacts?kind=combo_suggestionmacrodata.yamlList suggestions across catalogs (low-level)
TableRole
macrodata_artifactStores combo suggestions (kind=combo_suggestion), combo reports, and templates
macrodata_catalogCatalog/namespace grouping artifacts
link_product_macrodata_artifactLinks products to suggestion artifacts
productProduct reference data
product_tagProduct tags used as generation signals
ResourcePurpose
Internal Worker (CF Worker)Validates requests, enqueues generation jobs
Ingest Worker (CF Worker)Executes the suggestion generation workflow
CF QueueSUGGESTION_GENERATE job queue for async generation
PlanetScale (Postgres via Hyperdrive)Primary data store for all artifacts
R2 (measurement.performance)Performance data used as generation signals
ActorRole
Staff userRequests generation with constraints, reviews and accepts/dismisses suggestions
Dashboard API WorkerValidates, enqueues generation jobs
Ingest WorkerExecutes generation workflow: queries signals, produces suggestions
PlanetScaleData store for performance data and suggestions
  1. Staff user calls POST /creative-ops/combo-tests/{test_id}/finalize with constraints (or triggers generation via the finalize workflow)
  2. API validates Access, enqueues SUGGESTION_GENERATE
  3. Ingest Worker executes the generation workflow:
    • Step: Query signals — reads combo reports (macrodata_artifact, kind=combo_report) to avoid duplicates, measurement.performance on R2 for winners/risers, product_tag and agent assignments (kind=agent_assignment) if relevant
    • Step: Generate — produces suggested_combos JSON, computes measurement_confidence (ratio scale 0.00-1.00)
    • Step: Persist — writes combo suggestions (macrodata_artifact, kind=combo_suggestion, status=pending, with measurement_confidence and performance_context)
  4. Staff reviews via GET /creative-ops/combo-suggestions
  5. Staff accepts suggestion via POST /creative-ops/combo-suggestions/{suggestion_id}/accept, which creates a combo report entry (suggestion converts into combo report)
ConditionFallback
Not enough candidate productsWrite suggestion with empty list + explanation
Computation exceeds Worker CPU limitBreak into multiple queue messages
{
"job_type": "SUGGESTION_GENERATE",
"job_id": "uuid",
"combo_size": 3,
"constraints": { "audience": "WOMEN" }
}
  • PASS: Combo suggestions produced with valid measurement_confidence; accepting creates corresponding combo report with correct combo template identifier
  • FAIL: Duplicates; invalid artifact_identifiers; inability to accept due to missing fields