Cannot opt-in fulfillment service because it has pending work

waltzofpearls
New Member
2 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.

0 Likes
Jeff-Blake
Shopify Partner
33 0 3

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.

0 Likes
waltzofpearls
New Member
2 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.

0 Likes
keiraarts
Shopify Partner
16 3 3

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.

0 Likes