Skip to content

StorefrontResponseEvent ​

Type: schema

Description ​

A single analytics event to emit for a mutation you just made, returned in a response's events array. Each entry pairs a human-readable event name with a server-issued event_id (ULID): forward that id with your own client-side copy (pixel, tag, SDK) so both copies of the same action dedupe to one and downstream destinations count it once. event is the discriminator; the keys beside event and event_id identify the entity the event is about.

TypeScript Definition ​

typescript
StorefrontResponseEvent: components["schemas"]["CartLifecycleEvent"] | components["schemas"]["CartLineChangeEvent"] | components["schemas"]["CartCouponEvent"] | components["schemas"]["OrderCreatedEvent"] | components["schemas"]["OrderCancelledEvent"] | components["schemas"]["WishlistChangeEvent"]

Component References ​

ReferenceResolves To
components["schemas"]["CartLifecycleEvent"]CartLifecycleEvent
components["schemas"]["CartLineChangeEvent"]CartLineChangeEvent
components["schemas"]["CartCouponEvent"]CartCouponEvent
components["schemas"]["OrderCreatedEvent"]OrderCreatedEvent
components["schemas"]["OrderCancelledEvent"]OrderCancelledEvent
components["schemas"]["WishlistChangeEvent"]WishlistChangeEvent

OpenAPI Schema ​

json
{
  "title": "StorefrontResponseEvent",
  "description": "A single analytics event to emit for a mutation you just made, returned in a response's `events` array. Each entry pairs a human-readable `event` name with a server-issued `event_id` (ULID): forward that id with your own client-side copy (pixel, tag, SDK) so both copies of the same action dedupe to one and downstream destinations count it once. `event` is the discriminator; the keys beside `event` and `event_id` identify the entity the event is about.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/StorefrontResponseEvent",
    "description": "API reference for the StorefrontResponseEvent schema"
  },
  "discriminator": {
    "propertyName": "event",
    "mapping": {
      "Cart Created": "#/components/schemas/CartLifecycleEvent",
      "Cart Deleted": "#/components/schemas/CartLifecycleEvent",
      "Checkout Started": "#/components/schemas/CartLifecycleEvent",
      "Product Added": "#/components/schemas/CartLineChangeEvent",
      "Product Removed": "#/components/schemas/CartLineChangeEvent",
      "Coupon Applied": "#/components/schemas/CartCouponEvent",
      "Coupon Removed": "#/components/schemas/CartCouponEvent",
      "Order Created": "#/components/schemas/OrderCreatedEvent",
      "Order Cancelled": "#/components/schemas/OrderCancelledEvent",
      "Product Added to Wishlist": "#/components/schemas/WishlistChangeEvent",
      "Product Removed from Wishlist": "#/components/schemas/WishlistChangeEvent"
    }
  },
  "oneOf": [
    {
      "$ref": "#/components/schemas/CartLifecycleEvent"
    },
    {
      "$ref": "#/components/schemas/CartLineChangeEvent"
    },
    {
      "$ref": "#/components/schemas/CartCouponEvent"
    },
    {
      "$ref": "#/components/schemas/OrderCreatedEvent"
    },
    {
      "$ref": "#/components/schemas/OrderCancelledEvent"
    },
    {
      "$ref": "#/components/schemas/WishlistChangeEvent"
    }
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: