How to Auto-Order Supplies When MarketMan Inventory Is Low
Automatically create purchase orders when inventory drops below threshold.
What This Integration Does
Stockouts in a restaurant cost two things: lost covers and rushed last-minute orders at retail prices. This workflow watches MarketMan inventory levels on a schedule, finds items that have fallen below their reorder point, and either drafts a purchase order in MarketMan or posts a confirmation request to Slack so a manager can approve with one click. It removes the manual checklist without removing the human signoff.
The workflow runs daily (or more often for fast-moving venues), compares live on-hand counts against item-level minimum thresholds you maintain in MarketMan, groups the low items by preferred vendor, and creates a draft order per vendor. Nothing is sent to the supplier until a person confirms - the workflow's job is to surface what needs ordering and stage the paperwork.
Prerequisites
- A MarketMan connection with permission to read inventory and create orders. Minimum thresholds (par levels) must be set per item in MarketMan.
- A Slack connection for the approval-request channel.
- Preferred vendor mappings configured in MarketMan so the workflow knows who to order each item from.
Step 1: Schedule Trigger
Drop a Trigger node and set it to Schedule. Daily at 06:00 works for venues that take deliveries in the morning. For high-volume operations, run it every 4 hours so a sudden Friday-night burn-through doesn't have to wait until tomorrow.
Step 2: Authenticate and Read Current Counts
Add a Connector node pointing at marketman. If your connection uses manual token auth, call get-token first. Then call get-inventory-counts to read live on-hand quantities. Store the response as {{ counts }}.
Step 3: Read Item Metadata (Thresholds and Vendors)
Add another Connector node for marketman calling get-inventory-items. This returns each item's minimum threshold, unit, pack size, and preferred vendor. Store as {{ items }}. You'll join this against counts in the next step.
Step 4: Find Items Below Threshold
Add a Transform node that joins counts to items on itemId and emits only rows where onHand < minThreshold. Compute the order quantity as:
orderQty = ceil((targetLevel - onHand) / packSize) * packSize
Where targetLevel is typically 2x the minimum threshold. Group the result by preferredVendorId so each downstream order is one PO per supplier.
Step 5: Create Draft Orders in MarketMan
Wrap a Loop node around the vendor-grouped list. Inside the loop, add a Connector node pointing at marketman and pick the create-order tool. Pass:
- vendorId:
{{ group.vendorId }} - deliveryDate: next available delivery date for that vendor
- lineItems: the list of
{ itemId, quantity, unit }for that group - status: draft (so it doesn't auto-send)
If your venue prefers a single manager-managed PO across all vendors, skip the grouping and emit one combined order instead.
Step 6: Notify Purchasing for Approval
Add a Connector node for slack using send-message. Format a summary: total items low, draft orders created, total value, and a link back to MarketMan to review and send. For tighter control, replace this with a Human node that pauses the workflow until a manager clicks Approve, then advances to a final step that flips the MarketMan order status from draft to sent.
Tips
- Round to supplier pack sizes - ordering 1.3 cases of tomatoes makes nobody happy. Always round up using
mathceilagainst the pack size on the item record. - Throttle reorders - if you run every 4 hours, add a check that skips items that already have an open PO. Otherwise the workflow will keep ordering the same item until the delivery arrives.
- Honour lead times - some vendors deliver next-day, others weekly. Use the vendor's lead time when computing target level so you don't trigger a Saturday emergency order for a Tuesday-only supplier.
Common Pitfalls
- Missing minimum thresholds - if an item has no minimum set in MarketMan, it'll never trigger. Run a one-off audit to flag items without thresholds before turning the workflow on.
- Inaccurate counts - the workflow trusts the latest count. If end-of-day counts are skipped, false lows or false fines will both happen. Pair this with a daily count discipline.
- Wrong vendor for the item - MarketMan lets multiple vendors supply the same item. Lock down a preferred vendor per item or the workflow may route an order to a slow supplier.
Testing
Run the workflow manually against a small set of items - temporarily raise the minimum threshold on three SKUs so they fall below it, run the workflow, and inspect the draft orders in MarketMan. Confirm pack-size rounding, vendor routing, and the Slack summary all look right before turning on the schedule.