Skip to content

selectCustomerPricing

selectCustomerPricing(shopMetafield, productId, productCollectionIds, now?): CustomerPricingEntry | null

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/customer-pricing.d.ts:107

THE selection pipeline: candidates = the shop’s customer_pricing references (the single discovery path - no per-product metafield), parsed defensively, filtered to status === "active" inside an open date window AND targeting the current product, de-duplicated by metaobject id; the FIRST remaining entry in list order wins - one widget per PDP. Returns null when none remain. Input is structural (nodes may carry non-Metaobject references - they’re skipped), so any query embedding the CustomerPricingMetaobject fragment feeds it.

{ references?: { nodes: readonly unknown[]; } | null; } | null | undefined

string

readonly string[]

Date

CustomerPricingEntry | null