/
/
Reorder from a vendor in one accurate purchase order
For buyers who want a Dynamics GP purchase order sized to real stock and demand for a vendor's items, by asking their AI assistant.
On this page
Connector
Connect Microsoft Dynamics GP, pick your AI tool and paste the prompt.
The problem
Reorders built by hand miss items or over-order
Building a reorder purchase order in Dynamics GP means checking stock, allocations, open orders and demand for every item a vendor supplies, then applying order minimums. Done by hand it is slow, and items get missed or over-ordered.
Without PopdockAI
- Check stock, allocations and open orders item by item
- Pull recent sales to estimate demand
- Round quantities to minimums and order multiples
- Key the purchase order and its lines one by one
With PopdockAI
- The vendor is checked for a hold before anything else
- Projected stock is worked out for every item they supply
- Quantities use 90 days of sales and lead time, rounded to minimums
- You edit and confirm lines, and stored lines are compared afterwards
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Create one purchase order to `{vendor-name}` for the items (in class `{item-class-code}`, default all) that need reordering, after the user confirms the lines.
Pass `{company}` as `company` on every call (if it is empty, omit `company` and the default company is used). Pass a generous `max-records` (1000). If a result comes back with exactly that many rows, say the result may be truncated.
**Step 1: Vendor**
Call `dynamics-gp-get-pm-vendor` with `vendor-name.contains` (or `vendor-id`). If several match, list them and stop. If the vendor is on `hold` or inactive, stop and say so.
**Step 2: Candidates**
Call `dynamics-gp-get-iv-vendor-item` by `vendor-id` for the items this vendor supplies. For each (filtered to the class via `dynamics-gp-get-iv-item` when given), call `dynamics-gp-get-iv-item-quantity` by `item-number` and compute projected = on hand minus allocated plus on order minus back ordered, from the item-level row.
**Step 3: Quantities**
Call `dynamics-gp-get-rm-sales-line-item` by `item-number` for the last 90 days to get daily demand. Suggested quantity = demand over (`average-lead-time` plus 30 days) minus projected, raised to `minimum-order-quantity` and rounded up to `economic-order-quantity`. Keep items with a positive suggestion. Unit cost = `last-receipt-cost`.
**Step 4: Confirm**
Ask the user for the PO number to use and the required date. Show the user exactly what will be written, field by field, and ask for explicit confirmation. Do nothing further without a clear yes. Show: vendor, PO number, required date, and each line (item, vendor item number, quantity, unit of measure, unit cost, extended cost), with the PO total. Let the user remove or change lines first.
**Step 5: Write**
1. Call `dynamics-gp-pm-purchase-order-add` once with `po-number`, `vendor-id`, `po-type` set to standard, `document-date` today and `required-date`.
2. Only if that succeeded, call `dynamics-gp-pm-purchase-order-line-add` once per confirmed line with `po-number`, `vendor-id`, `item-number`, `quantity`, `unit-cost`, `u-of-m` and `required-date`.
If a line fails, stop adding lines and tell the user which lines were created and which were not. Do not retry a failed write automatically. Report the error exactly as returned.
**Step 6: Verify**
Call `dynamics-gp-get-pm-purchase-order-line` by `po-number` and compare it with what was confirmed.
**Rules & Guidelines:**
* The only write tools this prompt may call are `dynamics-gp-pm-purchase-order-add` (once) and `dynamics-gp-pm-purchase-order-line-add` (once per confirmed line), after Step 4.
* Do not call `dynamics-gp-pm-purchase-order-update` or any other write tool.
**Validation:**
* If nothing needs reordering, say so and stop without writing.Who it's for
One answer, three teams that use it
Buyers
Build a vendor reorder in minutes
Suggested quantities for every item the vendor supplies replace a stock report and a calculator.
Build a reorder PO for Contoso Components in Dynamics GP for the CABLES item class.
Inventory planners
Order to real demand
Quantities based on recent sales and lead time keep stock in line with demand instead of rule of thumb.
What should we reorder from Northwind Supply in Dynamics GP based on the last 90 days of sales?
Purchasing managers
Approve exactly what is ordered
You review and change the lines before the PO is created, and the stored lines are checked against what you approved.
Draft a Dynamics GP purchase order for Fabrikam Supply for anything below reorder point, then let me review it.
How it works
What PopdockAI does when you ask
You name the vendor, and your AI assistant works out what to reorder from Dynamics GP stock and demand. The purchase order is created only after you review and approve the lines.
01
Ask
You name the vendor, and optionally an item class.
02
Project
It checks the vendor is not on hold and projects stock for every item they supply.
03
Confirm
You review, change or remove the suggested lines and approve.
04
Create
It creates the PO and lines and compares them with what you approved.
What PopdockAI provides
The tools behind the answer
Ready made tools for Microsoft Dynamics GP and one secure connection to your AI tool. No code, no exports.
microsoft-dynamics-gp-get-pm-vendor
microsoft-dynamics-gp-get-iv-vendor-item
microsoft-dynamics-gp-get-iv-item
microsoft-dynamics-gp-get-iv-item-quantity
microsoft-dynamics-gp-get-rm-sales-line-item
microsoft-dynamics-gp-pm-purchase-order-add
microsoft-dynamics-gp-pm-purchase-order-line-add
microsoft-dynamics-gp-get-pm-purchase-order-line
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
One accurate reorder per vendor, sized to demand
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
