/
/
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.
On this page
Connector
Connect Microsoft Dynamics 365 Sales, pick your AI tool and paste the prompt.
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.
**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.
02
Read
It reads the list price, standard cost and active price lists.
03
Compute
It works out the effective price and discount on every sales line.
04
Report
You get flagged lines, a summary by source and the top salespeople.
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.
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
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
See where discounting erodes margin
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)
