Updating build kit line items on orders

Hi,

We are starting to explore ShipHero’s kits features. We want to offer products for sale on our e-commerce store that are ‘kits’ of other products we sell.

In testing, when we create an order via the API with a build kit in it, things work fine on the initial order creation, but we cannot seem to update those line items later.

Specifically, if we try to add additional quantities of the same build kit, those line items become “backordered” despite sufficient stock being available.

An example order id in our account is: 259489577. Here we created the order with 2 x TEST00002 and then later updated that line item to have a quantity of 3. TEST00002 is a build kit containing two SKUs. Order creation worked fine, and line items for component SKUs appeared on the order after allocation, with appropriate quantities. After the update, those line items remain, but are not updated to the new quantities, while the line item for the kit itself shows as having 6 units on back-order.

We’re using the order_update_line_items endpoint to make this update, with the following request data:

{
  "order_id": "T3JkZXI6MjU5NDg5NTc3",
  "line_items": [
    {
      "id": "TGluZUl0ZW06Njc4NDEyODYw",
      "price": "50.00",
      "quantity": 3,
      "fulfillment_status": "pending",
      "partner_line_item_id": "item_TEST00002_delivery_91502",
      "quantity_pending_fulfillment": 3
    }
  ]
}

This is identical to how we have been updating normal line items for ~6 months now without problems.

Is this a known issue with updating kits, can we modify our request in any way to make it work?

Many thanks,

Steve

Hello @steveday!

To get the expected behavior when updating quantities on build kits please try the following.

Context: I created an order with a build kit that contains one of each 3 components. I wanted to ship 3 of those build kits so I updated the quantity ordered of the build kit to 3, but not the pending fulfillment. What i also did was update each component’s line item to the corresponding quantity and quantity pending fulfillment, based on how the kit is composed, in this case, 3 of each.

mutation{
  order_update_line_items(data:{
    order_id:"T3JkZXI6MjU5ODEyMTU2"
    line_items:[{
      id:"TGluZUl0ZW06Njc5MDg5Mjg1"
      quantity:3      
    },{
      id:"TGluZUl0ZW06Njc5MDg5Mzk2"
      quantity:3
      quantity_pending_fulfillment:3         
    },{
      id:"TGluZUl0ZW06Njc5MDg5Mzk3"
      quantity:3
      quantity_pending_fulfillment:3        
    },{
      id:"TGluZUl0ZW06Njc5MDg5Mzk4"
      quantity:3
      quantity_pending_fulfillment:3         
    }]    
  }){
    request_id
    complexity
    order{
      line_items{
        edges{
          node{
            sku
            quantity
            quantity_pending_fulfillment
            backorder_quantity
          }
        }
      }
    }
  }
}

Please let me know if this does not work for you.

Have a great day,
TomasFD