# Storefront

object type

A Storefront — the ecom DTC PUBLISH-CONFIG document: which selling facility the site sells from, which canned theme renders it, which collections it merchandises, which browse tree and channel division frame it, and (optionally) the custom domain it claims. The lifecycle: born draft (claiming nothing) → publish (THE INVALID_CONFIG GATE re-validates every ref record-aware + the GLOBAL domain marker claims in the SAME transaction — CONFLICT/IDENTITY_TAKEN if another published site holds the name) → unpublish (the marker releases) → republish (the SAME gate + re-claim). published NEVER dooms — unpublish first (the FSM forbids the edge). THE SERVING ESTATE IS DELIBERATELY ABSENT v1 (the map): publish flips state, claims the domain, validates config — it provisions NOTHING; this record is the control plane the DTC workstream will consume. SEO copy rides the Decoration attachment, never fields here.

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (SF-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Storefront` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: draft \| published \| unpublished \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent Organization; rootId = the org group; parentId!== rootId always. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `logicalFacilityId` | [ID](/types/#scalars) `ID!` | The DESIGNATED SELLING facility — the LF whose stock/pricing context the site sells from; in-tenant + ACTIVE at set AND at publish; edit-locked while published (unpublish → edit → republish). |
| `theme` | [String](/types/#scalars) `String!` | The canned theme key (cannedStorefrontThemes lists the roster: almond-light · almond-dark · gallery · catalog-classic) — merchants pick, never author; edit-locked while published. |
| `customDomain` | [String](/types/#scalars) | The claimed custom domain (a bare lowercase hostname, at most 253 characters — no scheme/path/port/IP/localhost): the GLOBAL uniqueness marker holds it ONLY while published (claim at publish, release at unpublish); edit-locked while published; null = no custom domain (the default host is the serving workstream's business). |
| `collectionIds` | [ID](/types/#scalars) `[ID!]!` | The merchandised Collections (0..24, distinct; each in-tenant + ACTIVE) — edits replace the set WHOLESALE; a NON-doomed storefront blocks a referenced collection's doom. |
| `categoryId` | [ID](/types/#scalars) | No further notes. |
| `divisionId` | [ID](/types/#scalars) | The CHANNEL-type Division framing this site (optional — the channel slot’s FIRST consumer; in-tenant + ACTIVE + divisionType channel); null = unframed. |

## Used by

- [createStorefront](/reference/storefront/createStorefront/)
- [doomStorefront](/reference/storefront/doomStorefront/)
- [publishStorefront](/reference/storefront/publishStorefront/)
- [republishStorefront](/reference/storefront/republishStorefront/)
- [storefront](/reference/storefront/storefront/)
- [unpublishStorefront](/reference/storefront/unpublishStorefront/)
- [updateStorefront](/reference/storefront/updateStorefront/)
