Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. Start
  2. My settings
  3. Fetch my products
  4. Split products

Similar automations