24 September 2025
Composable Commerce
HTTP API
Enhancement
Pricing and DiscountsGraphQL
You can now control how a relative (percentage) discount is distributed across items in a cart when using a Pattern discount target. This enhancement lets you distribute a discount across all involved units in a Buy and Get scenario, instead of applying it separately to each eligible item.

Changes:

  • [API] Added applicationMode field to CartDiscountValueRelative and CartDiscountValueRelativeDraft types in Cart Discounts API.
  • [GraphQL API] Added the following types to the GraphQL schema: RelativeCartDiscountValue, RelativeCartDiscountValueInput.
  • [GraphQL API] Added the relativeCart input field to the CartDiscountValueInput type.

The following changes were introduced in terms of GraphQL SDL:

extend input CartDiscountValueInput {
  relativeCart: RelativeCartDiscountValueInput
}

type RelativeCartDiscountValue implements CartDiscountValue {
  permyriad: Int!
  applicationMode: DiscountApplicationMode!
  type: String!
}

input RelativeCartDiscountValueInput {
  permyriad: Int!
  applicationMode: DiscountApplicationMode!
}