Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions reference/promotions.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,8 @@ components:
properties:
discount:
$ref: '#/components/schemas/Discount'
maximum_allowed_discount_amount:
$ref: '#/components/schemas/MaximumAllowedDiscountAmount'
description: |-
**Cart Value Action**
Applies discount on the entire cart.
Expand Down Expand Up @@ -1054,6 +1056,8 @@ components:
properties:
discount:
$ref: '#/components/schemas/Discount'
maximum_allowed_discount_amount:
$ref: '#/components/schemas/MaximumAllowedDiscountAmount'
as_total:
type: boolean
description: |-
Expand Down Expand Up @@ -1128,13 +1132,17 @@ components:
type: string
description: The amount of discount (percentage off) to apply.
description: '**Percentage Discount**'
required:
- percentage_amount
FixedDiscount:
title: Fixed Discount
type: object
properties:
fixed_amount:
$ref: '#/components/schemas/Money'
description: '**Fixed Discount**'
required:
- fixed_amount
Money:
title: Money
pattern: '[0-9]+(\.[0-9]+)?'
Expand All @@ -1143,6 +1151,17 @@ components:
**Money**
Represents a monetary value in the store’s default currency.
example: '12.95'
MaximumAllowedDiscountAmount:
type: string
nullable: true
pattern: '^(0|([1-9][0-9]*))(\.[0-9]+)?$'
description: |
The maximum monetary value that can be applied as a discount. It can take value from 1 to 10000000.
The application of this maximum depends on the discount type:
- Discount on shipping: the max limit is distributed to the first number of shipping destinations until it is reached
- Discount on products: the max limit is distributed to the first number of eligible products until it is reached
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably we need to double check if this aligns with the project's description: https://bigcommercecloud.atlassian.net/browse/PROJECT-7350

image

Copy link
Contributor Author

@bc-vincent-zhao bc-vincent-zhao Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Donald for noticing this 🙇 , it is indeed different from the original PR Anshu prepared, I changed the description here deliberately based on the latest discussion and actual implementation of the feature.

For example: when we have a $10 off each product, maximum $20 promotion and we have 3 items each cost $100, the resulting discount would be $10 discount for the first 2 items (there's no weighted distribution) cc @bc-chaozhang

more examples can be found at https://github.com/bigcommerce/bigcommerce/blob/master/tests/Integration/Promotion/CartItemDiscountMaximumAllowedTest.php

@bc-jwk has tested the behaviour extensively and he's ok with the current behaviour

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for confirmation Vincent, probably worth updating the Project description to latest info so would be easier for future references 🙇

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a comment here for posterity.

The current implementation and behaviour is acceptable since the lift to introduce isn't too complex and we avoid making huge changes to the engine. Plus it should really fit the majority of use cases based on the feedback we've received.

We will release this into the wild and iterate when necessary if we receive different feedback.

- Discount on order subtotal: the max limit is checked against the order discount value
example: '10'
OptionalCursorCollectionMeta:
title: Collection Meta
type: object
Expand Down Expand Up @@ -1939,8 +1958,8 @@ components:
data:
- id: 1
redemption_type: AUTOMATIC
name: Buy Product X Get Free Shipping
display_name: WOW!!! FREE SHIPPING for Product X
name: Buy Product worth X Get Y% off upto Z
display_name: Shop for X and get Y% off upto Z
created_from: api
channels:
- id: 1
Expand All @@ -1961,7 +1980,8 @@ components:
- action:
cart_value:
discount:
fixed_amount: '12.95'
percentage_amount: '10'
maximum_allowed_discount_amount: '20'
apply_once: true
stop: true
condition:
Expand Down