Actions32
- Analytics Actions
- Batch Actions
- Customer Actions
- Order Actions
- Product Actions
- Purchase Actions
- Raw Request Actions
- System Actions
- Vendor Actions
- WhatsApp Actions
Batch → Allocate Batches
AI-generatedSummary
Sends a POST to the VitePOS bridge /wp-json/vtab/v1/batches/allocate endpoint to preview or compute which stock batches would fulfil a requested quantity of a product, using FEFO or FIFO ordering.
Inputs
- Input Mode — 'Use Fields' (default) builds the request body from the Batch Allocation Fields. 'Advanced JSON' sends the JSON Body as-is.
- JSON Body — Shown only in Advanced JSON mode. Raw request body sent to the allocate endpoint. Defaults to {"dry_run": true}. Must be valid JSON or the node errors.
- Batch Allocation Fields > Product ID — Product to allocate batches for.
- Batch Allocation Fields > Variation ID — Variation of the product, if applicable.
- Batch Allocation Fields > Quantity — Quantity to allocate (default 1). Sent as
quantity. - Batch Allocation Fields > Strategy — FEFO (earliest expiry first, default) or FIFO (oldest batch first).
- Batch Allocation Fields > Outlet ID — Restricts allocation to an outlet.
- Batch Allocation Fields > Warehouse ID — Restricts allocation to a warehouse.
Output shape
One output item per input item, containing the bridge's JSON response merged with a human-readable response string (e.g. 'Batch request completed.').
Fields are only sent if filled in. In fields mode no dry_run flag is sent, so whether the call is a preview or a committed allocation depends on the server; use Advanced JSON with dry_run to control it explicitly. If the API response already has a
responsekey, it is returned underraw. With Continue On Fail, errors yield an item with anerrormessage.
Examples
Example 1: Find which batches would supply 10 units of a product, earliest expiry first
Input Mode: Use Fields; Product ID: 123; Quantity: 10; Strategy: FEFO
Example 2: Dry-run an allocation for a specific outlet using FIFO
Input Mode: Advanced JSON; JSON Body: {"product_id":123,"outlet_id":2,"quantity":5,"strategy":"fifo","dry_run":true}