Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Anchor to DiscountCodeAppInput

DiscountCodeAppInput

input_object

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 appliesOncePerCustomerappliesOncePerCustomer
•

Whether a customer can only use the discount once.

•

The code that customers use to apply the discount.

•

The discount classes that you can use in combination with Shopify discount types.

•

The customers that can use the discount.

•

The date and time when the discount expires and is no longer available to customers. For discounts without a fixed expiration date, specify null.

•

The function ID associated with the app extension that's providing the discount type.

•

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.

•

The date and time when the discount becomes active and is available to customers.

•

The discount's name that displays to merchants in the Shopify admin and to customers.

•

The maximum number of times that a customer can use the discount. For discounts with unlimited usage, specify null.


Was this section helpful?