/
/
Record vendor credits accurately, and only once
For finance teams who want purchase credit memos that respect what was invoiced and already credited, by asking their AI assistant.
On this page
Connector
Connect Microsoft Dynamics 365 Business Central, pick your AI tool and paste the prompt.
The problem
Over crediting or entering a credit twice throws off payables
Raising a credit memo against a vendor invoice means reading the posted invoice, checking what was already credited and making sure the vendor's credit memo was not already entered. Over crediting or entering it twice throws off what you owe.
Without PopdockAI
- Open the posted purchase invoice
- Search for credits already applied
- Check the vendor credit number was not entered
- Credit more than was invoiced by mistake
With PopdockAI
- Posted and draft credits against the invoice are read
- No line is credited beyond invoiced minus already credited
- A repeated vendor credit memo number is flagged
- You preview it, then a draft is created once and 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 draft purchase credit memo against posted purchase invoice `{invoice-number}` for `{what-to-credit}` (default the whole invoice), with the vendor's credit memo number `{vendor-credit-memo-number}` if known.
Pass `{company}` as the company argument on every call. If `{company}` is empty, leave the company argument out so the connector's default company is used.
**Step 1: Read the invoice**
Call `business-central-get-posted-purchase-invoice` with invoice-number set to `{invoice-number}`; if nothing comes back try vendor-invoice-number. Stop if not found. Call `business-central-get-posted-purchase-invoice-line` with invoice-number.
**Step 2: Already credited**
Call `business-central-get-posted-purchase-credit-memo` with buy-from-vendor-number and keep those whose applies-to-document-number is this invoice; call `business-central-get-posted-purchase-credit-memo-line` for their lines. Call `business-central-get-purchase-transaction` with buy-from-vendor-number and document-type Credit Memo for drafts. Never credit more than invoiced minus already credited. If `{vendor-credit-memo-number}` is given, call `business-central-get-posted-purchase-credit-memo` with vendor-credit-memo-number set to it; a hit means it was already entered.
**Step 3: Preview and confirm**
Show the invoice lines, amounts already credited, and the proposed credit lines with the total. If a draft already exists, offer to amend it with `business-central-update-purchase-credit-memo-line` (sequence = line-number from `business-central-get-purchase-transaction-line`). Ask for confirmation.
**Step 4: Create**
After confirmation call `business-central-create-purchase-credit-memo` once with vendor-number and pay-to-vendor-number from the invoice, invoice-number, credit-memo-date today, and vendor-credit-memo-number when given. Then call `business-central-create-purchase-credit-memo-line` per line with document-number, line-type, number-on-line, quantity and unit-cost.
**Step 5: Confirm the result**
Re-read with `business-central-get-purchase-transaction` and `business-central-get-purchase-transaction-line`. Report the number and total. Use `business-central-update-purchase-credit-memo` only if the vendor's credit memo number arrives later, after confirmation.
**Rules & Guidelines:**
* Do not call any create or update tool until the user has confirmed the exact values shown in the preview.
* Call `business-central-create-purchase-credit-memo` at most once.
**Validation:**
* If the invoice is fully credited already, say so and stop.Who it's for
One answer, three teams that use it
Accounts payable
Record vendor credits correctly
Each line is capped at what is left to credit, so payables reflect what you really owe.
Raise a credit memo against purchase invoice PI-2087 for 6 returned Camp Stoves, vendor credit CS-311.
Purchasing
Settle price disputes cleanly
Record an agreed price credit against the original invoice with the totals previewed first.
Credit 2 per unit on the 100 Wool Socks on purchase invoice PI-1990 from Fabrikam.
AP managers
Stop the same credit being entered twice
A vendor credit memo number already entered is flagged before anything is created.
Has vendor credit NT-CR-88 from Northwind Traders already been entered in Business Central? If not, raise it against PI-2101.
How it works
What PopdockAI does when you ask
You name the posted invoice and what to credit and your AI assistant checks prior credits in Business Central. It offers to amend an existing draft rather than create another, and waits for your yes.
01
Ask
You name the posted invoice, what to credit and optionally the vendor's number.
02
Check
It reads the invoice and existing credits and flags a repeated credit number.
03
Confirm
You preview the credit lines and total and say yes.
04
Create
It creates the draft credit memo once and reads it back.
The outcome
Vendor credits recorded accurately and once
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)
