Discount Code Basic Input
The input fields for creating or updating an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.
When creating, required fields are:
codecontext(or deprecated)title
Anchor to FieldsFields
- appliesOncePerCustomer (Boolean)
- code (String)
- combinesWith (DiscountCombinesWithInput)
- context (DiscountContextInput)
- customerGets (DiscountCustomerGetsInput)
- endsAt (DateTime)
- minimumRequirement (DiscountMinimumRequirementInput)
- recurringCycleLimit (Int)
- startsAt (DateTime)
- tags ([String!])
- title (String)
- usageLimit (Int)
- customerSelection (DiscountCustomerSelectionInput): deprecated
- Anchor to appliesOncePerCustomerapplies•Boolean
Once Per Customer Whether a customer can only use the discount once.
- Anchor to codecode•String
The code that customers use to apply the discount.
- Anchor to combinesWithcombines•Discount
With Combines With Input The discount classes that you can use in combination with Shopify discount types, and the product discount tags that determine which product discounts can apply together on the same cart line.
- Anchor to contextcontext•Discount
Context Input The context defining which buyers can use the discount. You can target specific customer IDs, customer segments, or make the discount available to all buyers.
- Anchor to customerGetscustomer•Discount
Gets Customer Gets Input The items in the order that qualify for the discount, their quantities, and the total value of the discount.
- Anchor to endsAtends•Date
At Time The date and time when the discount expires and is no longer available to customers. For discounts without a fixed expiration date, specify
null.- Anchor to minimumRequirementminimum•Discount
Requirement Minimum Requirement Input The minimum subtotal or quantity of items that are required for the discount to be applied.
- Anchor to recurringCycleLimitrecurring•Int
Cycle Limit The number of billing cycles for which the discount can be applied, which is useful for subscription-based discounts. For example, if you set this field to
3, then the discount only applies to the first three billing cycles of a subscription. If you specify0, then the discount applies indefinitely.- Anchor to startsAtstarts•Date
At Time The date and time when the discount becomes active and is available to customers.
- •[String!]
A list of searchable keywords that are associated with the discount.
Use these tags on product discounts to determine which other product discounts can apply to the same cart line when you configure
in.For example, you can apply a
loyaltytag to discounts that are associated with a loyalty program.Updating
tagsoverwrites any existing tags that were previously added to the discount. To add new tags without overwriting existing tags, use themutation.- Anchor to titletitle•String
The discount's name that displays to merchants in the Shopify admin and to customers.
- Anchor to usageLimitusage•Int
Limit The maximum number of times the discount can be redeemed. For unlimited usage, specify
null.- Anchor to customerSelectioncustomer•Discount
Selection Customer Selection Input Deprecated