Combo Templates
Overview
Section titled “Overview”Combo templates are Plan Specifications (IAO) — information content entities that prescribe future creative testing Acts (CCO). Each Plan Specification defines a combo type, product line, audience, and optional Canva design link. Plan Specifications feed into the suggestion generation and Creative Act Report workflows.
Goal: Maintain a library of Plan Specifications that standardize how new creative testing Acts are defined.
Participants
Section titled “Participants”| Actor | Ontological type | Role |
|---|---|---|
| Staff user (Creative) | Person (CCO) bearing Creative Role | Creates, browses, and deletes Plan Specifications |
| Dashboard API Worker | EngineeredSystem (IOF) | Serves CRUD endpoints |
| PlanetScale | EngineeredSystem (IOF) | IBE store for Plan Specifications |
Plan Specification Identifier convention
Section titled “Plan Specification Identifier convention”Plan Specification identifiers follow the same structured format as Creative Act Report identifiers:
{type}-{productCodes}-{productCount}-{audience}-{sequenceNumber}Examples:
SP-IPH-2-WOMEN-001— first static post Plan Specification, 2 iPhone MaterialArtifacts, women audienceCT-IPH+SAM-3-MEN-002— second carousel Plan Specification, 3 mixed MaterialArtifacts, men audience
MaterialArtifact product codes
Section titled “MaterialArtifact product codes”| Code | Product line |
|---|---|
IPH | iPhone cases |
SAM | Samsung cases |
GRIPZ | Grip cases |
AIR | AirPod cases |
AIRMAX | AirPod Max cases |
When multiple product lines are selected, codes are sorted alphabetically and joined with + (e.g., AIR+IPH).
Combo types
Section titled “Combo types”| Code | Type |
|---|---|
SP | Static Post |
CT | Carousel Template |
NT | New Template |
UGC | User-Generated Content |
ST | Story Template |
Sequence numbering
Section titled “Sequence numbering”The sequence number is auto-generated by querying existing Plan Specifications with the same prefix and incrementing the highest found number (3-digit padded: 001, 002, etc.).
API endpoints
Section titled “API endpoints”| Method | Path | Description |
|---|---|---|
GET | /api/combo-templates | List all Plan Specifications, ordered by identifier |
POST | /api/combo-templates | Create Plan Specification with auto-generated identifier |
DELETE | /api/combo-templates/:templateId | Delete Plan Specification |
Create request DTO
Section titled “Create request DTO”interface CreatePlanSpecification { label: string | null; // optional human-readable name type: "SP" | "CT" | "NT" | "UGC" | "ST"; product_count: number; // number of MaterialArtifacts audience: "WOMEN" | "MEN"; canva_url: string | null; // link to Canva design (Action Specification resource) product_codes: string[]; // e.g. ["IPH", "SAM"]}The plan_specification_identifier is auto-generated server-side from the type, product codes, count, audience, and next available sequence number.
Database table
Section titled “Database table”[IAO: Plan Specification — prescribes future creative testing Acts]
| Column | Type | Description |
|---|---|---|
id | UUID | Primary key |
name | VARCHAR(255) | Plan Specification display name |
config | JSONB | Action Specifications and template configuration |
temporal_origin | TIMESTAMPTZ | Creation timestamp |
last_modified_at | TIMESTAMPTZ | Last update timestamp |
Migration notes
Section titled “Migration notes”The current system accesses combo_templates directly via the Supabase client from the frontend (no Express route). In the rewrite, this becomes a proper API route in the Dashboard API Worker, following the same pattern as Creative Act Reports.
Acceptance criteria
Section titled “Acceptance criteria”- Plan Specification Identifier is correctly auto-generated following the convention
- Multiple MaterialArtifact product codes are sorted and joined with
+ - Sequence numbers increment correctly and avoid collisions
- Plan Specifications can be listed, created, and deleted
- Deleting a Plan Specification does not affect Creative Act Reports that reference its identifier