/
/
Spot overselling and hidden stock between WooCommerce and Dynamics GP
For operations teams who want WooCommerce stock compared with Dynamics GP available quantity, SKU by SKU, by their AI assistant.
On this page
Connector
Connect WooCommerce, pick your AI tool and paste the prompt.
The problem
In stock online, nothing available in GP
The store says an item is in stock while Dynamics GP has nothing available, or the reverse, and customers order goods you cannot ship. Comparing means finding each SKU in GP and subtracting allocated from on hand for the right site.
Without PopdockAI
- Read stock for each product and variation
- Find the SKU in GP for the right site
- Subtract allocated from on hand
- Find the oversell from a customer
With PopdockAI
- Store stock is read for each product and variation
- GP available quantity is on hand less allocated, by site
- Differences are sorted by size
- In stock on one side only is flagged, and nothing is touched
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Compare WooCommerce stock with the quantity available in Dynamics GP for products in category {category} (default: all categories), up to {max-products} products (default 100), using GP site {site-id} (default: all sites combined), and report where the two disagree.
**Step 1: Read store stock (woocommerce)**
Call `woocommerce-get-product` with max-records set to {max-products} (default 100), and categories.contains set to {category} when it is given. For every product whose type is variable, call `woocommerce-get-product-variation` with its product-id. Keep the sku, name, stock-quantity and stock-status of each. A product or variation with no stock-quantity does not manage stock; keep it, but mark it as not managed.
**Step 2: Read GP quantities (dynamics-gp)**
For each SKU call `dynamics-gp-get-iv-item-quantity` with item-number set to the SKU. GP returns an overall record for all sites plus one record per site, told apart by record-type. Use the overall record, or the record for site {site-id} when it is given. Available quantity is quantity-on-hand minus quantity-allocated. If nothing comes back, record the SKU as not in GP.
**Step 3: Report**
1. Differences: SKU, name, store stock, GP on hand, GP allocated, GP available, difference. Sort by the largest absolute difference.
2. Store shows in stock but GP has nothing available.
3. GP has stock available but the store shows outofstock.
4. Not in GP, and not managed in the store.
5. Summary counts.
**Rules & Guidelines:**
* Tools whose names start with woocommerce- are on the woocommerce MCP server; tools whose names start with dynamics-gp- are on the dynamics-gp MCP server. If a tool from either server is not available, stop and say which server is not connected.
* If the user names a Dynamics GP company, pass it as company on every dynamics-gp call.
* Match a store SKU to a GP item number exactly, after trimming spaces. If that fails, try the SKU in upper case once. Never match on descriptions or partial codes.
* This prompt is read-only. Do not call `woocommerce-update-product`, `woocommerce-update-product-variation`, `dynamics-gp-iv-inventory-transaction-add` or `dynamics-gp-iv-inventory-transfer-add`. To fix store stock, point the user to the sync-stock-from-gp prompt.
**Validation:**
* If step 1 returns no products, say so and stop.
* If you cannot tell which GP record is the overall one, list every record for that item and say so rather than picking one.
* If {site-id} is given but an item has no record for that site, report its GP available quantity as 0 for that site and say the site has no record.
* Treat a negative GP available quantity as 0 when comparing, and show the real figure.Who it's for
One answer, three teams that use it
Inventory managers
Prevent overselling
Items in stock online but not available in GP are listed, so you can stop the sale.
Which WooCommerce products in the Tea category are in stock online but not available in GP?
Ecommerce managers
Sell stock you actually have
Items available in GP but out of stock online are listed, so sales are not lost.
Show items available in Dynamics GP at site WEST that WooCommerce says are out of stock.
Warehouse managers
Check one site against the store
Compare a single site's availability with web stock, differences largest first.
Reconcile WooCommerce stock with Dynamics GP site MAIN for the Equipment category.
How it works
What PopdockAI does when you ask
You name a category and optionally a GP site, and your AI assistant compares store stock with GP availability. It changes nothing in either system.
01
Ask
You name a category, and optionally a GP site.
02
Read
It reads store stock for each product and variation.
03
Compare
It reads GP on hand less allocated by exact SKU for the site.
04
Report
You get differences sorted by size, with nothing changed.
What PopdockAI provides
The tools behind the answer
Ready made tools for WooCommerce and one secure connection to your AI tool. No code, no exports.
woocommerce-get-product
woocommerce-get-product-variation
microsoft-dynamics-gp-get-iv-item-quantity
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
Overselling and hidden stock spotted early
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)
