Manage promotions at different stages of order processing
Managing Promotions During Order Processing
Uniqodo supports an optional Order.status
property to represent the status of an order as it appears in the client's e-commerce platform. This property allows you to control how promotions behave at different stages of the order lifecycle.
Order Status Values
Any status value can be sent to Uniqodo; however, the following statuses have special meaning:
new
– Default status ifOrder.status
isnull
.confirmed
– Indicates the order has been completed in the e-commerce system.cancelled
– Indicates the order has been cancelled.
Behaviour by Status
-
new
(default):
All promotion rules and criteria will apply when the order is in this status. Every order starts withnew
. -
confirmed
:
Once an order is completed, its status is typically set toconfirmed
in your e-commerce system. At this stage, you should call the/v2/transactions
endpoint to notify Uniqodo of the event. Applying promotions to aconfirmed
order follows special rules (see Order Amendment). -
cancelled
:
Indicates the order has been voided or is no longer valid. You should not attempt to apply any promotion to such orders.
Order Amendment
When a customer modifies a completed order:
- Any promotions originally applied to the order will still apply as long as the promotion criteria are still met — even if the promotion has since expired.
- To ensure this behaviour, set the order status to
confirmed
in your request to the Apply Reward endpoint. - The original promotions must be listed in the
Order.appliedPromotions
property as supplied by the prior response from the Apply Reward endpoint.
Rules for Amended Confirmed Orders
For promotions originally applied to the order:
-
Skipped rules:
- Promotion expiry
- Code expiry
- Redemption limits
- Promotion combination rules
-
New promotions:
- Automatic promotions will not be applied to a
confirmed
order unless it was among the originally applied promotions. - Any new coupon code must meet all promotion rules and criteria before it can be applied.
- Automatic promotions will not be applied to a
Example Flow
- Order created → Status:
new
→ Apply all active promotion rules and criteria. - Order confirmed → Status:
confirmed
→ Notify Uniqodo via/v2/transactions
. - Order amended after confirmation → Status:
confirmed
in the Apply Reward request → Original promotions reapplied with skipped rules as above.
Related Endpoints
/v2/transactions
– Notify Uniqodo of order confirmation.- Apply Reward – Apply or reapply promotions to an order.