From 5a0b3ccb50ace1ce55576b25d6449054a2add149 Mon Sep 17 00:00:00 2001 From: rahinisrinivas Date: Fri, 9 Aug 2024 10:56:17 -0400 Subject: [PATCH 1/2] Remove response example from the scenario --- docs/rule-promotions/overview.md | 304 +------------------------------ 1 file changed, 2 insertions(+), 302 deletions(-) diff --git a/docs/rule-promotions/overview.md b/docs/rule-promotions/overview.md index 57b8e0d9..2cbff405 100644 --- a/docs/rule-promotions/overview.md +++ b/docs/rule-promotions/overview.md @@ -710,7 +710,7 @@ The following messages indicating the removal of Promotion B and the application #### Scenario 4: Higher priority promotion takes precedence when applying multiple stackable promotions -When multiple promotions are stackable and have different priority levels, the one with the highest priority is applied first. Subsequent promotions are applied in descending order of their priority. +When multiple promotions are stackable and have different priority levels, the promotion with the highest priority is applied first, followed by other promotions in descending order of priority. For example, consider two stackable promotions: @@ -719,307 +719,7 @@ For example, consider two stackable promotions: In this scenario, Promotion A, with a higher priority of 90, is applied first, providing a 20% discount. Promotion B, with a priority of 60, is then applied, offering an additional 10% discount on the already reduced price. -In this following cart response, you can see that the item originally priced at $100.00 has been reduced to $72.00 after applying both the 20% and 10% discounts in the correct order of priority. - -```json -{ - "data": [ - ::: - "discounts": { - "10-off": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00", - "constituents": { - "c6ed29ea-be53-4e94-ba43-aa12d34b2124": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00" - } - } - }, - "20-off": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00", - "constituents": { - "6683e778-54a1-4206-a042-36412ee0f104": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00" - } - } - } - } - }, - "timestamps": { - "created_at": "2024-08-07T20:05:58Z", - "updated_at": "2024-08-07T20:05:58Z" - } - } - }, - { - "id": "869ae2ca-b6ee-4307-8e9e-d5954524029d", - "type": "promotion_item", - "online_store_url": null, - "promotion_id": "6683e778-54a1-4206-a042-36412ee0f104", - "name": "10% off your items!", - "description": "Promotion", - "sku": "20-off", - "slug": "", - "image": { - "mime_type": "", - "file_name": "", - "href": "" - }, - "quantity": 1, - "manage_stock": false, - "unit_price": { - "amount": -2000, - "currency": "USD", - "includes_tax": false - }, - "value": { - "amount": -2000, - "currency": "USD", - "includes_tax": false - }, - "links": {}, - "meta": { - "display_price": { - "with_tax": { - "unit": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00" - }, - "value": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00" - } - }, - "without_tax": { - "unit": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00" - }, - "value": { - "amount": -2000, - "currency": "USD", - "formatted": "-$20.00" - } - }, - "tax": { - "unit": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - }, - "value": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - } - }, - "discount": { - "unit": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - }, - "value": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - } - }, - "without_discount": { - "unit": { - "amount": 0, - "currency": "", - "formatted": "0" - }, - "value": { - "amount": 0, - "currency": "", - "formatted": "0" - } - } - }, - "timestamps": { - "created_at": "2024-08-07T20:05:58Z", - "updated_at": "2024-08-07T20:05:58Z" - } - }, - "promotion_source": "rule-promotion" - }, - { - "id": "cf90c0ff-973d-4dcf-90aa-3a678c8a1ba1", - "type": "promotion_item", - "online_store_url": null, - "promotion_id": "c6ed29ea-be53-4e94-ba43-aa12d34b2124", - "name": "10% off your items!", - "description": "Promotion", - "sku": "10-off", - "slug": "", - "image": { - "mime_type": "", - "file_name": "", - "href": "" - }, - "quantity": 1, - "manage_stock": false, - "unit_price": { - "amount": -800, - "currency": "USD", - "includes_tax": false - }, - "value": { - "amount": -800, - "currency": "USD", - "includes_tax": false - }, - "links": {}, - "meta": { - "display_price": { - "with_tax": { - "unit": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00" - }, - "value": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00" - } - }, - "without_tax": { - "unit": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00" - }, - "value": { - "amount": -800, - "currency": "USD", - "formatted": "-$8.00" - } - }, - "tax": { - "unit": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - }, - "value": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - } - }, - "discount": { - "unit": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - }, - "value": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - } - }, - "without_discount": { - "unit": { - "amount": 0, - "currency": "", - "formatted": "0" - }, - "value": { - "amount": 0, - "currency": "", - "formatted": "0" - } - } - }, - "timestamps": { - "created_at": "2024-08-07T20:05:58Z", - "updated_at": "2024-08-07T20:05:58Z" - } - }, - "promotion_source": "rule-promotion" - } - ], - "meta": { - "display_price": { - "with_tax": { - "amount": 7200, - "currency": "USD", - "formatted": "$72.00" - }, - "without_tax": { - "amount": 7200, - "currency": "USD", - "formatted": "$72.00" - }, - "tax": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - }, - "discount": { - "amount": -2800, - "currency": "USD", - "formatted": "-$28.00" - }, - "without_discount": { - "amount": 10000, - "currency": "USD", - "formatted": "$100.00" - }, - "shipping": { - "amount": 0, - "currency": "USD", - "formatted": "$0.00" - } - }, - "timestamps": { - "created_at": "2024-08-06T20:56:01Z", - "updated_at": "2024-08-07T20:05:58Z", - "expires_at": "2024-09-06T20:05:58Z" - }, - "messages": [ - { - "source": { - "type": "promotion_item", - "id": "869ae2ca-b6ee-4307-8e9e-d5954524029d" - }, - "title": "Promotion Added", - "description": "Promotion has been added to cart." - }, - { - "source": { - "type": "promotion_item", - "id": "cf90c0ff-973d-4dcf-90aa-3a678c8a1ba1" - }, - "title": "Promotion Added", - "description": "Promotion has been added to cart." - }, - { - "source": { - "type": "custom_item", - "id": "f1ea154f-09ed-484c-a1eb-7d89d2687bf4" - }, - "title": "Discount Added", - "description": "Item discount has been added." - } - ] - } -} -``` +Now, consider an item with an original price of $100. The price after applying Promotion A (20% discount) would be $80.00, and the price after applying Promotion B (10% discount) would be $72.00. ## Feature Comparison: Promotions Standard vs. Rule Promotions From 5af98ac7c7e3da78a2c032674ad22833076abd8f Mon Sep 17 00:00:00 2001 From: David Stover <56250584+davidmoltin@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:32:56 -0400 Subject: [PATCH 2/2] Update --- docs/rule-promotions/overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rule-promotions/overview.md b/docs/rule-promotions/overview.md index 2cbff405..840dc18d 100644 --- a/docs/rule-promotions/overview.md +++ b/docs/rule-promotions/overview.md @@ -598,8 +598,8 @@ The following error message is returned: Consider you have the following promotions: -- Promotion B: Priority 90, Non-Stackable -- Promotion E: Priority 60, Non-Stackable + - Promotion B: Priority 90, Non-Stackable + - Promotion E: Priority 60, Non-Stackable If Promotion E is applied first and the cart becomes eligible for Promotion B, Promotion B is applied and Promotion E is removed. @@ -762,4 +762,4 @@ Now, consider an item with an original price of $100. The price after applying P - [Promotions Builder in Commerce Manager](/docs/commerce-manager/promotions-builder/creating-a-promotion-in-promotions-builder) - [Rule Promotions API](/docs/rule-promotions/rule-promotions-api/rule-promotions-api-overview) -- [Promotion Codes](/docs/rule-promotions/overview#promotion-codes) \ No newline at end of file +- [Promotion Codes](/docs/rule-promotions/overview#promotion-codes)