Connectors

/

Microsoft Dynamics GP

/

Record a Dynamics GP inventory adjustment
Write

Correct stock with a reason, without driving it negative

For warehouse teams who want a Dynamics GP stock correction recorded at the right value after a count or damage, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Record a Dynamics GP inventory adjustment
Write off 6 damaged SD-200 docks at the MAIN site in Dynamics GP.
SD-200 at MAIN has 46 on hand and 10 allocated, so the decrease is allowed. - On hand: 46 before, 40 after - Unit cost: 118, value 708 - Reason: damaged in warehouse Shall I create the adjustment? It will not post to the ledger unless you ask.
Microsoft Dynamics GP
Sample figures. Your results come from your own account.
microsoft-dynamics-gp-get-iv-item
microsoft-dynamics-gp-get-iv-site
microsoft-dynamics-gp-get-iv-item-quantity
microsoft-dynamics-gp-iv-inventory-transaction-add
microsoft-dynamics-gp-iv-inventory-transaction-add-line
microsoft-dynamics-gp-get-iv-inventory-transaction

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

Stock corrections that drive inventory negative

Correcting stock in Dynamics GP after a count or damage means checking the item and site, making sure stock will not go below zero or below what is allocated, and costing it correctly. Lot and serial items need detail a quick adjustment cannot hold.

Without PopdockAI

  • Check the item and site are valid
  • Look up on hand and allocated quantities
  • Work out the value of the change
  • Find a negative balance after posting

With PopdockAI

  • The item and an active site are confirmed
  • Lot and serial tracked items are stopped
  • Decreases below zero or below allocated stock are refused
  • You see before and after and value, then it creates and reads back

The prompt

Use this prompt

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

Prompt
**Objective:** Adjust stock of `{item-number}` at site `{site-id}` by `{quantity-change}` units for reason `{reason}` (default ask), after the user confirms.

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: Item and site**

Call `dynamics-gp-get-iv-item` by `item-number` and `dynamics-gp-get-iv-site` by `site-id`. Stop if either is missing or the site is `inactive`. If the item is lot or serial tracked (`item-tracking-option`), stop: these tools cannot record lot or serial numbers.

**Step 2: Stock**

Call `dynamics-gp-get-iv-item-quantity` by `item-number` and find the row for `{site-id}`. For a decrease, stop if it would take on hand below allocated or below zero.

**Step 3: Confirm**

Ask for the document number and batch number. Value = quantity change times `current-cost`. Show the user exactly what will be written, field by field, and ask for explicit confirmation. Do nothing further without a clear yes. Show item, description, site, on hand before and after, quantity change, unit cost, value, reason, document number, batch.

**Step 4: Write**

1. Call `dynamics-gp-iv-inventory-transaction-add` once with `document-type` (adjustment), `document-number`, `document-date` today and `batch-number`. Do not set `post-to-g-l` unless the user asked.
2. Only if that succeeded, call `dynamics-gp-iv-inventory-transaction-add-line` once with `document-type`, `document-number`, `item-number`, `transaction-quantity` = `{quantity-change}`, `transaction-location` = `{site-id}`, `unit-cost` and `reason-code` when one fits.

If the line fails after the header succeeded, tell the user an empty adjustment document exists. Do not retry a failed write automatically. Report the error exactly as returned.

**Step 5: Verify**

Call `dynamics-gp-get-iv-inventory-transaction` by `document-number` and report what was stored.

**Rules & Guidelines:**

* The only write tools this prompt may call are `dynamics-gp-iv-inventory-transaction-add` and `dynamics-gp-iv-inventory-transaction-add-line`, once each, after Step 3.

**Validation:**

* If `{quantity-change}` is zero or not a number, stop and ask again.

Who it's for

One answer, three teams that use it

Warehouse managers

Write off damaged stock fast

Record damage with a reason in one message, and see the value of the write-off before it is saved.

Write off 3 damaged LP-10 printers at the EAST site in Dynamics GP, dropped in the warehouse.

Inventory controllers

Correct counts without negative stock

Decreases that would go below zero or below allocated stock are refused, so orders do not lose their stock.

Adjust CART-12 at MAIN down by 40 in Dynamics GP after the cycle count.

Cost accountants

See the value of every adjustment

Unit cost and total value are shown before you confirm, so write-offs are understood before they post.

What would it cost to write off 10 SD-200 docks at MAIN in Dynamics GP? Record it if under 2,000.

How it works

What PopdockAI does when you ask

You give the item, site, quantity and reason, and your AI assistant checks Dynamics GP stock first. The adjustment is created only after you approve, and it posts to the ledger only if you ask.

01

Ask

You give the item, site, quantity change and reason.

Your AI tool

02

Check

It confirms the item and site and stops on lot or serial tracked items.

microsoft-dynamics-gp-get-iv-item
microsoft-dynamics-gp-get-iv-site
microsoft-dynamics-gp-get-iv-item-quantity

03

Confirm

You see on hand before and after, unit cost and value, and approve.

No items found.

04

Create

It creates the adjustment and reads it back, posting only if you ask.

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

Returns inventory site (warehouse location) records from Dynamics GP Inventory, including address, phone and tax schedule details. Filter by site ID, inactive, city, description, zip code, state and country, and pick the company and the maximum number of records.
get-data

microsoft-dynamics-gp-get-iv-item-quantity

Returns item quantity records by site from Dynamics GP Inventory, including quantities on hand, allocated, on order and back ordered. Filter by quantity on hand, item description, location code from item master, item class code, item type, record type and item number, and pick the company and the maximum number of records.
run-action

microsoft-dynamics-gp-iv-inventory-transaction-add

Adds an inventory transaction in Dynamics GP through eConnect; GP defaults any field not listed. Requires document type, document date, document number and batch number. Optional: post to GL. Writes to the live Dynamics GP company database.
run-action

microsoft-dynamics-gp-iv-inventory-transaction-add-line

Adds an inventory transaction line in Dynamics GP through eConnect; GP defaults any field not listed. Requires item number, document type and document number. Optional: line sequence number, transaction quantity, reason code, transaction location, unit of measure and unit cost. Writes to the live Dynamics GP company database.
get-data

microsoft-dynamics-gp-get-iv-inventory-transaction

Returns inventory transaction lines from Dynamics GP Inventory, such as adjustments, variances and transfers, with item, location, quantity and cost. Filter by batch number, document status, item description, document number, document type, transaction location, document date and extended cost, 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

Stock corrected with a reason and the right value

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