Discount Kit's product and variant metafield 'Metafield Discount' configuration allows you to specify information that can be used inside the Custom Discount. The configuration must be structured as an array:
type CustomData = {
tag?: String // optional, and used only in the 'grouping' mechanism
discount_message?: String // optional, defaults to discount title
discount_percentage?: number, // optional, 1-100
discount_value?: number // optional, in cents unit, 100 = $1
discount_title: String // required - used to match configurations to specific discounts
}
type CustomDatas = CustomData[] // array is required
This configuration is wrapped by a discount. This means you get all of the other benefits of a Discount Kit discount (manual or automatic codes, scheduling, targeting specific customers, targeting specific markets), but can change the discounted variants, their values and their messaging at any time!
You must provide an array of configurations, with each configuration specifying a matching `discount_title`. This allows you to define different discount behaviors for different Custom discounts. If you specify multiple configurations for the same discount, only the first matching configuration will be used.

