/
Handle partial cancellation flow - Ajio
Handle partial cancellation flow - Ajio
Filter out AJIO order based on orderSiteID. If orderSiteID contains ‘AJIO’, then continue the flow else break.
For an order, fetch the order_items for which we have received packed request only.
Updated query to fetch order_items for a shipment
SELECT shipments.id, orders.customerOrderNumber AS customerOrderNumber, order_items.orderItemID AS orderItemId, order_items.lineItemSequenceNumber AS lineItemSequenceNumber, order_items.itemID AS itemId, order_items.customerOrderItemID AS customerOrderItemID, channels.externalChannelID AS externalChannelID FROM orders LEFT JOIN order_items ON order_items.order_id = orders.id LEFT JOIN shipments ON shipments.id = order_items.shipment_id LEFT JOIN channels ON channels.id = orders.channel_id WHERE orders.customerOrderNumber ='BHAJIO00153' AND channels.connectionId = 944 AND order_items.status != 'CANCELLED' AND shipments.externalShipmentID = 'BHAJIO00153-1938-4263'
4. Fetch the order_items from the get shipping package details API of UC.
5. If the count of order_items from db and order_items from the shipment does not match, return the error stating mismatch in the order_items count.
Extended flow:
If the mismatch occurs in the count of the order_items fetched from the DB and received from the response of API do the following:
Replace the shipmentId for the mismatched order_items with 0.
Call the cancel order API for the mismatched order_items only.
, multiple selections available,
Related content
Partial Cancellation handling on Ajio
Partial Cancellation handling on Ajio
More like this
Cancel Steps:
Cancel Steps:
More like this
Ajio reconciliation
Ajio reconciliation
More like this
Unicommerce Cancel:
Unicommerce Cancel:
More like this