Update stock

ps_update_stock

Write · preview + approveCommerce · switch, until turned offTellMyShop Pro onlySaves: Commerce switch (until turned off)Visible right after install

Changes how many items you have in stock.

TellMyShop Free: No. This tool is only in TellMyShop Pro. TellMyShop Free has only ready reports that read your store.

Ask Claude

„We got 40 more of the black lamp ref:LMP-01. Add them to stock.”

Example preview

Product 45 Garden lamp Nova, combination Black: 12 -> 52 (+40). Out of stock: deny orders (unchanged). A stock movement will be recorded.

Technical details

Sets stock quantity (a new value, or delta = change by plus or minus N) and the out-of-stock behaviour (deny, allow, or default = shop setting), for up to 100 items per call. For a product with combinations give combination_id; without it the preview lists the combinations with IDs and stock. Saves like the back office: a stock movement with the connector's employee and the stock update hook, so modules that sync stock (marketplaces, ERP) see the change.

Parameters

NameTypeRequiredDescription
shop_idintegernoShop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info.
changesarray of objectyesOne item per product or combination. Max 100 items. Fields of each item: product (string, required): Product (id:123, ref:ABC-1, ean:..., product URL, ID, EAN or reference). Max 300 characters. combination_id (integer): Combination ID (required when changing the quantity of a product with combinations). quantity (integer): New quantity. Range 0 to 1,000,000. delta (integer): Change the quantity by plus or minus N (instead of quantity). Range -1,000,000 to 1,000,000. out_of_stock (enum: deny | allow | default): Out-of-stock behaviour.
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

Max 100 items per call. Advanced stock management (warehouses): not handled. Revertible with ps_revert_change.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Use cases with this tool

Last updated: 2026-10-11