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

# Update Receiving Inbound

updateReceivingInbound Mutation

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

## Arguments

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

## Return Type

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

## Input Fields

`UpdateReceivingInboundInput`:

| Field                  | Type      | Description                                         |
| ---------------------- | --------- | --------------------------------------------------- |
| `dataTypeID`           | `UUID`    | Optional data type ID to associate with the inbound |
| `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 inbound             |
| `clearData`            | `Boolean` | Clear the existing custom data                      |
| `orderID`              | `String`  | Order or reference ID for the inbound shipment      |
| `clearOrderID`         | `Boolean` | Clear the existing order ID                         |
| `supplierID`           | `UUID`    | ID of the supplier this inbound is from             |
| `addInboundItemIDs`    | `[ID!]`   | IDs of inbound items to add to this inbound         |
| `removeInboundItemIDs` | `[ID!]`   | IDs of inbound items to remove from this inbound    |
| `clearInboundItems`    | `Boolean` | Clear all associated inbound items                  |

## Return Fields

`ReceivingInboundOutput`:

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

## Usage Example

```graphql
mutation {
  updateReceivingInbound(
    id: "inbound_123"
    input: {
      orderID: "PO-98765-UPDATED",
      supplierID: "550e8400-e29b-41d4-a716-446655440000",
      data: {
        "expected_arrival_date": "2023-06-20",
        "carrier": "Premium Logistics",
        "tracking_number": "TRK987654321",
        "notes": "Updated delivery instructions - dock 3",
        "priority": "high"
      },
      dataTypeSlug: "premium_inbound"
    }
  ) {
    receivingInbound {
      id
      orderID
      supplierID
      data
      dataTypeSlug
      updatedAt
      updatedBy
      inboundItems {
        id
        sku
        quantity
      }
    }
    workflows {
      id
      type
      id
      runID
      status
    }
  }
}
```

## JavaScript Example

```javascript
const UPDATE_RECEIVING_INBOUND = gql`
  mutation UpdateReceivingInbound($id: ID!, $input: UpdateReceivingInboundInput!) {
    updateReceivingInbound(id: $id, input: $input) {
      receivingInbound {
        id
        orderID
        supplierID
        data
        dataTypeSlug
        updatedAt
        updatedBy
        inboundItems {
          id
          sku
          quantity
        }
      }
      workflows {
        id
        type
        id
        runID
        status
      }
    }
  }
`;

const { data } = await client.mutate({
  mutation: UPDATE_RECEIVING_INBOUND,
  variables: {
    id: "inbound_123",
    input: {
      orderID: "PO-98765-UPDATED",
      supplierID: "550e8400-e29b-41d4-a716-446655440000",
      data: {
        expected_arrival_date: "2023-06-20",
        carrier: "Premium Logistics",
        tracking_number: "TRK987654321",
        notes: "Updated delivery instructions - dock 3",
        priority: "high"
      },
      dataTypeSlug: "premium_inbound"
    }
  }
});
```

## Important Notes

* Updating a receiving inbound may trigger related workflows for inventory management
* Use the clear flags to explicitly remove optional fields
* The `data` field supports flexible JSON structures for custom metadata
* Changes to inbound item associations are applied incrementally using add/remove operations
* The `supplierID` can be updated to transfer the inbound to a different supplier


---

# 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/updatereceivinginbound.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.
