> 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/mutations/updatereceivinginbounditem.md).

# Update Receiving Inbound Item

updateReceivingInboundItem Mutation

Updates an existing ReceivingInboundItem object in the system with new data.

## Arguments

| Name    | Type                               | Description                                                   |
| ------- | ---------------------------------- | ------------------------------------------------------------- |
| `id`    | `ID!`                              | The unique identifier of the receiving inbound item to update |
| `input` | `UpdateReceivingInboundItemInput!` | Input data for updating the receiving inbound item            |

## Return Type

`ReceivingInboundItemOutput` - Contains the updated receiving inbound item and any associated workflows.

## Input Fields

`UpdateReceivingInboundItemInput`:

| Field               | Type      | Description                                               |
| ------------------- | --------- | --------------------------------------------------------- |
| `dataTypeID`        | `UUID`    | Optional data type ID to associate with the item          |
| `clearDataTypeID`   | `Boolean` | Clear the existing data type ID                           |
| `dataTypeSlug`      | `String`  | Optional data type slug                                   |
| `clearDataTypeSlug` | `Boolean` | Clear the existing data type slug                         |
| `data`              | `Map`     | Custom data associated with the item                      |
| `clearData`         | `Boolean` | Clear the existing custom data                            |
| `sku`               | `String`  | Stock keeping unit (SKU) - unique identifier for the item |
| `quantity`          | `Int`     | Quantity of the item expected to be received              |
| `inboundID`         | `ID`      | ID of the receiving inbound this item belongs to          |

## Return Fields

`ReceivingInboundItemOutput`:

| Field                  | Type                   | Description                                    |
| ---------------------- | ---------------------- | ---------------------------------------------- |
| `receivingInboundItem` | `ReceivingInboundItem` | The updated receiving inbound item             |
| `workflows`            | `[TemporalWorkflow]`   | Related workflow instances that were triggered |

## Usage Example

```graphql
mutation {
  updateReceivingInboundItem(
    id: "inbound_item_456"
    input: {
      sku: "UPDATED-ITEM-789",
      quantity: 75,
      data: {
        "batch_number": "BN-002",
        "expiry_date": "2025-12-31",
        "quality_grade": "A",
        "storage_requirements": ["temperature_controlled"],
        "notes": "Updated quantity based on supplier confirmation"
      },
      dataTypeSlug: "perishable_goods"
    }
  ) {
    receivingInboundItem {
      id
      sku
      quantity
      data
      dataTypeSlug
      updatedAt
      updatedBy
      inbound {
        id
        orderID
        supplierID
      }
    }
    workflows {
      id
      type
      id
      runID
      status
    }
  }
}
```

## JavaScript Example

```javascript
const UPDATE_RECEIVING_INBOUND_ITEM = gql`
  mutation UpdateReceivingInboundItem($id: ID!, $input: UpdateReceivingInboundItemInput!) {
    updateReceivingInboundItem(id: $id, input: $input) {
      receivingInboundItem {
        id
        sku
        quantity
        data
        dataTypeSlug
        updatedAt
        updatedBy
        inbound {
          id
          orderID
          supplierID
        }
      }
      workflows {
        id
        type
        id
        runID
        status
      }
    }
  }
`;

const { data } = await client.mutate({
  mutation: UPDATE_RECEIVING_INBOUND_ITEM,
  variables: {
    id: "inbound_item_456",
    input: {
      sku: "UPDATED-ITEM-789",
      quantity: 75,
      data: {
        batch_number: "BN-002",
        expiry_date: "2025-12-31",
        quality_grade: "A",
        storage_requirements: ["temperature_controlled"],
        notes: "Updated quantity based on supplier confirmation"
      },
      dataTypeSlug: "perishable_goods"
    }
  }
});
```

## Important Notes

* Updating a receiving inbound item may trigger related workflows for inventory management
* Use the clear flags to explicitly remove optional fields
* The `data` field supports flexible JSON structures for item-specific metadata
* Changes to the `quantity` field may affect stock calculations and workflows
* The `sku` should remain unique and consistent with the inventory system
* Moving an item to a different inbound can be done by updating the `inboundID`


---

# 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/mutations/updatereceivinginbounditem.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.
