Main issue: Order discount Functions show cart and line item total/subtotal as identical, conflicting with docs implying product discounts run before order discounts. Screenshots illustrate equal totals/subtotals.
Clarifications/answers:
Execution model: Product and order discount Functions run at the same time. Their outputs are later evaluated by the discounts engine, which prefers product discounts first when deciding the best combination.
Not a bug: During Function execution, no other discounts are known yet, so totals/subtotals won’t reflect other discounts. This explains why values appear the same in Order discount Functions.
Documentation: Will be updated to clearly state the concurrent execution and the later combination step.
Future control: Discount allocators (in developer preview) will allow more control over how order and product discounts combine.
Outcomes/status:
Questions answered: (1) They run concurrently; (2) Values are not incorrect—by design.
Actions: Documentation update planned; no fix timeline needed since behavior is intentional.
Open items: No ETA provided for doc update or for discount allocators leaving preview.
Product and order discount Functions are ran all at once, and their outputs are used later in the discounts engine, where, when determining the best discount combination, product discounts are considered first, then order discounts.
It is unfortunately not a bug, as discount Functions can’t know about other discounts when they’re being executed, as it’s long before the discounts engine begins to consider discount combinations and the best one. We’re going to update the documentation to make this clearer.
Discount allocators (currently in dev preview) would allow you to provide more control over the combination of order and product discounts.