Skip to main content
Layers syncs each product’s Shopify selling plan groups into a single selling_plans attribute on the product. Use it to display subscription, pre-order, and try-before-you-buy offers alongside product data, and to filter or facet by the plans a product is enrolled in.

When to use it

Request selling_plans when you need to:
  • Show subscribe-and-save, pre-order, or try-before-you-buy badges on product tiles or PDPs.
  • Display billing intervals, discounts, and plan options next to a product’s price.
  • Restrict a search, browse, or block to products enrolled in a specific plan group or category.
The attribute is deferred — it is only included in API responses when you explicitly list it in the attributes array. See Available attributes for API requests.

Structure

selling_plans is an object with a top-level rollup and a groups array. Products with no selling plans return an empty block: {"max_discount_percentage": null, "categories": [], "groups": []}.

Group fields

Plan fields

Billing and delivery policies

Each policy has a type of recurring or fixed. For recurring policies: For fixed policies, Layers surfaces the fields Shopify returns for that policy shape, such as fulfillment_trigger, fulfillment_exact_time, cutoff, remaining_balance_charge_trigger, remaining_balance_charge_exact_time, remaining_balance_charge_time_after_checkout, and a checkout_charge object with {type, value}.

Requesting selling plans

Add selling_plans to the attributes array on any Search, Browse, Blocks, or Similar Products request. You can also request nested paths via field projection.
Return only the rollup and each group’s name and discount:

Example response

Filterable attributes

Every store is seeded with the following attributes so you can filter and facet by selling plans without any dashboard setup. Storefront faceting is disabled by default — enable it in the dashboard when you want to expose a plan filter to shoppers. Filter example — return only products enrolled in a specific group:

Sync behavior

  • Selling plan groups sync per product. When a product’s sellingPlanGroupsCount is greater than zero, or the product already has stored groups that need to be pruned, Layers pages through product.sellingPlanGroups and merges each page into the product’s selling_plans attribute.
  • Groups with more than one page of plans are followed to completion so the stored block is never truncated.
  • Existing stores pick up selling plan data on each product’s next sync — there is no one-time backfill.
  • variants.requires_selling_plan mirrors the product-level requiresSellingPlan value from Shopify. variants.has_selling_plan is written per variant from Shopify’s ProductVariant.sellingPlanGroupsCount, and is cleared when the product has no groups.

MCP access

The MCP product resource includes selling_plans for every product. Products with no plans return the empty block described above.

See also