Cannot opt-in fulfillment service because it has pending work

waltzofpearls
Tourist
3 0 0

I've been trying to get one of our development stores opt in for FulfillmentOrder API, but I kept getting an error "Cannot opt-in fulfillment service because it has pending work". I have marked all orders that are not cancelled as fulfilled, and I still got the same error.

 

I followed this tutorial https://shopify.dev/tutorials/manage-fulfillments-with-fulfillment-and-fulfillmentorder-resources#or... in Registration section, and posted to the REST API https://freddys-famous-footware.myshopify.com/admin/api/2020-01/fulfillment_services/51579748387.jso... with:

 

{
  "fulfillment_service": {
    "id": 51579748387,
    "fulfillment_orders_opt_in": true
  }
}

And I got:

{
    "errors": {
        "base": [
            "Cannot opt-in fulfillment service because it has pending work."
        ]
    }
}

As response from the REST API.

 

I also archived all the open orders and there are no active orders in that development store.

Replies 4 (4)

Jeff-Blake
Shopify Partner
43 0 9

Possibly there are orders older than 60 days and you don't have the long-term order permission?

 

I had the same problem, didn't have the permission. It was only for a few inactive merchants and my app is only for digital products, so I opted to simply delete and recreate the Fulfillment service.

waltzofpearls
Tourist
3 0 0

Hi @Jeff-Blake. Thanks for your reply.

 

I have access to all the orders since I have ownership of that development store. I tried reinstalling my development app, and recreating the fulfillment service. Unfortunately none of them worked. I wonder if there might be some orphan fulfillment records that are invisible from web UI or Admin API. In my development store, I have orders created from last year in May, June and July.

keiraarts
Shopify Partner
52 7 9

I just want to chime in --

Deleting a fulfillment service can be dangerous because the products will default to a different location. It's not the best way to clear out orders over 60 days old, I think doing it manually is the best way.

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca

deparagon
Shopify Partner
8 0 1

Did you find a solution to this?

 

PHP developer with many years of experience in web development industry.
Senior developer @ Taobao Dropshipping App