> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/types/pickingorderitem.md).

# PickingOrderItem

PickingOrderItem Type

Represents an individual item within a picking order, specifying the product to be picked and the quantity required. PickingOrderItem is a line item that belongs to a PickingOrder and contains the details needed for warehouse picking operations.

## Fields

| Field          | Type            | Description                                       |
| -------------- | --------------- | ------------------------------------------------- |
| `id`           | `ID!`           | Unique identifier of the picking order item       |
| `tenantID`     | `UUID!`         | Tenant identifier                                 |
| `dataTypeID`   | `UUID`          | DataType identifier for schema validation         |
| `dataTypeSlug` | `String`        | DataType slug for easier reference                |
| `data`         | `Map`           | Custom metadata stored as JSON                    |
| `createdAt`    | `Time!`         | Creation timestamp                                |
| `createdBy`    | `UUID!`         | User identifier who created the item              |
| `updatedAt`    | `Time`          | Last update timestamp                             |
| `updatedBy`    | `UUID`          | User identifier who last updated the item         |
| `deletedAt`    | `Time`          | Deletion timestamp                                |
| `deletedBy`    | `UUID`          | User identifier who deleted the item              |
| `sku`          | `String!`       | Stock Keeping Unit identifier of the item to pick |
| `orderID`      | `ID!`           | Reference to the parent PickingOrder              |
| `quantity`     | `Int!`          | Quantity of the item to be picked                 |
| `order`        | `PickingOrder!` | The parent picking order                          |

## Interfaces

* `Node`

## Usage Example

```graphql
query {
  pickingOrderItems(first: 10) {
    edges {
      node {
        id
        sku
        quantity
        orderID
        order {
          id
          status
          customerID
        }
        data
        createdAt
        updatedAt
      }
    }
  }
}
```

## Query by Order

```graphql
query {
  pickingOrderItems(
    where: {
      orderID: "order-uuid-here"
    }
  ) {
    edges {
      node {
        id
        sku
        quantity
        data
      }
    }
  }
}
```

## Mutation Examples

### Create a PickingOrderItem

```graphql
mutation {
  createPickingOrderItem(input: {
    sku: "PROD-001"
    orderID: "order-uuid-here"
    quantity: 5
    dataTypeSlug: "order_item"
    data: {
      location_hint: "A1-B2-C3"
      special_instructions: "Handle with care"
      priority: "high"
    }
  }) {
    pickingOrderItem {
      id
      sku
      quantity
      order {
        id
        status
      }
    }
    workflows {
      id
      status
    }
  }
}
```

### Update a PickingOrderItem

```graphql
mutation {
  updatePickingOrderItem(
    id: "item-uuid-here"
    input: {
      quantity: 3
      data: {
        picked_quantity: 3
        picker_notes: "Last 2 units damaged"
        pick_location: "A1-B2-C3"
      }
    }
  ) {
    pickingOrderItem {
      id
      sku
      quantity
      data
    }
    workflows {
      id
      status
    }
  }
}
```

### Delete a PickingOrderItem

```graphql
mutation {
  deletePickingOrderItem(id: "item-uuid-here") {
    deletedID
    workflows {
      id
      status
    }
  }
}
```

## Relations

* **PickingOrderItem** `N:1` **PickingOrder**: Multiple items belong to a single picking order
* **PickingOrderItem** `N:1` **DataType**: Items can reference a DataType for schema validation
* **PickingOrderItem** references **InventoryItem** via SKU: Items are picked based on SKU matching

## Federation Key

PickingOrderItem is federated by the `sku` field, allowing it to be resolved across different services in the GraphQL federation.

## Common Use Cases

* **Order Fulfillment**: Breaking down customer orders into pickable line items
* **Wave Picking**: Organizing items for batch picking operations
* **Pick List Generation**: Creating picking instructions for warehouse workers
* **Inventory Allocation**: Reserving specific quantities for order fulfillment
* **Pick Performance Tracking**: Monitoring picking efficiency by item and SKU

## Pick Status Tracking

Use the `data` field to track picking progress:

```json
{
  "status": "pending|picking|picked|short|damaged",
  "picked_quantity": 3,
  "picker_id": "user-123",
  "pick_time": "2024-01-15T10:30:00Z",
  "location_picked": "A1-B2-C3",
  "notes": "Found alternative location"
}
```

## Best Practices

* Always validate SKU availability before creating picking order items
* Use the `data` field to store pick-specific instructions and metadata
* Monitor picking workflows to track completion status
* Consider implementing quantity validation to prevent over-picking
* Link items to inventory locations for efficient pick routing


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/types/pickingorderitem.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
