Handling Kits and Lot numbers

Hi,
I’ve been trying to query orders in order to map the data and update it in our company’s systems.
I am mapping order status together with line items and their status, lot numbers and serial numbers.

For some line items that are configured as kits - I can get several lot numbers for a single line_item_id and I wasn’t able to find a way to distinguish which items from the kit belong to every lot.
Is there a way for us to work with that? Am I approaching this problem the wrong way?

Hello @RLaslau!

Would you mind sharing with me the workflow you do for pulling data with the calls and fields?

You can get to the lot from the line item, but there might be faster or cheaper ways credit-wise.

Have a great day!
TomasFD

Hi @tomasfd,
What I’m trying to do is to query ShipHero for order updates every 24 hours
Then I process the data and update the orders in our system (While also being connected to UPS webhooks for shipment updates)
This is the request that I’m sending:

{
    orders(updated_from: "2024-01-08", updated_to: "2024-01-09") {
        request_id
        complexity
        data(first: 10) {
            edges {
                node {
                    order_number
                    partner_order_id
                    shop_name
                    fulfillment_status
                    ready_to_ship
                    line_items {
                        edges {
                            node {
                                id
                                sku
                                partner_line_item_id
                                quantity
                                product_name
                                fulfillment_status
                                quantity_shipped
                                quantity_pending_fulfillment
                                quantity_allocated
                                backorder_quantity
                                shipped_line_item_lots {
                                    line_item_id
                                    lot_id
                                    lot_name
                                    lot_expiration_date
                                }
                                serial_numbers {
                                    id
                                    legacy_id
                                    line_item_id
                                    serial_number
                                    scanned
                                    created_at
                                    updated_at
                                }
                            }
                        }
                    }
                }
            }
            pageInfo {
                hasNextPage
                endCursor
            }
        }
    }
}

And my issue is with these sort of responses:

"node": {
  "sku": "SOMEKIT",
  "quantity": 1,
  "quantity_allocated": 0,
  "quantity_pending_fulfillment": 0,
  "backorder_quantity": 0,
  "shipped_line_item_lots": [
    {
      "line_item_id": "TGluZUl0ZW06MTA3MjczMjM0Mg==",
      "lot_name": "319 1B",
      "lot_expiration_date": null
    },
    {
      "line_item_id": "TGluZUl0ZW06MTA3MjczMjM0Mg==",
      "lot_name": "329 1f",
      "lot_expiration_date": null
    },
    {
      "line_item_id": "TGluZUl0ZW06MTA3MjczMjM0Mg==",
      "lot_name": "331 5G",
      "lot_expiration_date": null
    },
    {
      "line_item_id": "TGluZUl0ZW06MTA3MjczMjM0Mg==",
      "lot_name": "329 5A",
      "lot_expiration_date": null
    }
  ],
  "serial_numbers": [],
  "id": "TGluZUl0ZW06MTA3MjczMjM0Mg==",
  "partner_line_item_id": "19584.1",
  "fulfillment_status": "fulfilled"
}

As you can see, each item of the kit has the same line item id - but they don’t have the same lot name.
So in our systems I’m unable to know which item this is and update accordingly.

Hello @RLaslau

I now get what you mean. You cannot identify each lot to an SKU when the original SKU is a regular kit.

I’m opening an internal conversation to find the best way to make this information available.

I will keep you updated as this progresses.

Have a great day!
TomasFD

Thank you very much!

1 Like

Thank You Tomas.

~WRD2549.jpg