fulfillment - lineitems - properties

danielblank
New Member
2 0 0

hi 

For a customer I need to implement batch tracking on fulfillment of orders. 

so when an order is sent to the 3rd party logistics they sent out the articles but the articles can come from a specific production batch. 

in order to do this I would like to update the Fulfillment: line-items : properties field and include  Batch and quantity in there. 

but when i call the api it doesn't seem to be saving the properties field. 

any comments?  

0 Likes
L_J_K
Shopify Staff
Shopify Staff
139 15 23

Hey @danielblank 

I've been testing this out this afternoon. Indeed, the expected is that the properties array would be ignored if tried to be updated post order. Of course when order is created, the line items properties can naturally be set. This would be why they are not 'read only' in the docs right now.

That said, that's a great call out - this point above isn't mentioned in the documentation, and it would help partners immensely to include it. I'll put that in motion.

By way of a different solutions, you may want to try the Fulfillmentevent endpoint(docs). You'd be able to set a value for the  "message" which could be any string you desire.

Lastly for only unfulfilled line items it's possible to make use of the Order Edit GraphQL API - further documentation is here. I hope that at least explains some more. Thank you.

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
danielblank
New Member
2 0 0

hi L_J_K

Thanks for the feedback. Should I assume then that the line-items on fulfulliment are actually order line-items and not separate records?  That is also not clear. when you look at the structure within Shopify it looks as if there are seperate line-items. 

if you look at the order information in JSON you see 

order {

         order level items like id, email m note etc etc 

         line-items {

                           order.line-items  fields like id, varian_id title sku quantity

                          }

          fulfillments {

                           fulfillment fields like id, orderid, status, shipment_status, tracking_company 

                           Line-items {

                                            "id": ,
                                            "variant_id": ,
                                           "title": "product title",
                                            "quantity": 1,
                                            "sku": "123456789",
                                             "variant_title": "30 ml",
                                            "vendor": "brandX",
                                            "fulfillment_service": "manual",
                                             "product_id": 2198535274558,
                                            "requires_shipping": true,
                                             "taxable": true,
                                             "gift_card": false,
                                             "name": "articleName",
                                             "variant_inventory_management": "shopify",
                                             "properties": [],
                                             "product_exists": true,
                                              /// etc etc 

                                              }

                         }

}

 

I would expect that a fulfillment api would be able to manage the properties of the fulfillment as these line-items are specifically for the fulfillment and seperated from the order line-items.

 

Daniel 

0 Likes
L_J_K
Shopify Staff
Shopify Staff
139 15 23

Hey @danielblank, apologies for the late reply here, I was away.

Yes, so the Fulfillment Resource is used to Manage the Fulfillment of an order's line items, Fulfillment representing a shipment of one or more items in an order.  Conceptually, a good reference point would be the relationship shown here for the Fulfillment object, which shows it's relationship with the Or... - the Fulfillment Order object by definition being a group of one or more items to be fulfilled from the same location.

Hope that helps clarify, but please do let me know if you have any questions - thanks!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
0 Likes