Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

fulfillment order is not created automatically for orders.

Solved

fulfillment order is not created automatically for orders.

shivam256
Shopify Partner
3 0 3

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
Accepted Solution (1)

umairakram
Shopify Partner
17 1 6

This is an accepted solution.

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

View solution in original post

Replies 16 (16)

laurenwest
Visitor
2 0 1

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

 
shivam256
Shopify Partner
3 0 3

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

masterperoo
Shopify Partner
4 0 1

@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?
shivam256
Shopify Partner
3 0 3

but I getting that fulfillment orders after setting that.

masterperoo
Shopify Partner
4 0 1
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
laurenwest
Visitor
2 0 1

@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.

 
 

Thomas_Lang1
Shopify Partner
237 6 56

Make sure you have this permission:

Thomas_Lang1_0-1664018145136.png

 

I had the same issue, always getting an empty fulfillment_order

 

Software Developer | Owner of Tom IT - We build shopify apps
Marketplace Order Connector | Amazon bol.com & Walmart DSV
Order Related Documents | Print documents, Email document &Autoprint
Blog Product Spotlight | Add products to your blog articles!

rigelstpierre
Shopify Partner
2 0 12

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.

rigelstpierre
Shopify Partner
2 0 12

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.

LukeRotherfield
Shopify Partner
6 0 2

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

Toledo_Goldfish
Visitor
1 0 2

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

914chu
Shopify Partner
1 0 0

nice, you save me

Inzamam94
Shopify Partner
1 0 2

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

Simmy2
Shopify Partner
1 0 1

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

ShopifyDevSup
Shopify Staff
1453 238 519

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
 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

umairakram
Shopify Partner
17 1 6

This is an accepted solution.

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