Connectors

/

Microsoft Dynamics GP

/

Audit Dynamics GP item pricing and margins
Report

Find items sold below cost or under target margin

For finance and pricing teams who want Dynamics GP price lists and real invoice prices checked against cost, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Audit Dynamics GP item pricing and margins
Audit margins on our Dynamics GP PRINTERS class against a 35 percent target over the last 90 days.
Of 42 items in PRINTERS, 6 miss the 35 percent target. - Under cost: LP-10 sold at 212 to Fabrikam, cost 228 - Under target on the price list: 3 items - Under target in real sales: 5 items - Heavy discounting: 2 items average over 15 percent off list Want the item-by-item margins?
Microsoft Dynamics GP
Sample figures. Your results come from your own account.
microsoft-dynamics-gp-get-iv-item
microsoft-dynamics-gp-get-iv-item-price
microsoft-dynamics-gp-get-rm-sales-line-item

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Microsoft Dynamics GP

Microsoft Dynamics GP
Run it on your own Microsoft Dynamics GP data.

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

Try PopdockAI free

The problem

Margins slip as costs rise and discounts pile up

Prices in Dynamics GP drift out of line with cost as purchase prices rise, and order discounts drift further still. Finding items sold below cost or under target means comparing price lists, costs and invoice lines in separate screens.

Without PopdockAI

  • Export item costs and price lists from Dynamics GP
  • Work out the margin on each price in a spreadsheet
  • Pull invoice lines to see what was really charged
  • Miss the customers getting the deepest discounts

With PopdockAI

  • Margins are worked out on each currency price, with skipped rows named
  • Recent invoice lines give the margin you actually achieved
  • The lowest price charged is shown with the customer
  • It only reads and never changes a price

The prompt

Use this prompt

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

Prompt
**Objective:** For items in class `{item-class-code}` (default all), flag list prices and actual selling prices that fall below cost or below a `{min-margin-percent}` percent margin (default 20), using sales from the last `{lookback-days}` days (default 90).

Pass `{company}` as `company` on every call (if it is empty, omit `company` and the default company is used). Pass a generous `max-records` (1000). If a result comes back with exactly that many rows, say the result may be truncated.

**Step 1: Items and cost**

Call `dynamics-gp-get-iv-item` with `item-class-code` when given. Note `current-cost` and `standard-cost`. Skip items with no cost.

**Step 2: Price lists**

Call `dynamics-gp-get-iv-item-price` for those items (by `item-number`). Margin = (price minus `current-cost`) divided by price. Flag rows below cost and rows below the target margin. Note the `price-method`; for percent-based methods the stored value is not a currency price, so evaluate only currency-amount rows and say which were skipped.

**Step 3: Realised prices**

Call `dynamics-gp-get-rm-sales-line-item` with `document-date.from` at the lookback. For invoice lines of these items, realised margin = (`extended-price` minus `extended-cost`) divided by `extended-price`. Per item: quantity, revenue, realised margin, lowest unit price charged and to whom.

**Step 4: Report**

* Items priced below cost (item, level, unit, price, current cost).
* Items under target margin on the price list.
* Items under target margin in actual sales, worst first by revenue at risk, with the customers who got the lowest prices.
* Items whose realised price is well under their list price (average discount over 15 percent).

**Rules & Guidelines:**

* This prompt is read-only. Do not call any tool whose name does not contain `get` (no add, update, note or email tools).
* Do not call `dynamics-gp-iv-item-price-update`; the separate `update-item-prices` prompt changes prices.

**Validation:**

* If no items match, say so and stop.

Who it's for

One answer, three teams that use it

Finance controllers

See items selling below cost

Items priced or sold below cost are listed first, so the worst leaks are fixed before more stock goes out the door.

Which Dynamics GP items in the PARTS class sold below cost in the last 60 days?

Pricing analysts

Check list prices against target margin

Each price list row is tested against your target, so you know which prices to raise after a cost increase.

Check our Dynamics GP RETAIL class price lists against a 40 percent margin target.

Sales managers

Find the deepest customer discounts

Items discounted more than 15 percent on average and the lowest price charged show which deals need a conversation.

Which customers got the lowest prices on our OFFICE class items in Dynamics GP over the last quarter?

How it works

What PopdockAI does when you ask

You choose an item class, a target margin and a lookback window, and your AI assistant compares Dynamics GP prices and sales with cost. It reports the leaks and leaves every price as it is.

01

Ask

You choose an item class, a target margin and a lookback window.

Your AI tool

02

Read

It reads item costs and price lists and works out each price's margin.

microsoft-dynamics-gp-get-iv-item
microsoft-dynamics-gp-get-iv-item-price

03

Compare

It reads recent invoice lines for achieved margin and the lowest price charged.

microsoft-dynamics-gp-get-rm-sales-line-item

04

Report

You get items below cost, under target or discounted over 15 percent.

Your AI tool

What PopdockAI provides

The tools behind the answer

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

get-data

microsoft-dynamics-gp-get-iv-item

Returns inventory item records from Dynamics GP Inventory, including item type, class, costs, units of measure and valuation settings. Filter by item class code, item description, current cost, item number, abc code, item short name, valuation method and item tracking option, and pick the company and the maximum number of records.
get-data

microsoft-dynamics-gp-get-iv-item-price

Returns item price list records from Dynamics GP Inventory, including price level, unit of measure, quantity breaks and pricing method. Filter by price level, price method, unit of measure, item number, currency ID, item description and item type, and pick the company and the maximum number of records.
get-data

microsoft-dynamics-gp-get-rm-sales-line-item

Returns sales document lines from Dynamics GP Sales Order Processing, with the customer, item, quantity, prices and costs of each line. Filter by location code, SOP type, item number, SOP number, customer name, customer ID, item description and extended price, and pick the company and the maximum number of records.
Read only.Nothing in Microsoft Dynamics GP 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

Margin leaks found by item and customer

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