checkout_write
Arguments
The rule to create.
Returns
required
A store-level checkout discount rule: when its conditions match the cart, its discount applies to the targeted delivery options. The first matching active rule wins.
Create a checkout discount rule. It is created inactive; turn it on with checkoutDiscountRuleSetActive. Amounts must be in the shop’s currency. Numeric Shopify product and collection ids are saved as GIDs, and empty condition blocks are dropped. An invalid rule fails with INVALID_CHECKOUT_DISCOUNT_RULE (400).
checkout_write