Skip to content

Combo Log CRUD + CSV Import

Maintain a durable ledger of tested combos as Creative Act Reports (IAO) — Reports documenting completed creative testing Acts (CCO) that realize Plan Specifications. The Plan Specification Identifier convention TYPE-PRODUCT-COUNT-AUDIENCE-SEQ (e.g., SP-IPH-2-WOMEN-001) provides human-readable, sortable structured identifiers.

Goal: CRUD for creative_act_report and bulk CSV import; import/export for operational workflows.

[IAO: Structured Identifier denoting a Plan Specification]

{type}-{productCode}-{productCount}-{audience}-{sequenceNum}
SegmentValuesExample
typeSP (Split), CT (Carousel), NT (Narrow), UGC, STSP
productCodeDerived from MaterialArtifacts: IPH, SAM, AIR, MIXIPH
productCountNumber of MaterialArtifacts in combo2
audienceTarget audienceWOMEN
sequenceNumAuto-incremented, zero-padded001
MethodEndpointDescription
GET/api/combo-logsList Creative Act Reports with filters: type, audience, date_from, date_to
POST/api/combo-logsCreate Report (auto-generates plan_specification_identifier)
PUT/api/combo-logs/:idUpdate Report
DELETE/api/combo-logs/:idDelete Report

All endpoints use CF Access auth and target p99 < 200ms.

[PKO: ProcedureExecution — parse CSV → resolve MaterialArtifacts → upsert Creative Act Reports]

  1. POST /api/combo-logs/import with CSV payload
  2. API enqueues CREATIVE_ACT_REPORT_IMPORT for background ProcedureExecution
  3. Worker parses rows, applies fuzzy matching against performance_measurement_dataset for MaterialArtifact resolution
  4. Worker upserts into creative_act_report in chunks
  5. Returns summary: N valid rows imported, M errors

Fuzzy matching: The current system uses Levenshtein distance + substring heuristics to match product titles from CSV to known MaterialArtifacts. This carries forward.

{
"job_type": "CREATIVE_ACT_REPORT_IMPORT",
"job_id": "uuid",
"source": { "type": "upload", "bearer_entity_key": "imports/..." }
}

GET /api/combo-logs/export generates a CSV of all Creative Act Reports matching current filters.

  • PASS: Create/update/delete reflect in list; CSV import ProcedureExecution adds N valid rows and reports M invalid rows deterministically
  • FAIL: Non-idempotent import creates duplicates; corrupted JSON in cases_included