Hype Upsell

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 Upsell's — no app can raise them, and no Shopify plan raises them either except where the row says otherwise.

Discount limits

LimitValueSource
Active automatic discounts per store25 — "This total includes app-based discounts"Automatic discounts
Discount functions activatable per store25Discount Function API
Discount codes usable on one order5 product or order codes + 1 shipping codeDiscount combinations
Shipping discounts per order1 — "Multiple shipping discounts can't apply to the same order"Discount combinations
Discount codes per store, cumulative20,000,000 unique codesDiscount codes
Entitlements per discount code100 specific customers, products, and variantsDiscount codes
Customer segments per automatic discount5Managing discounts
Customer segments per discount code100Managing discounts
Codes added per bulk API call250discountRedeemCodeBulkAdd
Discount codes on a draft order5Draft order discounts
Discounts per shareable link or QR code1Managing discounts
Discount classes a single function can apply3 — product, order, and shippingDiscount Function API

Both 25s are the same ceiling seen from two sides: every live Hype Upsell 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 Upsell runs. They are the reason a campaign can't do unlimited work on an unlimited cart. Source: Shopify Functions.

ResourceLimit
Compiled binary size256 kB
Runtime linear memory10,000 kB
Runtime stack memory512 kB
Logs written1 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:

ResourceLimit
Execution instruction count11 million instructions
Function input128 kB
Function output20 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

LimitValue
Maximum input query size, excluding comments3000 bytes
Metafield values returnedValues over 10,000 bytes are not returned
Elements in a list-type field argument or query variable100
Maximum calculated query cost30

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

BehaviorRequirementSource
Product + product discount on the same productShopify PlusDiscount combinations
A Buy X get Y "get" item taking another product discountShopify PlusDiscount combinations
Custom discounts through Checkout BlocksShopify PlusCheckout Blocks custom discounts
Automatic discounts at point of salePOS ProSales channel discounts
Product + order or order + order combiningNo checkout.liquid customizations, and no Licensify appDiscount combinations
Function network access (the fetch target)Custom apps on Shopify Plus and Enterprise stores; unavailable on development storesDiscount 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 articles

Still need help?

Start a chat and we'll pick it up right here.