/
/
Find Shopify refunds with no Business Central credit memo
For finance teams who want every Shopify refund matched to a posted credit memo in Dynamics 365 Business Central, by asking their AI assistant.
On this page
Connector
Connect Shopify, pick your AI tool and paste the prompt.
The problem
Refunds with no credit memo overstate your revenue
Every Shopify refund should have a matching credit memo in Dynamics 365 Business Central, or revenue and receivables are overstated. Matching by hand is slow because one order can have several refunds and the amounts must include tax.
Without PopdockAI
- Export Shopify refunds and add up lines and tax
- Search Business Central for credit memos by order
- Pair several refunds on one order by hand
- Find the gaps when month end will not balance
With PopdockAI
- Each refund is totalled from its lines plus tax
- Posted credit memos are found by order reference
- Several refunds on one order are paired by amount, then date
- Refunds with no memo come first, and nothing is created
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** For every Shopify refund created between `{from-date}` (default 30 days ago) and `{to-date}` (default today), find the posted sales credit memo in Business Central and report refunds with no credit memo or a different amount.
**Step 1: Read the Shopify refunds**
Call `shopify-get-refund` with `created-at.from` set to `{from-date}` and `created-at.to` set to `{to-date}`, and `max-records` 250. Keep `refund-id`, `order-id`, `order-name`, `order-number`, `customer-email`, `created-at`, `restock` and `note`.
For each refund, call `shopify-get-refund-line` with `order-refund-id` set to the `refund-id`. The refunded amount is the sum of each line's `subtotal` plus `total-tax`. Keep the lines (`sku`, `quantity`, `restock-type`) for the report. A refund with no lines is an amount-only refund; note it.
**Step 2: Find the credit memo in Business Central**
Call `business-central-get-posted-sales-credit-memo` with `external-document-number` set to the Shopify `order-name`. If nothing comes back, retry with the `order-number` alone. Keep `credit-memo-number`, `posting-date`, `total-amount-including-tax`, `applies-to-document-number`, `paid` and `cancelled`. Ignore cancelled credit memos.
One order can have several refunds and several credit memos. Match them by amount first, then by date. Any left over on either side are unmatched.
**Step 3: Report**
A table of problems: Shopify order name, refund date, Shopify refunded amount, Business Central credit memo number (or none), credit memo amount, difference. Put refunds with no credit memo first, then amount differences.
Then totals: refunds checked, matched, missing in Business Central, amount differences, and the total refunded value on each side.
**Rules & Guidelines:**
* `shopify-get-refund` and `shopify-get-refund-line` are on the shopify server. `business-central-get-posted-sales-credit-memo` is on the business-central server.
* This prompt is read-only. Do NOT call `business-central-create-sales-credit-memo`, `business-central-create-sales-credit-memo-line` or any other create, add or update tool on either server.
* If the user names a Business Central company, pass it as `company` on every Business Central call.
**Validation:**
* If there are no refunds in the range, say so and stop.
* Compare amounts rounded to 2 decimals. A difference of 0.01 is a rounding difference; list it but say so.
* If no refund matches any credit memo, say Business Central may reference the refund in a different field and show one example with the values you tried, rather than reporting everything as missing.Who it's for
One answer, three teams that use it
Accounts receivable
Credit every refund that went out
See which refunds still need a credit memo, so customer balances are right.
Which Shopify refunds from October have no credit memo in Business Central?
Controllers
Keep revenue from being overstated
Refunds with no memo and amount differences are listed before close, so revenue is reported correctly.
Match all Shopify refunds this quarter to Business Central credit memos and show the differences.
Revenue accountants
Handle orders with several refunds
Multiple refunds on one order are paired by amount and date, so partial refunds are not miscounted.
Pair Shopify refunds from last month with Business Central credit memos, including orders refunded more than once.
How it works
What PopdockAI does when you ask
You give a date range, and your AI assistant matches each Shopify refund to a Business Central credit memo. It only reads and warns you if the reference may live in another field.
01
Ask
You give a date range.
02
Total
It reads Shopify refunds and totals each from its lines plus tax.
03
Match
It finds posted credit memos by order reference, pairing by amount then date.
04
Report
You get refunds with no memo first, then amount differences.
What PopdockAI provides
The tools behind the answer
Ready made tools for Shopify and one secure connection to your AI tool. No code, no exports.
shopify-get-refund
shopify-get-refund-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
Uncredited refunds caught before month end
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)
