Discount Code App Input
The input fields for creating or updating a code discount, where the discount type is provided by an app extension that uses Shopify Functions.
Use these input fields when you need advanced or custom discount capabilities that aren't supported by Shopify's native discount types.
Anchor to FieldsFields
- Anchor to appliesOncePerCustomerapplies•Boolean
Once Per Customer Whether a customer can only use the discount once.
- Anchor to appliesOnOneTimePurchaseapplies•BooleanDefault:true
On One Time Purchase Whether the discount applies on regular one-time-purchase items.
- Anchor to appliesOnSubscriptionapplies•BooleanDefault:false
On Subscription Whether the discount applies to subscriptions items.
- 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.
- Anchor to customerSelectioncustomer•Discount
Selection Customer Selection Input The customers that can use 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 functionIdfunction•String
Id The function ID associated with the app extension that's providing the discount type.
- Anchor to metafieldsmetafields•[Metafield
Input!]Default:[] Additional metafields to associate to the discount. Metafields provide dynamic function configuration with different parameters, such as
percentage
for a percentage discount. Merchants can set metafield values in the Shopify admin, which makes the discount function more flexible and customizable.- Anchor to recurringCycleLimitrecurring•IntDefault:1
Cycle Limit The number of times a discount applies on recurring purchases (subscriptions). 0 will apply infinitely whereas 1 will only apply to the first checkout.
- Anchor to startsAtstarts•Date
At Time The date and time when the discount becomes active and is available to customers.
- 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 that a customer can use the discount. For discounts with unlimited usage, specify
null
.