Lot Tracking - Querying Allocation Pre-Shipping & Shipped Quantity

Hi Team,

Is there a way to query which lot numbers have been allocated to an order pre-shipping?

Additionally, after the shipping is completed, I can see shipped_line_item_lots, however in the schema for this it doesn’t give me the quantity pick per lot, how would I surface this information?

query {
  order {
    request_id
    complexity
    data {
                id
                legacy_id
                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
                                }
              }
            }
          }

    }
  }
}

Further update to this… we have an order that has quantity of 3 on a line item, of which 2 items have one lot and the 3rd has another.

We need to know how many of the lot have been assigned to the order.

Output of a live query below…

{
  "page_of_records": [
    {
      "record": {
        "order": {
          "request_id": "675335e1cbd03a3963e8eaff",
          "complexity": 12,
          "data": {
            "id": "T3JkZXI6NTQ4NzE2NDk1",
            "legacy_id": 548716495,
            "order_number": "SO0168506",
            "partner_order_id": "SO0168506",
            "shop_name": "******",
            "fulfillment_status": "fulfilled",
            "ready_to_ship": false,
            "line_items": {
              "edges": [
                {
                  "node": {
                    "id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                    "sku": "******",
                    "partner_line_item_id": "2024120639327721",
                    "quantity": 3,
                    "product_name": "********",
                    "fulfillment_status": "fulfilled",
                    "quantity_shipped": 3,
                    "quantity_pending_fulfillment": 0,
                    "quantity_allocated": 0,
                    "backorder_quantity": 0,
                    "shipped_line_item_lots": [
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                        "lot_id": "TG90OjM2NTMyMA==",
                        "lot_name": "A-M23758/21305",
                        "lot_expiration_date": "2025-01-01"
                      },
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mg==",
                        "lot_id": "TG90OjM2NTMyMQ==",
                        "lot_name": "M23758/21302",
                        "lot_expiration_date": "2025-01-31"
                      }
                    ]
                  }
                },
                {
                  "node": {
                    "id": "TGluZUl0ZW06MTM1NDY2MDY4Mw==",
                    "sku": "*****",
                    "partner_line_item_id": "2024120639327722",
                    "quantity": 2,
                    "product_name": "*****",
                    "fulfillment_status": "fulfilled",
                    "quantity_shipped": 2,
                    "quantity_pending_fulfillment": 0,
                    "quantity_allocated": 0,
                    "backorder_quantity": 0,
                    "shipped_line_item_lots": [
                      {
                        "line_item_id": "TGluZUl0ZW06MTM1NDY2MDY4Mw==",
                        "lot_id": "TG90OjM2NTMyOA==",
                        "lot_name": "B-M22850/21202",
                        "lot_expiration_date": "2025-01-31"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]
}

Hey @dhalawi

Wanted to let you know I started reviewing you questions. I will let you know as soon as I make progress.

Have a nice day!

Hello @dhalawi!

At the moment, our API and webhook do not show that breakdown. I will forward this as feedback to our product team for further review.

Have a nice day!