VitePOS Bridge icon

VitePOS Bridge

Use VitePOS automation bridge and analytics APIs

Product → Upsert Product

AI-generated

Summary

Creates or updates a product in VitePOS via the bridge's POST /wp-json/vtab/v1/products/upsert endpoint, using either a field form or a raw JSON body.

Inputs

  • Input Mode — 'Use Fields' (default) builds the request body from Product Fields. 'Advanced JSON' sends the JSON Body as-is.
  • JSON Body — Shown in Advanced JSON mode. Sent unchanged as the request body (default is {"dry_run": true}). Invalid JSON raises an error.
  • Product Fields — Collection used in Use Fields mode. Only filled fields are sent. Supported: id, external_id, sku, name, type (simple/variable), status (draft/private/publish), regular_price, sale_price, stock_quantity, stock_status, manage_stock, barcode, description, short_description, categories, create_categories, outlet_id, outlet_stock_quantity, dry_run. Categories is a comma-separated list; it is sent as an array together with create_categories (defaults to true), and only when categories is non-empty. outlet_id and outlet_stock_quantity must both be set to send outlet_stock {outlet_id, quantity}. dry_run is sent only when true.

Output shape

One output item per input item. The bridge's JSON response is returned with a human-readable response string added at the top (for upsert this is generic, e.g. 'Product request completed.'). If the bridge response is not an object, or already has a response key, it is wrapped as raw.

On bridge failure (status or success false) the response string carries the bridge's message. With Continue On Fail enabled, failed items return {error: message}. The exact record fields depend on the VitePOS Bridge plugin and are not defined in the node. Requires the viteposBridgeApi credential (site URL).

Examples

Example 1: Create or update a product by SKU with initial stock in an outlet

Input Mode: Use Fields; Product Fields: sku, name, regular_price, categories 'Food, Drinks', outlet_id, outlet_stock_quantity.

Example 2: Preview a product sync without saving

Use Fields; set external_id, name, regular_price and enable Dry Run.

Example 3: Send a custom payload built upstream

Input Mode: Advanced JSON; JSON Body: an expression such as {{ JSON.stringify($json) }} or a JSON object.

Links

Discussion