> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify: Adjust Inventory

Adjust inventory quantities for an item at a specific location in your Shopify store. Supports increasing or decreasing stock with tracked reasons. Ideal for: inventory sync, stock corrections, receiving shipments, cycle counts. Required scope: write_inventory.

![Shopify: Adjust Inventory logo](https://ai-icon.b3.fun/logo/shopify)
Catalog action Integrations shopify

Adjust inventory quantities for an item at a specific location in your Shopify store. Supports increasing or decreasing stock with tracked reasons. Ideal for: inventory sync, stock corrections, receiving shipments, cycle counts. Required scope: write_inventory.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `shopify-adjust-inventory` |
| Category | Integrations |
| Connector | `shopify` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `shopify`, `ecommerce`, `inventory`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `inventoryItemId` | `string` | Yes | Inventory item GID \(e.g., gid://shopify/InventoryItem/123\) |
| `locationId` | `string` | Yes | Location GID where inventory is being adjusted \(e.g., gid://shopify/Location/123\) |
| `delta` | `number` | Yes | Amount to adjust inventory by \(positive to increase, negative to decrease\) |
| `reason` | `string` | No | Reason for the inventory adjustment |
| `name` | `string` | No | Inventory state name \(default: available\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | `boolean` | Yes | Whether the inventory was adjusted successfully |
| `data` | `object` | No | Inventory adjustment result data |
| `exports` | `object` | No | Exported values from the action |

## Examples

**Workflow node**

```json
{
  "type": "shopify-adjust-inventory",
  "payload": {
    "inventoryItemId": "example-inventoryItemId",
    "locationId": "example-locationId",
    "delta": 1
  },
  "children": [],
  "connector": {
    "type": "shopify",
    "id": "conn_shopify"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/shopify-adjust-inventory/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "inventoryItemId": "example-inventoryItemId",
    "locationId": "example-locationId",
    "delta": 1
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.