Shopify discount limits cheat sheet
Updated Sep 10, 20263 min read
Every published Shopify limit that affects discounting, in one table, with the page it comes from. These are Shopify's numbers, not Hype Bundles's — no app can raise them, and no Shopify plan raises them either except where the row says otherwise.
Discount limits
| Limit | Value | Source |
|---|---|---|
| Active automatic discounts per store | 25 — "This total includes app-based discounts" | Automatic discounts |
| Discount functions activatable per store | 25 | Discount Function API |
| Discount codes usable on one order | 5 product or order codes + 1 shipping code | Discount combinations |
| Shipping discounts per order | 1 — "Multiple shipping discounts can't apply to the same order" | Discount combinations |
| Discount codes per store, cumulative | 20,000,000 unique codes | Discount codes |
| Entitlements per discount code | 100 specific customers, products, and variants | Discount codes |
| Customer segments per automatic discount | 5 | Managing discounts |
| Customer segments per discount code | 100 | Managing discounts |
| Codes added per bulk API call | 250 | discountRedeemCodeBulkAdd |
| Discount codes on a draft order | 5 | Draft order discounts |
| Discounts per shareable link or QR code | 1 | Managing discounts |
| Discount classes a single function can apply | 3 — product, order, and shipping | Discount Function API |
Both 25s are the same ceiling seen from two sides: every live Hype Bundles campaign is a Shopify Function discount, and it occupies one of the 25 automatic discount slots. See The 25 automatic discounts limit.
Function resource limits
These apply to every Shopify Function, including the ones Hype Bundles runs. They are the reason a campaign can't do unlimited work on an unlimited cart. Source: Shopify Functions.
| Resource | Limit |
|---|---|
| Compiled binary size | 256 kB |
| Runtime linear memory | 10,000 kB |
| Runtime stack memory | 512 kB |
| Logs written | 1 kB, truncated beyond that |
The next three scale proportionally for carts above 200 line items; the values below are for carts of up to 200 lines:
| Resource | Limit |
|---|---|
| Execution instruction count | 11 million instructions |
| Function input | 128 kB |
| Function output | 20 kB |
Shopify notes that function resource limits treat 1 kilobyte as 1000 bytes, and that the 20 kB output limit "doesn't support bulk price transformations across all line items."
Function input query limits
| Limit | Value |
|---|---|
| Maximum input query size, excluding comments | 3000 bytes |
| Metafield values returned | Values over 10,000 bytes are not returned |
| Elements in a list-type field argument or query variable | 100 |
| Maximum calculated query cost | 30 |
Query cost is counted per field: any field returning a Metafield costs 3, as do field(key:) on a Metaobject, hasAnyTag / hasTags, and inAnyCollection / inCollections. The metaobject root field costs 1, as does any other leaf node such as id or sku. __typename, container fields, and fields on Metafield, HasTagResponse and CollectionMembership objects cost 0. Going over fails validation with Query has complexity of <cost>, which exceeds max complexity of 30. Source: Shopify Functions.
Plan-gated behavior
| Behavior | Requirement | Source |
|---|---|---|
| Product + product discount on the same product | Shopify Plus | Discount combinations |
| A Buy X get Y "get" item taking another product discount | Shopify Plus | Discount combinations |
| Custom discounts through Checkout Blocks | Shopify Plus | Checkout Blocks custom discounts |
| Automatic discounts at point of sale | POS Pro | Sales channel discounts |
| Product + order or order + order combining | No checkout.liquid customizations, and no Licensify app | Discount combinations |
| Function network access (the fetch target) | Custom apps on Shopify Plus and Enterprise stores; unavailable on development stores | Discount Function API |
Numbers Shopify does not publish
Do not plan around these. Shopify has no documented limit for the maximum length or character set of a discount code, no cap on the number of active discount codes as distinct from codes created, and no maximum number of products or collections on a Buy X get Y discount. CSV import of discount codes does not exist at all: "You can't import discount codes to your store using CSV files" (Export discount codes) — bulk creation is API-only.
Related
Was this article helpful?
Related articles
Still need help?
Start a chat and we'll pick it up right here.