Hi Team,
We are trying to Implement to a shipment status update for a placed shipment where some products of the shipment are confirmed while others are rejected. if we update for entire shipment, the update is successful and shipment status is updated.But in case of partial update, even though there is no error response in the fdk method , update is not visible in shipment status.
Hi @Jalees ,
We just checked with the below partial status update scenarios-
- Ordered 4 quantities - (2 rejected with different reasons and 2 were confirmed) - No issues in this case and shipment status was also updated without any problem.
- Ordered 3 quantities - (1 rejected with some reason and 2 were confirmed) - No issues in this one as well
The only scenario in which the partial update was failing when we ordered 4 quantities and tried to cancel 2 quantities using the same reason but as individual entities like the below
Since in the above scenario, the key [quantity, Rejection reason] is not unique it is failing while updating the details in the bag_status_reason_code with an error - “Duplicate Entry”.
The same will not fail in the below scenario as the [quantity, Rejection reason] is unique for each quantity
[1, Product Not Available] and [1, Defective Product]
Ideally, if the reason for both quantities is the same then the seller can cancel both quantities together like below
Please let me know if a partial update is failing in any other scenarios.
Hi @Siddhesh_More_007,
We are not able to change the “confirm” quantity of the products from the platform dashboard. The partial shipment status updates were done using updateShipmentStatus fdk method. We can discuss this on a call to better understand the underlying issue.
Hi @Jalees_Jahanzaib ,
Sure! Can you please share the request body that you are passing? will check once and will connect with you after.
Also, share the response that you are receiving.
@Siddhesh_More_007
Request Body:
OrderPlatformModels.Products products = new OrderPlatformModels.Products(null,code,quantity);
ShipmentsRequest shipmentsRequest = new ShipmentsRequest(shipmentId, null, products, null);
StatuesRequest statuesRequest = new StatuesRequest("bag_confirmed", List.of(shipmentsRequest), "cancelled_seller", null);
UpdateShipmentStatusRequest updateShipmentStatusRequest = new UpdateShipmentStatusRequest(null, List.of(statuesRequest), null, null, null);
UpdateShipmentStatusResponseBody response = platformClient.order.updateShipmentStatus(updateShipmentStatusRequest);
Response is 200
@Siddhesh_More_007 ,
Just captured the request and response logs:
Here the shipment has 3 different SKUs and we are trying to confirm 1 quantity of 1 SKU and cancel the rest of all quantities of all SKUs.
Request Body:
{"statuses":[{"status":"bag_confirmed","shipments":[{"identifier":"16994517627961227630","products":[{"identifier":"590009373","quantity":1}]}],"exclude_bags_next_state":"cancelled_seller"}]}
Response Body:
{"statuses": [{"shipments": [{"status": 200, "final_state": {"cancelled_seller": "cancelled_seller", "shipment_id": "16994517627961227630", "bag_confirmed": "bag_confirmed"}, "identifier": "16994517627961227630"}]}]}```
The Request body you are passing to the “updateShipmentStatus” FDK method seems correct and the core OMS has received the partial seller cancellation update. But, due to a bug in a status config, a new shipment is not getting created for the canceled items when you pass the exclude_bags_next_state as “cancelled_seller”.
The partial cancellation works fine if you pass the “bag_not_confirmed” state in the field - “exclude_bags_next_state”. The cancellation is also getting updated at OMS (i.e. “cancelled_fynd”) and is visible on the front-end panel.
We have raised a bug internally to resolve the shipment split issue on the “cancelled_seller” state and will update you further on this.
The issue is resolved. Will use “cancelled_fynd” instead of “cancelled_seller”.