If I use the order_update_line_items to update line item fulfillment_status do I still need to update the order's fulfillment status as well?

I am following this guide here: Order Fulfillment – Developer Resources | ShipHero

However, I am managing multi-location shipments and am currently creating shipments per item and updating the line item fulfillment status via order_update_line_items

My question is: if the last remaining line_item is marked as “fulfilled”, do I still need to mark the entire order as fulfilled or will Shiphero complete the order automatically?

Hello @petergzli,

The order should automatically set itself as fulfilled if nothing is left to fulfill. If this is not happening, feel free to share an example so we can investigate.

Have a great day!

Hi @tomasfd thanks for the response. It’s very strange I marked all the line items as fulfilled but the main order itself isn’t yet marked as fulfilled, they’ll all marked as “pending”. In addition, Shiphero is still showing all the line items as allocated even though the fulfillment_status shows “fulfilled”.

Here’s an example order id T3JkZXI6NTA0NjkyMDcy let me know if you have an idea what’s going on!

EDIT:
I’m going to update all the order statuses explicitly with order_update_fulfillment_status since it’s still not marking the orders as fulfilled by itself.

Hi @petergzli!

Next time can you try also setting the quantity_pending_fulfillment to 0 for each line item as well? That should make it work.

Hi @tomasfd thanks for the quick reply.

So in the mutation:
mutation updateLineItemWarehouse($data: UpdateLineItemsInput!) {
order_update_line_items(data: $data) {
request_id
complexity
order {
id
}
}
}

I would do something like:

{
“data”: {
“order_id”: “T3JkZXI6NTA0ODgyNTk5”,
“line_items”: [
{
“id”: “TGluZUl0ZW06MTI0NjQ2MjIxOQ==”,
“fulfillment_status”: “pending”,
“quantity_pending_fulfillment”: 0
}
] }
}

Correct! I will put a request to update the documentation to reflect this.

1 Like

Thanks @tomasfd I’m going to try this out tomorrow. I’m going to remove my other code to mark the entire order as fulfilled!

1 Like

Hey @tomasfd just letting you know that worked and Shiphero marked itself as “fulfilled” as I expected.

1 Like