Updating line-item fulfillment_status from fulfilled to null or unfulfilled

OrderCup1
Excursionist
19 0 5

Hi Guys,

I need to update the line-item fulfillment status to null or unfulfilled for items I had already fulfilled using the 'Create a new fulfillment' call and have set the fulfillment_status to 'fulfilled'. It is common in shipping to void a fulfillment for some reasons and create a new one. I can modify the fulfillment and update tracking number to something like 'Voided' but the line-item status still remains as fulfilled. Tried the following options to mark line-items as unfulfilled but no success:

1. Tried to 'Cancel' fulfillment (which is for 'pending fulfillments') with empty data but got the error: Status cannot transition via "cancel"

2. Tried to update line-items fulfillment_status in fulfillment to null by passing the 'line-items' attributes in update fulfillment call. Does not give error, but does not mark items as unfulfilled either.

3. Tried to update line-items fulfillment_status in Order to null by passing the 'line-items' attributes in update order call. Does not give error, but does not mark items as unfulfilled either.

Can you please tell how can the line-items fulfillment status be set back to null or unfulfilled. Or is there a way to delete / cancel fulfillment so that the line-items fulfillment status is reset to null?

I would really appreciate any help or advice.

Regards,
Aloke

Replies 15 (15)
Kevin_Hughes
Shopify Staff (Retired)
130 0 19

Did you try making a delete request on the fulfillment object? would that get you what you need?

OrderCup1
Excursionist
19 0 5

Potentially. But I do not see a Delete Fulfillment request in the API docs, only a Cancel Fulfillment.  I think Delete Fulfillment would do exactly what we are looking for assuming the deleting the fulfillment resets the status of all associated line items to 'Null' or 'Unfulfilled'. Can you send us a link to the documentation for Delete Fulfillment.

Thanks.

Kevin_Hughes
Shopify Staff (Retired)
130 0 19

oh shoot you are right that isn't part of the API, my mistake sorry.

I was just thinking about this again - from our side fulfilled more or less means it has been shipped - would you still cancel or void fulfillments in that state? Maybe you should leave the fulfillment in pending state on Shopify until it really is fulfilled and cannot ever be cancelled. Does that make sense?

OrderCup1
Excursionist
19 0 5

Kevin, Yes, there is still a need to void fulfillments that were created as part of the shipping process for a variety of reasons - the label had an error, did not print, wrong service selected, fraud, etc. You cannot leave the fulfillment in a pending state, since there is no user action or external trigger that indicates that the fulfillment cannot be cancelled any more. So we really need the delete fulfillment capability as described earlier that would also reset the associated line item(s) fulfillment status.

Thanks.

 

 

Kevin_Hughes
Shopify Staff (Retired)
130 0 19

Okay I will pass this along and create an issue!

OrderCup1
Excursionist
19 0 5

Hi Kevin,

Is there any update on this? Do you have any idea about the time frame for implementing this?
Meanwhile can you tell us if there is any alternative way/workaround to handle this other than leaving fulfillment pending?

Regards,
Aloke

 

Kevin_Hughes
Shopify Staff (Retired)
130 0 19

I created an issue but I don't have a timeline for when it might get done. Hmm you might be able to cancel and re-create the entire order that might be more the behaviour that you want.

OrderCup1
Excursionist
19 0 5

Hi Kevin,

This is sorely needed capability! You can't really cancel and recreate the order for many reasons, including preserving the integrity of the order. Which is why I suspect you do not allow it too. What we really need is the ability to 'delete the fulfillment and reset the associated line item(s) fulfillment status'.

In the absence of this, can you ask you API team how you would achieve this.

Thanks,
Aloke

Kevin_Hughes
Shopify Staff (Retired)
130 0 19

Its more than just an API issue - fulfillments that are fulfilled can't even be cancelled via the admin interface right now. I've passed it along but I can't give you a timeline when we will implement this feature. Sorry for the inconvenience!