How to divide line items of order into multiple chunks with unfulfilled status

Mubashir3
New Member
2 0 0

I'm trying to create different bunches of the line items that are in the order via API, but i don't want to mark them fulfilled as of yet. That, i want to do manually. Right now i'm creating fulfilments with status=open, it divides the line items but it shows fulfilled on the orders screen. There should be different sets of products but with the unfulfilled status.

0 Likes
syf_
Shopify Staff
Shopify Staff
84 19 14

Hi @Mubashir3,

I believe to achieve what you're looking to do, you'd need to pass "fulfillment_status": null. See REST sample below

 

{
  "order": {
    "email": "foo@example.com",
    "fulfillment_status": null,
    "line_items": [
      {
        "variant_id": ###,
        "quantity": 1
      },
      {
        "variant_id": ###,
        "quantity": 1
      }
    ]
  }
}

 

Hopefully this is what you're looking to do. If you need any clarifications or have additional questions around this issue, do let me know.

Best,
Seth

 

syf_ | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
Mubashir3
New Member
2 0 0

Yeah but this won't divide the line_items into multiple chunks, they would all be listed in the same box and will be marked as unfulfilled. Remind you that i'm not working with the order object here, i am using create Fulfilment API and giving it the status open. This is to provide the administrator a representation of what line_items he/she needs to fulfil in what boxes for this order. I need to list the line_items separately like when the fulfilment is created but i don't want to mark them as fulfilled just yet. Is there any status of fulfilment that i can play with? I have tried pending, open and others too but nothing worked, with each of the statuses on the admin order screen it showed every fulfilment as fulfilled and with a tick mark. I hope you understand my query now.

0 Likes
syf_
Shopify Staff
Shopify Staff
84 19 14

I believe the image below is the behaviour you're referring to. The reason you see this is because all order items are grouped by location (FulfillmentOrders). For this scenario, clicking "Mark as fulfilled" takes you to another page where you can indicate what items to fulfill.21-02-abrmu-y4ksi21-02-7k7l5-2chew

The behaviour you want would only be seen if order items are being fulfilled from multiple locations as shown in the image below.21-02-wq6wu-yj3xb

Also, just to clarify, creating a fulfillment actually means you've fulfilled the order item. The status field is for use by Fulfillment Services to indicate where they are in the process of fulfilling the order item. If your fulfilment_service field is set to manual, you wouldn't be able to set the status on the order. See this help doc for details on fulfillments.

I hope this clarifies the behaviour of the Admin. If you have any more questions about this, do let me know.

Best,
Seth.

syf_ | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes