# Update Item — QuickBooks

> Updates an item. See the documentation

- Key: `quickbooks-update-item`
- Type: Action (Write)
- Version: 0.0.8
- App: QuickBooks (`quickbooks`) — https://pipedream.com/apps/quickbooks.md
- This page (HTML): https://pipedream.com/apps/quickbooks/actions/update-item
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/actions/update-item/update-item.mjs

## Description

Updates an item. [See the documentation](https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/item#full-update-an-item)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `itemId` | `string` | Yes | The identifier of an item Options are loaded from the connected account. |
| `name` | `string` | Yes | Name of the item. This value must be unique. |
| `trackQtyOnHand` | `boolean` | No | True if there is quantity on hand to be tracked. Once this value is true, it cannot be updated to false. Applicable for items of type Inventory. Not applicable for Service or NonInventory item types. |
| `qtyOnHand` | `string` | No | Current quantity of the Inventory items available for sale. Not used for Service or NonInventory type items. Required for Inventory type items. |
| `incomeAccountRefValue` | `string` | No | Reference to the posting account, that is, the account that records the proceeds from the sale of this item. Must be an account with account type of Sales of Product Income. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id from that object for IncomeAccountRef.value. See specifications for the IncomeAccountRef parameters in the Create an item page. Options are loaded from the connected account. |
| `type` | `string` | No | Classification that specifies the use of this item. See the description at the top of the Item entity page for details about supported item types. See specifications for the type parameter in the Create an item page. |
| `assetAccountRefValue` | `string` | No | Required for Inventory item types. Reference to the Inventory Asset account that tracks the current value of the inventory. If the same account is used for all inventory items, the current balance of this account will represent the current total value of the inventory. Must be an account with account type of Other Current Asset. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id from that object for AssetAccountRef.value. Options are loaded from the connected account. |
| `invStartDate` | `string` | No | Date of opening balance for the inventory transaction. Required when creating an Item.Type=Inventory. Required for Inventory item types. |
| `expenseAccountRefValue` | `string` | No | Reference to the expense account used to pay the vendor for this item. Must be an account with account type of Cost of Goods Sold. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id from that object for ExpenseAccountRef.value. See specifications for the ExpenseAccountRef parameters in the Create an item page. Options are loaded from the connected account. |
| `sku` | `string` | No | The stock keeping unit (SKU) for this Item. This is a company-defined identifier for an item or product used in tracking inventory. |
| `salesTaxIncluded` | `boolean` | No | True if the sales tax is included in the item amount, and therefore is not calculated for the transaction. |
| `salesTaxCodeRefValue` | `string` | No | ID of the referenced sales tax code for the Sales item. Applicable to Service and Sales item types only. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id from that object for SalesTaxCodeRef.value. Options are loaded from the connected account. |
| `purchaseTaxIncluded` | `boolean` | No | True if the purchase tax is included in the item amount, and therefore is not calculated for the transaction. |
| `description` | `string` | No | Description of the item. |
| `abatementRate` | `string` | No | Sales tax abatement rate for India locales. |
| `reverseChargeRate` | `string` | No | Sales tax reverse charge rate for India locales. |
| `subItem` | `boolean` | No | If true, this is a sub item. If false or null, this is a top-level item. Creating inventory hierarchies with traditional inventory items is being phased out in lieu of using categories and sub categories. |
| `taxable` | `boolean` | No | If true, transactions for this item are taxable. Applicable to US companies, only. |
| `UqcDisplayText` | `string` | No | Text to be displayed on customer's invoice to denote the Unit of Measure (instead of the standard code). |
| `reorderPoint` | `string` | No | The minimum quantity of a particular inventory item that you need to restock at any given time. The ReorderPoint value cannot be set to null for sparse updates(sparse=true). It can be set to null only for full updates. |
| `purchaseDesc` | `string` | No | Purchase description for the item. |
| `prefVendorRefValue` | `string` | No | Pref vendor ref value Options are loaded from the connected account. |
| `active` | `boolean` | No | If true, the object is currently enabled for use by QuickBooks. |
| `UqcId` | `string` | No | ID of Standard Unit of Measure (UQC:Unique Quantity Code) of the item according to GST rule. |
| `purchaseTaxCodeRefValue` | `string` | No | The ID for the referenced purchase tax code object as found in the Id field of the object payload. Reference to the purchase tax code for the item. Applicable to Service, Other Charge, and Product (Non-Inventory) item types. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id from that object for PurchaseTaxCodeRef.value. Options are loaded from the connected account. |
| `serviceType` | `string` | No | Sales tax service type for India locales. |
| `purchaseCost` | `string` | No | Amount paid when buying or ordering the item, as expressed in the home currency. |
| `unitPrice` | `string` | No | Corresponds to the Price/Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item. If used for unit price, the monetary value of the service or product, as expressed in the home currency. If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax |
| `taxClassificationRefValue` | `string` | No | The ID for the referenced Tax classification object as found in the Id field of the object payload. Tax classification segregates different items into different classifications and the tax classification is one of the key parameters to determine appropriate tax on transactions involving items. Tax classifications are sourced by either tax governing authorities as in India/Malaysia or externally like Exactor. 'Fuel', 'Garments' and 'Soft drinks' are a few examples of tax classification in layman terms. User can choose a specific tax classification for an item while creating it. A level 1 tax classification cannot be associated to an Item Options are loaded from the connected account. |
| `parentRefValue` | `string` | No | The ID for the referenced parent item object as found in the Id field of the object payload. The immediate parent of the sub item in the hierarchical Category:Sub-category list. If SubItem is true, then ParenRef is required. Query the Item name list resource to determine the appropriate object for this reference. Use Item.Id from that object for ParentRef.value. Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "quickbooks",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "quickbooks-update-item",
  arguments: {
    itemId: "Item ID",
    name: "Name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "quickbooks-update-item",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    quickbooks: { authProvisionId: "apn_xxxxxxx" },
    itemId: "Item ID",
    name: "Name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "quickbooks-update-item",
    "configured_props": {
      "quickbooks": { "authProvisionId": "apn_xxxxxxx" },
      "itemId": "Item ID",
      "name": "Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/quickbooks.md · All apps: https://pipedream.com/apps
