Skip to content

Copy Cart Rule (GraphQL)

Mutation: copyAdminMarketingCartRule. Duplicates an existing cart rule into a brand-new rule (the API equivalent of the listing's Copy action).

The input.id takes the source rule's IRI (e.g. /api/admin/marketing/cart-rules/17). The mutation returns the full detail of the newly created rule.

What gets copied

FieldBehaviour
namePrefixed with Copy of .
statusForced to 0 (the copy starts inactive).
channelsCopied from the source rule.
customerGroupsCopied from the source rule.
CouponsNot copied — the new rule has no coupons.

An unknown source id returns an error in errors[].

Permission: marketing.promotions.cart_rules.create.

Released under the MIT License.