OnPrintShop Inventory icon

OnPrintShop Inventory

Read and update product stock, product stock lists, and master-option stock

Product → Update Stock

AI-generated

Summary

Updates product inventory using one or more stock detail entries. Choose the input mode and an Add, Remove, or Set-style action carefully, since this operation writes inventory.

Inputs

  • Safe Mode — Defaults to false. For legacy actions, retains reduced-response behavior; the supplied source does not show how it affects this operation.
  • Stock Type — Optional stock scope: Product or Product Option. Choose Product Option when the stock ID belongs to an option combination.
  • Product SKU — Optional product SKU argument sent with the stock update.
  • Stock Details Input (required) — Choose Fields, JSON Object Array, or Legacy Scalar Fields. The legacy mode is retained for saved workflows.
  • Stock Details — In Fields mode, add one or more entries. Each has required Stock ID and Stock Change, an Action (Add, Remove, or Reset; defaults to Add), and optional Comment and Location.
  • Stock Details (JSON Object Array) (required) — In JSON mode, provide an array of objects. Each item requires stock_id, stock_change, and action; comment and location are optional.
  • Legacy Identifier Type (required) — In Legacy Scalar Fields mode, select Product SKU or Stock ID (defaults to Stock ID).
  • Legacy Stock ID (required) — In Legacy Scalar Fields mode, required when the identifier type is Stock ID.
  • Legacy Action (required) — In Legacy Scalar Fields mode, choose Add, Remove, or Set. Set replaces the quantity; Add and Remove adjust it.
  • Legacy Stock Quantity (required) — In Legacy Scalar Fields mode, quantity used by the selected action.
  • Legacy Comment (required) — In Legacy Scalar Fields mode, comment recorded with the stock update; use a workflow-specific reason for an auditable history.

Output shape

Not determined from the supplied source pack.

The pack contains only the node entry module, which delegates its description to shared domain configuration and implementation not included here. The properties describe the inputs, but do not establish the returned data shape or runtime handling of these fields.

Examples

Example 1: Add stock at a location using Fields mode

Set Stock Details Input to Fields and add a row with the stock ID, quantity, Add action, and optional comment and location.

Example 2: Update stock with JSON

Set Stock Details Input to JSON Object Array and provide an array of entries containing stock_id, stock_change, and action.

Example 3: Use a saved workflow's scalar inputs

Set Stock Details Input to Legacy Scalar Fields, choose the SKU or stock ID identifier type, then provide the action, quantity, and comment.

Links

Discussion