Connectors

/

Microsoft Dynamics 365 Sales

/

Trace a Dynamics 365 Sales order to a Dynamics 365 Business Central invoice
Report
Cross-Connector

Answer where an order is, from quote to cash

For sales and operations teams who want a Dynamics 365 Sales order traced to its Business Central shipment, invoice and payment, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Trace a Dynamics 365 Sales order to a Dynamics 365 Business Central invoice
Where is the Contoso order ORD-1042 from Dynamics 365 Sales? Has it shipped and been paid?
ORD-1042 is invoiced but not yet paid. - Business Central order: SO-5521, matched by external document number - Shipped: 4 of 5 lines in full, 1 line short by 10 units - Invoice: INV-1042 posted 2 October, 6,250 remaining - Totals: identical in both systems Want the line-by-line table?
Microsoft Dynamics 365 Sales
Sample figures. Your results come from your own account.
microsoft-dynamics-365-sales-get-salesorders
microsoft-dynamics-365-sales-get-salesorderdetails

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Microsoft Dynamics 365 Sales

Microsoft Dynamics 365 Sales
Run it on your own Microsoft Dynamics 365 Sales data.

Connect Microsoft Dynamics 365 Sales, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

The order is in the CRM, the invoice is in the ERP

When a customer asks where their order is, the rep sees it in Dynamics 365 Sales but the shipment, invoice and payment are in Business Central. Following it means finding the matching order, comparing lines and hunting for the posted invoice.

Without PopdockAI

  • Find the order in Dynamics 365 Sales
  • Search Business Central for the matching order
  • Compare lines and shipments by hand
  • Ask finance whether it has been paid

With PopdockAI

  • The Business Central order is matched by document number, name or total
  • Each line's quantity, shipped and invoiced is compared
  • The posted invoice and remaining amount are found
  • One stage from not in Business Central to paid, and nothing is changed

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Trace the Dynamics 365 Sales order `{order-name}` through Business Central company `{company}` (default: the connector's default company when blank) and report where it is in order-to-cash.

**Step 1: Read the order in Dynamics 365 Sales**

Call `dynamics-365-sales-get-salesorders` with name set to `{order-name}`; if nothing comes back, try order-id set to `{order-name}`, then name.contains. If more than one matches, list them and stop. Keep name, order-id, customer, total-amount, status, status-reason and date-submitted. Then call `dynamics-365-sales-get-salesorderdetails` with order set to the order name to get its lines (product-number, product-name, quantity, extended-amount).

**Step 2: Find the order in Business Central**

Call `business-central-get-sales-transaction` with external-document-number set to the Dynamics 365 order-id, then with the order name if that returns nothing. If still nothing, find the customer with `business-central-get-customer` (name.contains set to the Dynamics 365 customer) and call `business-central-get-sales-transaction` with sell-to-customer-number and an order-date.from of the order's date-submitted, and match on total-amount. If nothing matches, report the order as not entered in Business Central and stop.

For a matched document keep document-type, document-number, status, total-amount, total-outstanding-amount and shipment-date, and call `business-central-get-sales-transaction-line` with document-number set to it to compare quantities, quantity-shipped and quantity-invoiced against the Dynamics 365 lines (match product-number to number).

**Step 3: Find the invoice and payment in Business Central**

Call `business-central-get-posted-sales-invoice` with external-document-number set to the same reference that matched in Step 2; if nothing comes back and Step 2 found a sales order, search by the customer and keep rows whose order-number equals that document-number. Keep invoice-number, posting-date, due-date, total-amount-including-tax and remaining-amount.

**Step 4: Report**

A one-line stage: Not in BC, Open order, Partly shipped, Shipped not invoiced, Invoiced unpaid, Invoiced overdue, or Paid. Then a timeline (submitted in D365, order in BC, shipped, invoiced, due) and a line table: product, D365 quantity, BC quantity, shipped, invoiced, with any difference flagged.

**Rules & Guidelines:**

* Tools named dynamics-365-sales-* are on the dynamics-365-sales server; tools named business-central-* are on the business-central server.
* This prompt is read-only. Do NOT call `business-central-create-sales-order`, `business-central-update-sales-order` or any other create or update tool on either server.

**Validation:**

* If Dynamics 365 Sales and Business Central totals differ, show both and the difference; do not assume one is wrong.
* Remaining-amount of 0 means paid; a remaining-amount above 0 with a due-date before today means overdue.

Who it's for

One answer, three teams that use it

Sales reps

Answer order questions without an ERP login

Tell a customer whether their order shipped and was paid, straight from the CRM order.

Where is the Fabrikam order ORD-2087 from Dynamics 365 Sales? Has it been invoiced?

Order management

Spot line differences between systems

Lines where quantities, shipped or invoiced differ are flagged.

Compare Dynamics 365 Sales order ORD-1990 for Northwind Traders with its Business Central order.

Customer service

Give a clear order status

One stage and a timeline let you answer the customer in a sentence.

What stage is the Contoso order ORD-2101 at, from Dynamics 365 Sales to payment in Business Central?

How it works

What PopdockAI does when you ask

You name the Dynamics 365 Sales order and your AI assistant follows it into Business Central. Differing totals are shown side by side without assuming which is wrong.

01

Ask

You name the Dynamics 365 Sales order.

Your AI tool

02

Match

It finds the Business Central order by document number, name or customer and total.

microsoft-dynamics-365-sales-get-salesorders
microsoft-dynamics-365-sales-get-salesorderdetails

03

Compare

It checks each line's quantity, shipped and invoiced, and finds the invoice.

No items found.

04

Report

You get the stage, a timeline and a line table with differences.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for Microsoft Dynamics 365 Sales and one secure connection to your AI tool. No code, no exports.

get-data

microsoft-dynamics-365-sales-get-salesorders

Returns Dynamics 365 Sales orders. Filter by name, total amount, created date, customer, owner, order ID and status reason, and cap how many records come back.
get-data

microsoft-dynamics-365-sales-get-salesorderdetails

Returns Dynamics 365 Sales order products. Filter by product number, requested delivery date, extended amount, product name, quantity and order, and cap how many records come back.
Read only.Nothing in Microsoft Dynamics 365 Sales Changes

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.

How Popdock AI secures your data

The outcome

Where an order is, from quote to cash

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

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.

Try PopdockAI Free
See Documentation