> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: incrementInventory(items: Array) # Method package: wixStoresBackend # Method menu location: wixStoresBackend --> incrementInventory # Method Link: https://dev.wix.com/docs/velo/apis/wix-stores-backend/increment-inventory.md # Method Description: Adds a set number of items from inventory. The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Increment the inventory of a product's first variant ```javascript /******************************* * Backend code - inventory.jsw * *******************************/ import wixStoresBackend from 'wix-stores-backend'; export function incrementInventory(incrementInfo) { return wixStoresBackend.incrementInventory(incrementInfo); } /************** * Page code * **************/ import { incrementInventory } from 'backend/inventory'; async function incrementHandler() { const productId = "3fb6a3c8-988b-8755-04bd-ks75ae0b18ea" let variants = await getProductVariants(productId); incrementInventory( [{ variantId: variants[0]._id, productId: productId, incrementBy: 1 }]) .then(() => { console.log("Inventory incremented successfully") }) .catch(error => { // Inventory increment failed console.error(error); }) } ``` ---