Pricing and discounts
BuyXGetY
Section titled “BuyXGetY”Buy-X-get-Y terms.
buyQuantity
Section titled “buyQuantity”Int!
How many, of what, must be bought.
buyProductIds
Section titled “buyProductIds”[ID!]!
No description.
buyCollectionIds
Section titled “buyCollectionIds”[ID!]!
No description.
getQuantity
Section titled “getQuantity”Int!
How many are then given, and at what discount.
getProductIds
Section titled “getProductIds”[ID!]!
No description.
getCollectionIds
Section titled “getCollectionIds”[ID!]!
No description.
getDiscountPercentage
Section titled “getDiscountPercentage”Float!
A fraction. 1 is free; 0.5 is half price.
maxRepeats
Section titled “maxRepeats”Int
How many times it may repeat in one cart.
Null for unlimited. Set, because “buy 2 get 1” on a cart of sixty is an offer no merchant meant to make.
BuyXGetYInput
Section titled “BuyXGetYInput”Buy-X-get-Y terms as supplied.
buyQuantity
Section titled “buyQuantity”Int!
No description.
buyProductIds
Section titled “buyProductIds”[ID!]
No description.
buyCollectionIds
Section titled “buyCollectionIds”[ID!]
No description.
getQuantity
Section titled “getQuantity”Int!
No description.
getProductIds
Section titled “getProductIds”[ID!]
No description.
getCollectionIds
Section titled “getCollectionIds”[ID!]
No description.
getDiscountPercentage
Section titled “getDiscountPercentage”Float!
No description.
maxRepeats
Section titled “maxRepeats”Int
No description.
Discount
Section titled “Discount”Something that comes off at checkout.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
What the merchant calls it. Shown to the buyer on the order.
trigger
Section titled “trigger”DiscountTrigger!
How a buyer gets it.
String
The code, when there is one. Null for an automatic discount.
Case-insensitive on entry and normalized to what the merchant typed, so
NOWRUZ and nowruz are the same code and the buyer sees the merchant’s
capitalization on their order.
DiscountValue!
What comes off, and from what.
conditions
Section titled “conditions”DiscountConditions!
What has to be true for it to apply.
DiscountUsage!
How much of it is left.
combinesWith
Section titled “combinesWith”DiscountCombination!
Whether it can be combined with other discounts.
activeFrom
Section titled “activeFrom”DateTime!
When it works.
activeUntil
Section titled “activeUntil”DateTime
No description.
status
Section titled “status”DiscountStatus!
No description.
source
Section titled “source”DiscountSource!
Where the logic lives.
RULES today. FUNCTION when the app platform ships sandboxed discount
functions — the same object, a different evaluator, and no client change.
appHandle
Section titled “appHandle”String
The app that installed it, for a discount a merchant did not create.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
DiscountCombination
Section titled “DiscountCombination”Whether a discount can be combined with others.
withProductDiscounts
Section titled “withProductDiscounts”Boolean!
With another discount on the products.
withOrderDiscounts
Section titled “withOrderDiscounts”Boolean!
With a discount on the order total.
withShippingDiscounts
Section titled “withShippingDiscounts”Boolean!
With a shipping discount.
DiscountCombinationInput
Section titled “DiscountCombinationInput”Combination rules as supplied.
withProductDiscounts
Section titled “withProductDiscounts”Boolean
No description.
withOrderDiscounts
Section titled “withOrderDiscounts”Boolean
No description.
withShippingDiscounts
Section titled “withShippingDiscounts”Boolean
No description.
DiscountConditions
Section titled “DiscountConditions”What has to be true for a discount to apply.
minimumSubtotal
Section titled “minimumSubtotal”Money
The cart must reach this before discounts.
minimumQuantity
Section titled “minimumQuantity”Int
Or hold at least this many units.
segmentIds
Section titled “segmentIds”[ID!]!
Only these customers. Empty means anybody.
customerIds
Section titled “customerIds”[ID!]!
No description.
channelIds
Section titled “channelIds”[ID!]!
Only these channels. Empty means everywhere.
provinceCodes
Section titled “provinceCodes”[String!]!
Only these provinces.
What a merchant uses for a free-delivery offer they can only honour where a courier reaches cheaply.
firstOrderOnly
Section titled “firstOrderOnly”Boolean!
Only first-time buyers.
The commonest condition after a minimum subtotal, and worth its own field rather than a segment because every shop wants it and none should have to build a segment first.
paymentMethods
Section titled “paymentMethods”[PaymentMethodType!]!
Only these payment methods — an incentive to pay online rather than on delivery.
DiscountConditionsInput
Section titled “DiscountConditionsInput”Conditions as supplied.
minimumSubtotal
Section titled “minimumSubtotal”MoneyInput
No description.
minimumQuantity
Section titled “minimumQuantity”Int
No description.
segmentIds
Section titled “segmentIds”[ID!]
No description.
customerIds
Section titled “customerIds”[ID!]
No description.
channelIds
Section titled “channelIds”[ID!]
No description.
provinceCodes
Section titled “provinceCodes”[String!]
No description.
firstOrderOnly
Section titled “firstOrderOnly”Boolean
No description.
paymentMethods
Section titled “paymentMethods”[PaymentMethodType!]
No description.
DiscountConnection
Section titled “DiscountConnection”A page of discounts.
[DiscountEdge!]!
No description.
[Discount!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int
How many match across every page — when this page is the whole result. Null otherwise: the service behind this list does not count, and a number made up here would be a wrong one that looks right.
DiscountCreateInput
Section titled “DiscountCreateInput”A discount to create.
String!
No description.
trigger
Section titled “trigger”DiscountTrigger!
No description.
String
Required when trigger is CODE.
DiscountValueInput!
No description.
conditions
Section titled “conditions”DiscountConditionsInput
No description.
usageLimit
Section titled “usageLimit”Int
No description.
perCustomerLimit
Section titled “perCustomerLimit”Int
No description.
combinesWith
Section titled “combinesWith”DiscountCombinationInput
No description.
activeFrom
Section titled “activeFrom”DateTime!
No description.
activeUntil
Section titled “activeUntil”DateTime
No description.
DiscountEdge
Section titled “DiscountEdge”One discount, with its cursor.
cursor
Section titled “cursor”String!
No description.
Discount!
No description.
DiscountFilter
Section titled “DiscountFilter”A filter on the discount list.
status
Section titled “status”[DiscountStatus!]
No description.
trigger
Section titled “trigger”[DiscountTrigger!]
No description.
[DiscountValueKind!]
No description.
appHandle
Section titled “appHandle”String
Discounts an app installed rather than the merchant.
activeAt
Section titled “activeAt”DateTime
No description.
DiscountPayload
Section titled “DiscountPayload”What the discount mutations return.
discount
Section titled “discount”Discount
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
DiscountSortKeys
Section titled “DiscountSortKeys”How a discount list is ordered.
| Value | Meaning |
|---|---|
CREATED_AT | No description. |
TITLE | No description. |
ACTIVE_FROM | No description. |
USED_COUNT | No description. |
TOTAL_DISCOUNTED | No description. |
DiscountSource
Section titled “DiscountSource”Where a discount’s logic lives.
| Value | Meaning |
|---|---|
RULES | Declarative rules the platform evaluates. |
FUNCTION | A sandboxed function shipped by an app. Later. |
DiscountStatus
Section titled “DiscountStatus”Where a discount stands.
| Value | Meaning |
|---|---|
SCHEDULED | Its start date has not arrived. |
ACTIVE | No description. |
EXPIRED | Past its end date. |
EXHAUSTED | Its usage limit is spent. |
DISABLED | Switched off by the merchant. |
DiscountTrigger
Section titled “DiscountTrigger”How a buyer gets a discount.
| Value | Meaning |
|---|---|
CODE | They type a code. |
AUTOMATIC | It applies on its own when the conditions are met. |
DiscountUpdateInput
Section titled “DiscountUpdateInput”Changes to a discount. Partial.
String
No description.
String
No description.
DiscountValueInput
No description.
conditions
Section titled “conditions”DiscountConditionsInput
No description.
usageLimit
Section titled “usageLimit”Int
No description.
perCustomerLimit
Section titled “perCustomerLimit”Int
No description.
combinesWith
Section titled “combinesWith”DiscountCombinationInput
No description.
activeFrom
Section titled “activeFrom”DateTime
No description.
activeUntil
Section titled “activeUntil”DateTime
No description.
DiscountUsage
Section titled “DiscountUsage”How much of a discount is left.
usedCount
Section titled “usedCount”Int!
How many times it has been used.
usageLimit
Section titled “usageLimit”Int
The total budget. Null for unlimited.
perCustomerLimit
Section titled “perCustomerLimit”Int
How many times one customer may use it. Null for unlimited.
totalDiscounted
Section titled “totalDiscounted”Money!
How much has been given away.
What a merchant needs to know before extending a campaign, and what nobody can compute from a usage count once the discount is a percentage.
DiscountValue
Section titled “DiscountValue”What comes off, and from what.
DiscountValueKind!
No description.
amount
Section titled “amount”Decimal
A fraction for a percentage, an amount for a fixed one. Unused for the rest.
Money
The most a percentage discount may take off one order.
Iranian merchants cap percentage discounts routinely — “۲۰٪ تا سقف ۱۰۰ هزار تومان” is the standard form of the offer, and a discount without a cap on an expensive basket is how a campaign loses money.
appliesTo
Section titled “appliesTo”DiscountTargetType!
What it applies to.
targetProductIds
Section titled “targetProductIds”[ID!]!
The specific products or collections, when it is not the whole order.
targetCollectionIds
Section titled “targetCollectionIds”[ID!]!
No description.
buyXGetY
Section titled “buyXGetY”BuyXGetY
The buy-X-get-Y terms, when kind is BUY_X_GET_Y.
DiscountValueInput
Section titled “DiscountValueInput”What comes off, and from what.
DiscountValueKind!
No description.
amount
Section titled “amount”Decimal
No description.
MoneyInput
Strongly advised on a percentage. An uncapped one on a large basket bleeds.
appliesTo
Section titled “appliesTo”DiscountTargetType
No description.
targetProductIds
Section titled “targetProductIds”[ID!]
No description.
targetCollectionIds
Section titled “targetCollectionIds”[ID!]
No description.
buyXGetY
Section titled “buyXGetY”BuyXGetYInput
No description.
DiscountValueKind
Section titled “DiscountValueKind”What kind of discount this is.
| Value | Meaning |
|---|---|
PERCENTAGE | A fraction off — with cap, almost always. |
FIXED_AMOUNT | A fixed amount off. |
FREE_SHIPPING | Delivery becomes free. |
BUY_X_GET_Y | Buy some, get some. |
PriceAdjustmentKind
Section titled “PriceAdjustmentKind”How a blanket price rule is expressed.
| Value | Meaning |
|---|---|
PERCENTAGE_DECREASE | Take this fraction off the variant’s price. |
PERCENTAGE_INCREASE | Add this fraction to it. What a channel markup is. |
FIXED_DECREASE | No description. |
FIXED_INCREASE | No description. |
PriceList
Section titled “PriceList”Prices for an audience.
A sparse override, not a full catalogue: a list holds entries only for the variants whose price differs, and everything else falls through to the variant’s own price. A wholesale list with four hundred entries in a four-thousand-product catalogue is normal.
ID!
No description.
version
Section titled “version”Version!
No description.
String!
No description.
description
Section titled “description”String
No description.
audience
Section titled “audience”PriceListAudience!
Who gets these prices.
adjustment
Section titled “adjustment”PriceListAdjustment
A blanket rule applied to everything not explicitly priced.
How most wholesale lists are actually built — “everything at 30% off retail” — with a handful of explicit exceptions on top. Null for a list that prices only what it names.
prices
Section titled “prices”PriceListEntryConnection!
The explicit per-variant prices.
| Argument | Type | Meaning |
|---|---|---|
first | Int | No description. |
after | String | No description. |
priceCount
Section titled “priceCount”Int!
No description.
activeFrom
Section titled “activeFrom”DateTime
When it starts and stops applying. Null bounds mean open-ended.
activeUntil
Section titled “activeUntil”DateTime
No description.
priority
Section titled “priority”Int!
What happens when a customer qualifies for more than one list.
Higher wins. Ties are broken by the older list, so adding a new list never silently reprices an existing arrangement.
isActive
Section titled “isActive”Boolean!
No description.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
PriceListAdjustment
Section titled “PriceListAdjustment”A blanket rule over everything a list does not name.
PriceAdjustmentKind!
No description.
Decimal!
A percentage as a fraction, or an amount, depending on kind.
PriceListAdjustmentInput
Section titled “PriceListAdjustmentInput”A blanket price rule.
PriceAdjustmentKind!
No description.
Decimal!
No description.
PriceListAudience
Section titled “PriceListAudience”Who a price list applies to.
PriceListAudienceKind!
No description.
segment
Section titled “segment”CustomerSegment
The segment, when the audience is one.
company
Section titled “company”Company
The company, when the audience is one.
channel
Section titled “channel”SalesChannel
The channel, when prices differ by where the sale happens.
PriceListAudienceKind
Section titled “PriceListAudienceKind”What kind of audience a price list has.
| Value | Meaning |
|---|---|
ALL | Everybody. A shop-wide sale expressed as prices rather than as a discount. |
SEGMENT | A customer segment — the usual wholesale arrangement. |
COMPANY | One company. |
CHANNEL | A sales channel. What a merchant uses when a marketplace’s commission means they must list higher there than on their own storefront. |
PriceListConnection
Section titled “PriceListConnection”A page of price lists.
[PriceListEdge!]!
No description.
[PriceList!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int
How many match across every page — when this page is the whole result. Null otherwise: the service behind this list does not count, and a number made up here would be a wrong one that looks right.
PriceListCreateInput
Section titled “PriceListCreateInput”A price list to create.
String!
No description.
description
Section titled “description”String
No description.
audienceKind
Section titled “audienceKind”PriceListAudienceKind!
No description.
segmentId
Section titled “segmentId”ID
No description.
companyId
Section titled “companyId”ID
No description.
channelId
Section titled “channelId”ID
No description.
adjustment
Section titled “adjustment”PriceListAdjustmentInput
No description.
activeFrom
Section titled “activeFrom”DateTime
No description.
activeUntil
Section titled “activeUntil”DateTime
No description.
priority
Section titled “priority”Int
No description.
PriceListEdge
Section titled “PriceListEdge”One price list, with its cursor.
cursor
Section titled “cursor”String!
No description.
PriceList!
No description.
PriceListEntry
Section titled “PriceListEntry”One variant’s price on one list.
ID!
No description.
variant
Section titled “variant”ProductVariant!
No description.
Money!
No description.
compareAtPrice
Section titled “compareAtPrice”Money
No description.
minimumQuantity
Section titled “minimumQuantity”Int!
The smallest quantity that gets this price.
One for an ordinary override. More for a quantity break — “twelve or more at 38,000” — which is how wholesale is quoted.
PriceListEntryConnection
Section titled “PriceListEntryConnection”A page of price entries.
[PriceListEntryEdge!]!
No description.
[PriceListEntry!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
totalCount
Section titled “totalCount”Int
How many match across every page — when this page is the whole result. Null otherwise: the service behind this list does not count, and a number made up here would be a wrong one that looks right.
PriceListEntryEdge
Section titled “PriceListEntryEdge”One price entry, with its cursor.
cursor
Section titled “cursor”String!
No description.
PriceListEntry!
No description.
PriceListEntryInput
Section titled “PriceListEntryInput”One variant’s price on a list.
variantId
Section titled “variantId”ID!
No description.
MoneyInput!
No description.
compareAtPrice
Section titled “compareAtPrice”MoneyInput
No description.
minimumQuantity
Section titled “minimumQuantity”Int
One for an ordinary override; more for a quantity break.
PriceListEntryPayload
Section titled “PriceListEntryPayload”What the price-entry mutations return.
priceList
Section titled “priceList”PriceList
No description.
entries
Section titled “entries”[PriceListEntry!]!
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
PriceListPayload
Section titled “PriceListPayload”What the price-list mutations return.
priceList
Section titled “priceList”PriceList
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
PriceListUpdateInput
Section titled “PriceListUpdateInput”Changes to a price list. Partial.
String
No description.
description
Section titled “description”String
No description.
adjustment
Section titled “adjustment”PriceListAdjustmentInput
No description.
activeFrom
Section titled “activeFrom”DateTime
No description.
activeUntil
Section titled “activeUntil”DateTime
No description.
priority
Section titled “priority”Int
No description.
isActive
Section titled “isActive”Boolean
No description.
ScheduledChangeStatus
Section titled “ScheduledChangeStatus”Where a scheduled change stands.
| Value | Meaning |
|---|---|
SCHEDULED | No description. |
APPLIED | No description. |
REVERTED | No description. |
CANCELLED | No description. |
PARTIALLY_APPLIED | The change ran and some variants could not be repriced. See the job. |
ScheduledPriceChange
Section titled “ScheduledPriceChange”A price change the merchant scheduled.
Modelled rather than left to a cron job the merchant writes themselves, because a merchant announcing a sale for Nowruz needs it to start at midnight without somebody being awake.
ID!
No description.
String!
No description.
status
Section titled “status”ScheduledChangeStatus!
No description.
entryCount
Section titled “entryCount”Int!
Which variants, and what they become.
scheduledFor
Section titled “scheduledFor”DateTime!
When it applies.
revertsAt
Section titled “revertsAt”DateTime
When it reverts, for a temporary change. Null to make it permanent.
snapshotTaken
Section titled “snapshotTaken”Boolean!
What the prices were, kept so a revert restores them exactly.
Without this a “temporary” price change is a one-way door, and a merchant running a three-day sale loses their original prices.
appliedAt
Section titled “appliedAt”DateTime
No description.
revertedAt
Section titled “revertedAt”DateTime
No description.
createdBy
Section titled “createdBy”StaffMember
No description.
ScheduledPriceChangeConnection
Section titled “ScheduledPriceChangeConnection”A page of scheduled price changes.
[ScheduledPriceChangeEdge!]!
No description.
[ScheduledPriceChange!]!
No description.
pageInfo
Section titled “pageInfo”PageInfo!
No description.
ScheduledPriceChangeEdge
Section titled “ScheduledPriceChangeEdge”One scheduled change, with its cursor.
cursor
Section titled “cursor”String!
No description.
ScheduledPriceChange!
No description.
ScheduledPriceChangeInput
Section titled “ScheduledPriceChangeInput”A price change to schedule.
String!
No description.
scheduledFor
Section titled “scheduledFor”DateTime!
No description.
revertsAt
Section titled “revertsAt”DateTime
Omit to make it permanent.
entries
Section titled “entries”[ScheduledPriceEntryInput!]!
No description.
ScheduledPriceChangePayload
Section titled “ScheduledPriceChangePayload”What the scheduled-change mutations return.
scheduledChange
Section titled “scheduledChange”ScheduledPriceChange
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
ScheduledPriceEntryInput
Section titled “ScheduledPriceEntryInput”One variant’s scheduled new price.
variantId
Section titled “variantId”ID!
No description.
MoneyInput!
No description.
compareAtPrice
Section titled “compareAtPrice”MoneyInput
No description.