Draft NetSuite purchase orders when stock hits its reorder point

By General Input

Every weekday at 7am, spot NetSuite items at or below their reorder point, draft one purchase order per vendor, and post a Slack summary.

Integrations

  • NetSuite
  • Slack Bot

Type

Agentic Task

Categories

  • Operations
  • Finance

Every weekday at 7am, run an inventory replenishment pass in NetSuite and give my purchasing team a single Slack summary of what needs ordering.

Start by running a SuiteQL query in NetSuite that reads my stocked inventory items along with their reorder point, preferred stock level, available quantity, quantity on hand, purchase price, and preferred vendor. Flag every item where available quantity has fallen to or below its reorder point. Skip items that are not stocked and items with no reorder point set, since those are not managed by reorder point replenishment.

Before drafting anything, work out which flagged items already sit on an open purchase order. Do that with a second SuiteQL query across purchase order lines, or by listing the purchaseOrder record collection and filtering to orders that are still open. Drop those items from the flagged list so we never double order, and keep a count of how many were skipped for this reason.

Group the remaining flagged items by preferred vendor. For each vendor group, create one draft purchase order in NetSuite using the Create a Record operation against the purchaseOrder record type, with that vendor as the entity and one line per item. Set each line quantity to the amount that brings the item back up to its preferred stock level, which is preferred stock level minus available quantity, rounded up to a whole unit. Leave every purchase order in a pending approval state. Do not approve or submit any of them, because a buyer reviews before anything reaches a supplier.

If a flagged item has no preferred vendor set, do not guess a supplier and do not put it on any purchase order. Collect those items into a separate list instead.

Finally, post one Slack message to my purchasing channel. List each draft purchase order with the vendor name, the number of items on it, the total value of the order, and a link to the purchase order record in NetSuite. The record link follows the pattern https://{accountId}.app.netsuite.com/app/accounting/transactions/purchord.nl?id={internalId} using my NetSuite account id and the internal id returned when the record was created. Under that, add a separate callout listing any flagged item that is already at zero on hand, since those are live stockouts. Add a second callout listing the items that need manual attention because they have no preferred vendor, showing the current available quantity and reorder point for each. Mention how many items were skipped because they are already on an open purchase order. If nothing has dropped to its reorder point, post a short message saying every stocked item is above its reorder point so the team knows the check ran.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them