Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Pricing and discounts

Object

Buy-X-get-Y terms.

Int!

How many, of what, must be bought.

[ID!]!

No description.

[ID!]!

No description.

Int!

How many are then given, and at what discount.

[ID!]!

No description.

[ID!]!

No description.

Float!

A fraction. 1 is free; 0.5 is half price.

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.

Input

Buy-X-get-Y terms as supplied.

Int!

No description.

[ID!]

No description.

[ID!]

No description.

Int!

No description.

[ID!]

No description.

[ID!]

No description.

Float!

No description.

Int

No description.

Object

Something that comes off at checkout.

ID!

No description.

Version!

No description.

String!

What the merchant calls it. Shown to the buyer on the order.

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.

DiscountConditions!

What has to be true for it to apply.

DiscountUsage!

How much of it is left.

DiscountCombination!

Whether it can be combined with other discounts.

DateTime!

When it works.

DateTime

No description.

DiscountStatus!

No description.

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.

String

The app that installed it, for a discount a merchant did not create.

DateTime!

No description.

DateTime!

No description.

Object

Whether a discount can be combined with others.

Boolean!

With another discount on the products.

Boolean!

With a discount on the order total.

Boolean!

With a shipping discount.

Input

Combination rules as supplied.

Boolean

No description.

Boolean

No description.

Boolean

No description.

Object

What has to be true for a discount to apply.

Money

The cart must reach this before discounts.

Int

Or hold at least this many units.

[ID!]!

Only these customers. Empty means anybody.

[ID!]!

No description.

[ID!]!

Only these channels. Empty means everywhere.

[String!]!

Only these provinces.

What a merchant uses for a free-delivery offer they can only honour where a courier reaches cheaply.

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.

[PaymentMethodType!]!

Only these payment methods — an incentive to pay online rather than on delivery.

Input

Conditions as supplied.

MoneyInput

No description.

Int

No description.

[ID!]

No description.

[ID!]

No description.

[ID!]

No description.

[String!]

No description.

Boolean

No description.

[PaymentMethodType!]

No description.

Object

A page of discounts.

[DiscountEdge!]!

No description.

[Discount!]!

No description.

PageInfo!

No description.

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.

Input

A discount to create.

String!

No description.

DiscountTrigger!

No description.

String

Required when trigger is CODE.

DiscountValueInput!

No description.

DiscountConditionsInput

No description.

Int

No description.

Int

No description.

DiscountCombinationInput

No description.

DateTime!

No description.

DateTime

No description.

Object

One discount, with its cursor.

String!

No description.

Discount!

No description.

Input

A filter on the discount list.

[DiscountStatus!]

No description.

[DiscountTrigger!]

No description.

[DiscountValueKind!]

No description.

String

Discounts an app installed rather than the merchant.

DateTime

No description.

Object

What the discount mutations return.

Discount

No description.

[UserError!]!

No description.

Enum

How a discount list is ordered.

ValueMeaning
CREATED_ATNo description.
TITLENo description.
ACTIVE_FROMNo description.
USED_COUNTNo description.
TOTAL_DISCOUNTEDNo description.
Enum

Where a discount’s logic lives.

ValueMeaning
RULESDeclarative rules the platform evaluates.
FUNCTIONA sandboxed function shipped by an app. Later.
Enum

Where a discount stands.

ValueMeaning
SCHEDULEDIts start date has not arrived.
ACTIVENo description.
EXPIREDPast its end date.
EXHAUSTEDIts usage limit is spent.
DISABLEDSwitched off by the merchant.
Enum

How a buyer gets a discount.

ValueMeaning
CODEThey type a code.
AUTOMATICIt applies on its own when the conditions are met.
Input

Changes to a discount. Partial.

String

No description.

String

No description.

DiscountValueInput

No description.

DiscountConditionsInput

No description.

Int

No description.

Int

No description.

DiscountCombinationInput

No description.

DateTime

No description.

DateTime

No description.

Object

How much of a discount is left.

Int!

How many times it has been used.

Int

The total budget. Null for unlimited.

Int

How many times one customer may use it. Null for unlimited.

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.

Object

What comes off, and from what.

DiscountValueKind!

No description.

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.

DiscountTargetType!

What it applies to.

[ID!]!

The specific products or collections, when it is not the whole order.

[ID!]!

No description.

BuyXGetY

The buy-X-get-Y terms, when kind is BUY_X_GET_Y.

Input

What comes off, and from what.

DiscountValueKind!

