When creating or updating a discount via discountAutomaticAppCreate or discountAutomaticAppUpdate, set the discountClass field to PRODUCT, ORDER, or SHIPPING depending on what the Function targets
Understand that Shopify allows at most one automatic discount per class to apply unless the merchant has enabled discount combining; use the combinesWithProductDiscounts, combinesWithOrderDiscounts, and combinesWithShippingDiscounts flags on the discount node to control stacking
In Admin GraphQL query discountNodes to inspect combinesWith settings and discountClass for existing discounts before adding a new one
Test combining by creating two automatic discounts of different classes with combinesWith flags enabled on both, then add items to a cart and verify both discount amounts appear in the cart response
Check Admin UI under Discounts to confirm combining eligibility is reflected correctly; mismatches between UI and API state indicate a stale cache — re-fetch the discount node
Document the combining matrix for your merchant: PRODUCT + ORDER can combine if both have combinesWithOrderDiscounts/combinesWithProductDiscounts set; SHIPPING discounts follow the same pattern
Known gotchas
discountClass must match the actual targeting of the Function — a Function using cart.lines.discounts.generate.run that modifies line-level amounts should use PRODUCT class; misclassifying silently breaks combining logic
A discount created without explicit combinesWith flags defaults to not combining with any other discount type; always set these explicitly rather than relying on defaults
Discount combining is evaluated at checkout, not at cart creation; cart-level GraphQL responses may show each discount separately but final totals are only authoritative after checkout is reached
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp