storlaunch.product.updated.v1

Fires when a product is mutated — PATCH /v1/storefront/products/:id, AI-generation completion writing back description + thumbnail, the dashboard's edit form, or an internal flag flip (e.g. the first variant getting added flips hasVariants and emits this event).

Subscribe if you maintain a downstream mirror of the catalogue.

When it fires

In every successful update path:

  1. PATCH /v1/storefront/products/:id returns 200.
  2. AI generation completes (aiStatus flips to complete).
  3. A side-effect updates the product, e.g. first variant addition flips hasVariants: true.
  4. Re-publishing via the dashboard's publish action.

The event always carries the full current state of the product (post-update), not a diff. Use field-by-field comparison against your mirror to identify what changed.

Payload

Same shape as storlaunch.product.created.v1.

{
  "id": "evt_01HX...",
  "type": "storlaunch.product.updated.v1",
  "createdAt": "2026-05-13T10:55:00Z",
  "accountId": "acc_01HX...",
  "data": {
    "id": "prod_01HX...",
    "accountId": "acc_01HX...",
    "name": "Field Notes Notebook (Updated)",
    "slug": "field-notes-notebook",
    "type": "physical",
    "priceCents": 80000,
    "currency": "IDR",
    "available": true,
    "tags": ["stationery", "best-seller"],
    "archived": false
  }
}

Handler examples

// Node
if (event.type === 'storlaunch.product.updated.v1') {
  const p = event.data;
  await mirror.products.upsert({ id: p.id }, p);
  if (!p.available) await mirror.search.hide(p.id);
  else                await mirror.search.show(p.id);
}
# Python
if event["type"] == "storlaunch.product.updated.v1":
    p = event["data"]
    mirror.products.upsert(id=p["id"], **p)
    (mirror.search.hide if not p["available"] else mirror.search.show)(p["id"])
// Go
if event.Type == "storlaunch.product.updated.v1" {
    var p storlaunch.Product
    _ = json.Unmarshal(event.Data, &p)
    mirror.Upsert(ctx, p)
}

What to do

  • Upsert your mirror by id. Don't try to compute diffs from event chains — one missed event means permanent drift.
  • Re-trigger price / availability indexers downstream.
  • If you display imageUrl, refresh it (the AI generator might just have replaced it).

Common pitfalls

  • Ordering across types. Storlaunch fires events as updates happen; if a product is created + edited rapidly, you may see updated.v1 before created.v1 if retries reorder them. Defend by upserting on every event (don't require the create first).
  • Re-emitted on no-op patches. PATCH with the same body re-fires the event. Make your handler idempotent on event.id and content-equal.
  • AI status transitions. The event fires when AI generation flips status to complete — you'll see one for "started" (aiStatus: generating) and one for "done" (aiStatus: complete with the fresh description). Filter on aiStatus !== 'generating' if you only want the final state.

Related events

Next