No description.

Decimal

No description.

MoneyInput

Strongly advised on a percentage. An uncapped one on a large basket bleeds.

DiscountTargetType

No description.

[ID!]

No description.

[ID!]

No description.

BuyXGetYInput

No description.

Enum

What kind of discount this is.

ValueMeaning
PERCENTAGEA fraction off — with cap, almost always.
FIXED_AMOUNTA fixed amount off.
FREE_SHIPPINGDelivery becomes free.
BUY_X_GET_YBuy some, get some.
Enum

How a blanket price rule is expressed.

ValueMeaning
PERCENTAGE_DECREASETake this fraction off the variant’s price.
PERCENTAGE_INCREASEAdd this fraction to it. What a channel markup is.
FIXED_DECREASENo description.
FIXED_INCREASENo description.
Object

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!

No description.

String!

No description.

String

No description.

PriceListAudience!

Who gets these prices.

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.

PriceListEntryConnection!

The explicit per-variant prices.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Int!

No description.

DateTime

When it starts and stops applying. Null bounds mean open-ended.

DateTime

No description.

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.

Boolean!

No description.

DateTime!

No description.

DateTime!

No description.

Object

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.

Input

A blanket price rule.

PriceAdjustmentKind!

No description.

Decimal!

No description.

Object

Who a price list applies to.

PriceListAudienceKind!

No description.

CustomerSegment

The segment, when the audience is one.

Company

The company, when the audience is one.

SalesChannel

The channel, when prices differ by where the sale happens.

Enum

What kind of audience a price list has.

ValueMeaning
ALLEverybody. A shop-wide sale expressed as prices rather than as a discount.
SEGMENTA customer segment — the usual wholesale arrangement.
COMPANYOne company.
CHANNELA sales channel. What a merchant uses when a marketplace’s commission means they must list higher there than on their own storefront.
Object

A page of price lists.

[PriceListEdge!]!

No description.

[PriceList!]!

No description.

PageInfo!

No description.

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.

Input

A price list to create.

String!

No description.

String

No description.

PriceListAudienceKind!

No description.

ID

No description.

ID

No description.

ID

No description.

PriceListAdjustmentInput

No description.

DateTime

No description.

DateTime

No description.

Int

No description.

Object

One price list, with its cursor.

String!

No description.

PriceList!

No description.

Object

One variant’s price on one list.

ID!

No description.

ProductVariant!

No description.

Money!

No description.

Money

No description.

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.

Object

A page of price entries.

[PriceListEntryEdge!]!

No description.

[PriceListEntry!]!

No description.

PageInfo!

No description.

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.

Object

One price entry, with its cursor.

String!

No description.

PriceListEntry!

No description.

Input

One variant’s price on a list.

ID!

No description.

MoneyInput!

No description.

MoneyInput

No description.

Int

One for an ordinary override; more for a quantity break.

Object

What the price-entry mutations return.

PriceList

No description.

[PriceListEntry!]!

No description.

[UserError!]!

No description.

Object

What the price-list mutations return.

PriceList

No description.

[UserError!]!

No description.

Input

Changes to a price list. Partial.

String

No description.

String

No description.

PriceListAdjustmentInput

No description.

DateTime

No description.

DateTime

No description.

Int

No description.

Boolean

No description.

Enum

Where a scheduled change stands.

ValueMeaning
SCHEDULEDNo description.
APPLIEDNo description.
REVERTEDNo description.
CANCELLEDNo description.
PARTIALLY_APPLIEDThe change ran and some variants could not be repriced. See the job.
Object

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.

ScheduledChangeStatus!

No description.

Int!

Which variants, and what they become.

DateTime!

When it applies.

DateTime

When it reverts, for a temporary change. Null to make it permanent.

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.

DateTime

No description.

DateTime

No description.

StaffMember

No description.

Object

A page of scheduled price changes.

[ScheduledPriceChangeEdge!]!

No description.

[ScheduledPriceChange!]!

No description.

PageInfo!

No description.

Object

One scheduled change, with its cursor.

String!

No description.

ScheduledPriceChange!

No description.

Input

A price change to schedule.

String!

No description.

DateTime!

No description.

DateTime

Omit to make it permanent.

[ScheduledPriceEntryInput!]!

No description.

Object

What the scheduled-change mutations return.

ScheduledPriceChange

No description.

[UserError!]!

No description.

Input

One variant’s scheduled new price.

ID!

No description.

MoneyInput!

No description.

MoneyInput

No description.