Product Life Cycle

Product Life Cycle

PromoStandards defines only two product states: sellable and closeout. That leaves no way to mark a product that is incomplete (missing images or pricing) or one that is gone for good.

PSRESTful extends this with a full 4-status life cycle: draft, active, closeout, and discontinued.


Status Definitions

StatusDescriptionPromoStandards Equivalent
draftProduct is incomplete: it has no primary image (primary_image_url is empty) or no price at all (list_price, net_blank, list_decorated and net_decorated are all 0 or null). Not ready to sell.(none)
activeProduct is complete and available for sale.Sellable
closeoutProduct is being phased out, often at discounted prices.Closeout
discontinuedProduct is permanently removed from the catalog. No longer available for sale.(none)

Why We Added draft

When products are first ingested from suppliers, they may be incomplete. A product is automatically classified as draft when:

  • It has no price at all: list_price, net_blank, list_decorated and net_decorated are all 0 or null
  • It has no primary image (primary_image_url is empty)

Draft products are not ready for customer-facing catalogs. This prevents showing products with $0 prices or missing images to end customers.


Why We Added discontinued

closeout in PromoStandards means clearance: products being sold off, often at lower prices. There’s no way to mark a product as permanently gone.

When a supplier stops making a product, distributors need to know so they can:

  • Remove it from their storefronts
  • Stop syncing inventory and pricing for it
  • Avoid showing stale products to customers

discontinued fills this gap. It’s a terminal state meaning “this product will not come back.”


How Status is Computed

Product status is determined by the following logic:

  1. If is_closeout is true → closeout
  2. If primary_image_url is empty, or list_price, net_blank, list_decorated and net_decorated are all null/0 → draft
  3. Otherwise → active

discontinued is never computed from the product’s own fields. A product becomes discontinued in one of these ways:

  • Closeout with no stock left. A scheduled job marks a closeout product discontinued when every inventory location shows 0 and there is no future availability.
  • The supplier says the product is gone. When the supplier answers getProduct with only ServiceMessage 130 (“Product Id not found”), we mark the product discontinued.
  • The supplier returns nothing. A scheduled job checks active and draft products; one that comes back empty from both getProduct and getInventoryLevels is marked discontinued.
  • Our team marks it by hand in the admin.

Life Cycle Diagram

┌───────┐       ┌────────┐       ┌───────────┐       ┌──────────────┐
│ draft │──────▶│ active │──────▶│ closeout  │──────▶│ discontinued │
└───────┘       └────────┘       └───────────┘       └──────────────┘
                    │                                        ▲
                    │                                        │
                    └────────────────────────────────────────┘
  • draft → active: Product becomes complete (has pricing and images)
  • active → closeout: Product is being phased out at discounted prices
  • active → discontinued: The supplier no longer returns the product (see above)
  • closeout → discontinued: Inventory reaches 0 everywhere, with no future availability

Where Status Appears

Extra APIs (v1 & v2)

The status field is included in all product responses from both /extra/v1/products and /extra/v2/products.

You can filter products by status using the query parameter:

GET /extra/v2/products?status=active
  • v1 uses snake_case field names
  • v2 uses camelCase field names

Product Search in the PSRESTful dashboard

The More Filters drawer on Product Search has a By Status dropdown (it replaced the old “Is Closeout” filter).

Filter options: Any, Active, Draft, Closeout, Discontinued

The default filter is Active.

The Filter Products drawer with the By Status dropdown set to Active, above the On Demand, Rush, Brand, Apparel Style, Category and Bundles filters

Example with made-up data.

Search results display color-coded status badges:

StatusBadge Color
ActiveGreen
DraftGrey
CloseoutYellow
DiscontinuedRed

Product Search results with the status filter set to Any: four products under their Extra IDs, with Active, Closeout, Draft and Discontinued badges

Example with made-up data.

Product Detail in the PSRESTful dashboard

The product detail page shows the status badge next to the Product ID.

The top of a product detail page: supplier, product name, brand, then Product ID, Extra ID and an Active badge

Example with made-up data.

Inventory & Pricing Sync in PromoSync

PromoSync stores the status in the psrestful.status Shopify metafield. When a shop turns on Discontinued Handling (off by default), PromoSync runs a daily status check and its inventory and price syncs skip products with status == discontinued.

That saves API calls on products that will never be sold again.


Backward Compatibility

The legacy is_closeout boolean field is maintained via dual-write sync:

Status set tois_closeout value
draftfalse
activefalse
closeouttrue
discontinuedtrue

Existing integrations using is_closeout continue to work without modification.