Connectors

/

Microsoft Dynamics 365 Sales

/

Dynamics 365 Sales discount audit
Report

See where discounting erodes margin, deal by deal

For sales leaders who want to know how far below list a product really sells in Dynamics 365 Sales, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Dynamics 365 Sales discount audit
How has the SD-200 scanner dock been discounted in Dynamics 365 Sales over the last 90 days? Flag anything over 15 percent.
Across 64 lines in the last 90 days, 11 were discounted more than 15 percent. - Average discount: 9.4 percent off the 160 list price - Under cost: 2 quote lines at 138, under the 152 standard cost - Most flagged: Sam Patel with 5 lines - Source: most deep discounts appear on quotes, not invoices Want every flagged line?
Microsoft Dynamics 365 Sales
Sample figures. Your results come from your own account.
microsoft-dynamics-365-sales-get-products
microsoft-dynamics-365-sales-get-productpricelevels
microsoft-dynamics-365-sales-get-pricelevels
microsoft-dynamics-365-sales-get-quotedetails
microsoft-dynamics-365-sales-get-salesorderdetails
microsoft-dynamics-365-sales-get-invoicedetails
microsoft-dynamics-365-sales-get-opportunityproducts

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

Discounts creep in deal by deal and nobody sees the total

Seeing how far below list a product is really sold means comparing price lists with every opportunity, quote, order and invoice line, then working out effective prices. It is too tedious to do regularly.

Without PopdockAI

  • Look up list price and cost
  • Export every sales line for the product
  • Work out effective prices in a spreadsheet
  • Mix currencies by accident

With PopdockAI

  • List price, standard cost and active price lists are read
  • Effective price is worked out on every sales line
  • Lines over the threshold or below cost are flagged
  • Summaries by source and salesperson, currencies kept apart

The prompt

Use this prompt

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

Prompt
**Objective:** Audit how `{product-name}` has been priced over the last `{lookback-days}` days (default 90) and flag lines sold more than `{discount-threshold}`% (default 15) below list.

**Step 1: The reference price**

Call `dynamics-365-sales-get-products` with `name` = `{product-name}` (retry with `name.contains`; if several match, list them and stop). Note `list-price`, `standard-cost` and `default-price-list`. Then call `dynamics-365-sales-get-productpricelevels` with `product` = the product name to get the amount on each price list, and `dynamics-365-sales-get-pricelevels` to see which of those price lists are active today (by `start-date`, `end-date` and `status`).

**Step 2: The prices actually used**

With the product name, call:

* `dynamics-365-sales-get-quotedetails` with `product-name`
* `dynamics-365-sales-get-salesorderdetails` with `product-name`
* `dynamics-365-sales-get-invoicedetails` with `product-name` and `created-on.from` = the lookback start
* `dynamics-365-sales-get-opportunityproducts` with `product-name`

Keep lines inside the lookback window (by `created-on` where the tool returns it).

**Step 3: Compute the discount**

For each line, the effective unit price is `extended-amount` divided by `quantity`. The discount is the percentage below the price-list amount (or the list price if the line's price list is unknown). Flag lines above the threshold, and any line below `standard-cost`.

**Step 4: Report**

1. Reference prices: list price, standard cost, and the amount on each active price list.
2. Summary per source (opportunity, quote, order, invoice): lines, quantity, average effective price, average discount.
3. Flagged lines: source, parent (opportunity, quote, order or invoice name), salesperson, quantity, effective price, discount %, manual discount, and whether it is below cost.
4. The salespeople with the most flagged lines.

**Rules & Guidelines:**

* This prompt is read-only. Do NOT call any create or update tool: `dynamics-365-sales-create-account`, `dynamics-365-sales-create-contact`, `dynamics-365-sales-create-lead`, `dynamics-365-sales-create-opportunity`, `dynamics-365-sales-create-case`, `dynamics-365-sales-create-task`, `dynamics-365-sales-create-note`, `dynamics-365-sales-create-phone-call`, `dynamics-365-sales-update-account`, `dynamics-365-sales-update-contact`, `dynamics-365-sales-update-lead`, `dynamics-365-sales-update-opportunity`, `dynamics-365-sales-update-case`.
* Do not compare prices across currencies; if the price lists use different currencies, audit each currency separately.

**Validation:**

* If the product is not found, say so and stop.
* If `{discount-threshold}` or `{lookback-days}` is blank or invalid, use the default.

Who it's for

One answer, three teams that use it

Sales leaders

See who discounts deepest

Summaries by salesperson show where discounting is concentrated.

Audit discounts on the HX-500 handheld in Dynamics 365 Sales this quarter by salesperson.

Pricing managers

Find sales below cost

Lines sold below standard cost are flagged so you can tighten approvals.

Has the SD-200 scanner dock been sold below cost in Dynamics 365 Sales in the last 6 months?

Finance directors

Quantify margin leakage

Effective prices across quotes, orders and invoices show how much margin discounting costs.

How deeply has the Premium Support plan been discounted in Dynamics 365 Sales, flagging anything over 20 percent?

How it works

What PopdockAI does when you ask

You name a product, a period and a discount threshold and your AI assistant audits every sales line in Dynamics 365 Sales. Invoices and accounts are only read.

01

Ask

You name a product, a lookback period and a discount threshold.

Your AI tool

02

Read

It reads the list price, standard cost and active price lists.

microsoft-dynamics-365-sales-get-products
microsoft-dynamics-365-sales-get-productpricelevels
microsoft-dynamics-365-sales-get-pricelevels

03

Compute

It works out the effective price and discount on every sales line.

microsoft-dynamics-365-sales-get-quotedetails
microsoft-dynamics-365-sales-get-salesorderdetails
microsoft-dynamics-365-sales-get-invoicedetails
microsoft-dynamics-365-sales-get-opportunityproducts

04

Report

You get flagged lines, a summary by source and the top salespeople.

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-products

Returns Dynamics 365 Sales products. Filter by subject, list price, status, product ID, quantity on hand, name, vendor and product type, and cap how many records come back.
get-data

microsoft-dynamics-365-sales-get-productpricelevels

Returns Dynamics 365 Sales price list items. Filter by amount, product, price list, pricing method and product ID, and cap how many records come back.
get-data

microsoft-dynamics-365-sales-get-pricelevels

Returns Dynamics 365 Sales price lists. Filter by end date, currency, status, start date and name, and cap how many records come back.
get-data

microsoft-dynamics-365-sales-get-quotedetails

Returns Dynamics 365 Sales quote products. Filter by quantity, product name, quote, extended amount and product number, 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.
get-data

microsoft-dynamics-365-sales-get-invoicedetails

Returns Dynamics 365 Sales invoice products. Filter by extended amount, quantity, created date, invoice, product name and product number, and cap how many records come back.
get-data

microsoft-dynamics-365-sales-get-opportunityproducts

Returns Dynamics 365 Sales opportunity products. Filter by quantity, extended amount, opportunity and product name, 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

See where discounting erodes margin

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