Fulfillment order is not created automatically for orders

for this api call

https://{shopurl}/admin/api/2022-07/orders/{order_id}/fulfillment_orders.json

I am getting response :

{
“fulfillment_orders”:
}

but I need fulfillment_order_id to create fulfillment for the order
so is there any way to get this fulfillment_order_id

although in the docs it is written that
“The FulfillmentOrder resource represents either an item or a group of items in an order that are to be fulfilled from the same location. There can be more than one fulfillment order for an order at a given location. Fulfillment orders are created automatically when an order is created. You can retrieve a fulfillment order ID with an order_id using the FulfillmentOrder GET endpoint.”

But its not happening Fulfillment orders are created automatically when an order is created. what is going wrong ? pls suggest me some solution

Note: I have read all the docs for fulfillment but won’t found any solution

3 Likes

I’m also having this issue, haven’t been able to find a solution for how to create a fulfillment order.

1 Like

I have resolved the issue basically in the store in which you have installed the app go to settings section and then in settings go to checkout section scroll bottom u will find automatically fulfillment then select that and save it.

It will be fixed then

@Shivm -

that’s not the setting. This makes everything fulfilled automatically; and marked as such on order list…

I have two shops - test and prod; with the same setting on

'Don’t fulfill any of the order’s line items automatically"

on this

https://{shopurl}/admin/api/2022-07/orders/{order_id}/fulfillment_orders.json

I am getting response :

{
“fulfillment_orders”:
}
on another - (dev) correct orders. So I would bump up your initial question - this is rather painful.
And I am sure I am doing it right - because it works on dev instance
Laurenwest - any luck?

but I getting that fulfillment orders after setting that.

@masterperoo

I ended up just switching to API version 2022-04.

With this, you’re able to create a fulfillment for with the order id and don’t have to reference a fulfillment order that doesn’t yet exist.

Not the ideal solution but it was the only way I could find for it to work the way I needed.

Yes but yor orders are already fulfilled. Shipped or not.
Fulfilment orders are also fulfilled.

If you want just id numbers - maybe that works for you

While - we wanted open fulfilment orders so that we could manage them do
processing and mark fulfilled via API using a call.

So - in my case - it was permissions.
I can have the full array that way

So you may not need

Make sure you have this permission:

I had the same issue, always getting an empty fulfillment_order

I have these permissions enabled on my app but it’s not returning the fulfillment_order object. We had this working fine on our dev store but doesn’t seem to be working on the production store.

1 Like

Following up to this for others with this issue. We were using a Custom app and needed to add:

write_merchant_managed_fulfillment_orders read_merchant_managed_fulfillment_orders

To have these returned.

11 Likes

Adding those additional merchant_managed permissions, as mentioned by Rigelstpierre, resolved the issue for me

2 Likes

I just spent an entire day trying to figure this out and your post @rigelstpierre was exactly what I needed! Thank you!!

2 Likes

Answer by @rigelstpierre was the correct one and it resolved my issue. I updated my scopes, reinstalled the application and when I created new orders, fulfillment order resource was created automatically.

Shopify needs to update their documentation and add these scopes there so people don’t face these issues again

2 Likes

@Inzamam94 Can you explain a bit more the way you updated the scopes? Thank you.

1 Like

Hey @Simmy2 - I can help here. One of the ways that updating your app scopes can be done by making a request to the merchant’s store via the authorization grant screen. We have some documentation on this here. The implementation of that redirect request is up to you, but it can be as simple as sending that URL to the merchant and having them approve the updated scopes.

If you’re using one of our libraries to build your app, it’s a bit easier. There’s an overview here that goes over how to do this with our Node.js library. If you’ve set up your app using the Shopify CLI, the process is even easier. In the template code that’s generated when you run an app creation flow, the CLI will generate a .toml file called “shopify.app.toml”, which contains a space where you can easily modify auth scopes. If your app is already installed on a merchant’s store, the built-in OAuth process that is also part of our CLI-generated app template will request updated scopes from any store where the app is installed, provided you have authenticated access to the shops.

Hope this helps - let us know if we can clarify anything on our end.

Al | Shopify Developer Support

nice, you save me

I had the same issue. I do some reading in Shopify documentation and add the following permission to my app and it’s started working for me.

read_merchant_managed_fulfillment_orders,write_merchant_managed_fulfillment_orders,read_third_party_fulfillment_orders,write_third_party_fulfillment_orders,read_assigned_fulfillment_orders,write_assigned_fulfillment_orders

6 Likes