/
/
Send faulty goods back to the right vendor
For operations teams who want a Dynamics GP return to vendor created against the right supplier and RMA, by asking their AI assistant.
On this page
Connector
Connect Microsoft Dynamics GP, pick your AI tool and paste the prompt.
The problem
Goods sent back to the wrong vendor
Sending faulty goods back to a vendor in Dynamics GP means working out which items that vendor supplied, finding the return address and codes, and keying each line at cost. Items go to the wrong vendor, or the paperwork never matches the customer RMA.
Without PopdockAI
- Work out which returned items this vendor supplied
- Look up the return address and RTV codes
- Find the last receipt cost for each item
- Key each line and hope it matches the RMA
With PopdockAI
- The vendor and return address are found
- With an RMA, only items this vendor supplies are kept
- Lines are priced at the last receipt cost with codes already in use
- You confirm every line, and the stored lines are read back
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Create a return to vendor for goods going back to `{vendor-name}` (from customer RMA `{rma-number}`, if given), 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 and address**
Call `dynamics-gp-get-pm-vendor` with `vendor-name.contains` (or `vendor-id`); if several match, list them and stop. Call `dynamics-gp-get-pm-vendor-address` by `vendor-id` for the return `address-code`.
**Step 2: What to return**
If `{rma-number}` is given, call `dynamics-gp-get-srv-rma-line` by `return-document-id` and keep items this vendor supplies (check with `dynamics-gp-get-iv-vendor-item` by `vendor-id` and `item-number`). Otherwise ask the user which items and quantities are going back. Take `last-receipt-cost` from the vendor item as the part cost.
**Step 3: Codes to reuse**
Call `dynamics-gp-get-srv-rtv` by `vendor-id` (or unfiltered, a few rows) to see the `rtv-type` and `rtv-status` values in use for a new return.
**Step 4: Confirm**
Ask the user for the RTV number and the location the goods ship from. 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, address code, RTV number, type, status, and each line (item, vendor item number, quantity, part cost, RMA number).
**Step 5: Write**
1. Call `dynamics-gp-srv-rtv-add` once with `rtv-number`, `vendor-id`, `address-code`, `rtv-type`, `rtv-status`, `rma-number` and `location-code`.
2. Only if that succeeded, call `dynamics-gp-srv-rtv-line-add` once per line with `rtv-number`, `rtv-line` (1, 2, 3 ...), `item-number`, `quantity`, `part-cost`, `vendor-item-number`, `rma-number` and `location-code`.
If a line fails, stop and report which lines exist. Do not retry a failed write automatically. Report the error exactly as returned.
**Step 6: Verify**
Call `dynamics-gp-get-srv-rtv-line` by `rtv-number` and report the stored lines.
**Rules & Guidelines:**
* The only write tools this prompt may call are `dynamics-gp-srv-rtv-add` (once) and `dynamics-gp-srv-rtv-line-add` (once per confirmed line), after Step 4.
**Validation:**
* If none of the RMA's items come from this vendor, say so and stop.Who it's for
One answer, three teams that use it
Returns coordinators
Turn a customer RMA into a vendor return
Items from the RMA that this vendor supplied are carried across, so the paperwork lines up.
Send the faulty items from RMA-2210 back to Contoso Components in Dynamics GP.
Purchasing
Return stock at the right cost
Lines are priced at the last receipt cost, so the credit you expect matches what you paid.
Return 8 CART-12 cartridges to Fabrikam Supply in Dynamics GP, they were the wrong colour.
Warehouse leads
Ship returns to the right address
The vendor's return address is found for you, so goods do not go to the wrong location.
Raise a return to Northwind Supply in Dynamics GP for 2 SD-200 docks that failed testing.
How it works
What PopdockAI does when you ask
You name the vendor and optionally the customer RMA, and your AI assistant builds the return from Dynamics GP. Nothing is created until you confirm every line.
01
Ask
You name the vendor, and optionally the customer RMA the goods came from.
02
Match
It finds the return address and keeps only items this vendor supplies.
03
Confirm
You approve every line, priced at the last receipt cost with existing codes.
04
Create
It creates the return and lines and reads them back.
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-pm-vendor-address
microsoft-dynamics-gp-get-srv-rma-line
microsoft-dynamics-gp-get-iv-vendor-item
microsoft-dynamics-gp-get-srv-rtv
microsoft-dynamics-gp-srv-rtv-add
microsoft-dynamics-gp-srv-rtv-line-add
microsoft-dynamics-gp-get-srv-rtv-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
Returns to the right supplier, ready to recover cost
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)
