Library / Building Blocks & Utilities
Building Blocks & Utilities
Fetch product data via HTTP and calculate restock shortfalls
Manually fetches a product list over HTTP, keeps enabled items, and totals positive shortfalls of target minus stock minus incoming to count restock needs.
What it does
# 2. Build your calculation Continue after Split products. Read the field-name mapping in your assignment: participants can receive different stock, incoming and target field names. ## Apply the task rules 1. Keep products where enabled is true. 2. Calculate target minus stock minus incoming. 3. Keep only positive shortfalls. 4. Count the qualifying products and add their shortfalls. ## Produce two whole-number answers - items_to_restock: the number of qualifying products. - total_units_to_order: their total units to order. Equality, surplus and disabled products contribute nothing. If nothing qualifies, both answers are 0. Use native nodes and your own reasoning. AI assistance and Code, Function or Function Item nodes are not allowed, including disabled or disconnected copies. Read the complete task and worked example | Rules and FAQ
The steps
- Start
- My settings
- Fetch my products
- Split products
Similar automations
Building Blocks & UtilitiesCalculate a Vector Centroid via Webhook15 stepsBuilding Blocks & UtilitiesCalculate the Centroid of Vectors via Webhook4 stepsLead Generation & EnrichmentExtract Person Data and Calculate ICP Score with Airtop9 stepsLead Generation & EnrichmentExtract Company Data and Calculate ICP Score9 steps