Connectors

/

Microsoft Dynamics GP

/

Create a Dynamics GP customer return
Write

Authorize returns against a real sale at the right price

For support and operations teams who want a Dynamics GP return raised with the right codes and price, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Create a Dynamics GP customer return
Raise a return in Dynamics GP for Contoso: 5 units of LP-10 label printers, arrived damaged.
Contoso bought 20 LP-10 printers on INV-1042, so the return is valid. - Item: LP-10, 5 units at the last invoice price of 228 - Return type: credit, as used on recent returns - Reason: DAMAGED - Address: Contoso main warehouse Shall I create the RMA? No credit is issued at this step.
Microsoft Dynamics GP
Sample figures. Your results come from your own account.
microsoft-dynamics-gp-get-rm-customer
microsoft-dynamics-gp-get-rm-customer-address
microsoft-dynamics-gp-get-rm-sales-line-item
microsoft-dynamics-gp-get-srv-rma
microsoft-dynamics-gp-get-srv-rma-line
microsoft-dynamics-gp-srv-rma-add
microsoft-dynamics-gp-srv-rma-line-add

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

Return authorizations raised against no real sale

Raising a customer return in Dynamics GP means checking the customer bought the item, finding the invoice price and picking return codes from setups you rarely see. If the line fails after the header, you are left with an empty RMA.

Without PopdockAI

  • Search the customer's sales history for the item
  • Look up the price on the last invoice
  • Guess the return type and reason code
  • Clean up an empty RMA when the line fails

With PopdockAI

  • Sales history is checked, with a warning if they never bought it
  • The last invoice price is used
  • Return codes already in use are reused, or it asks
  • You confirm every field, and an empty RMA is reported if a line fails

The prompt

Use this prompt

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

Prompt
**Objective:** Create a return (RMA) for `{quantity}` of `{item-number}` from `{customer-name}` because `{reason}` (default ask), after checking the sale and getting the user's confirmation.

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: Customer and address**

Call `dynamics-gp-get-rm-customer` with `customer-name.contains` (or `customer-id`); if several match, list them and stop. Call `dynamics-gp-get-rm-customer-address` by `customer-id` for the `address-code` to use.

**Step 2: Was it sold to them?**

Call `dynamics-gp-get-rm-sales-line-item` by `customer-id` and `item-number`. Take the most recent invoice line's `unit-price` and `sop-number`. If they never bought the item, or bought fewer than `{quantity}`, warn the user.

**Step 3: Codes to reuse**

Call `dynamics-gp-get-srv-rma` by `customer-id` (or unfiltered, a few rows) to see the `return-record-type`, `return-type` and `return-status` values in use, and `dynamics-gp-get-srv-rma-line` for `rma-reason-code` values. Pick the reason code that fits `{reason}`, or ask.

**Step 4: Confirm**

Ask the user for the RMA number (return document id) and the site it returns to. Show the user exactly what will be written, field by field, and ask for explicit confirmation. Do nothing further without a clear yes. Show customer, address, RMA number, type, reason code, item, quantity, unit price, original invoice.

**Step 5: Write**

1. Call `dynamics-gp-srv-rma-add` once with `return-document-id`, `record-type`, `customer-id`, `address-id`, `rma-type`, `rma-reason-code`, `return-status` and `site-id`.
2. Only if that succeeded, call `dynamics-gp-srv-rma-line-add` once with `return-document-id`, `line-sequence-number`, `type`, `customer-id`, `address-code`, `item-number`, `return-quantity` and `quantity` set to `{quantity}`, `unit-price`, `rma-reason-code` and `location-code`.

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

**Step 6: Verify**

Call `dynamics-gp-get-srv-rma-line` by `return-document-id` and report the stored line.

**Rules & Guidelines:**

* The only write tools this prompt may call are `dynamics-gp-srv-rma-add` and `dynamics-gp-srv-rma-line-add`, once each, after Step 4.
* Do not issue a credit; the RMA is the return authorisation only.

**Validation:**

* If `{quantity}` is not a positive number, stop and ask again.

Who it's for

One answer, three teams that use it

Customer service reps

Raise a return while the customer waits

Check the sale and create the RMA in one conversation, without looking up codes or old invoices.

Create a return in Dynamics GP for Fabrikam: 2 units of SD-200, wrong item shipped.

Returns coordinators

Stop returns for items never bought

A warning appears when the customer never bought the item or is returning more than they bought.

Northwind Traders wants to return 12 CART-12 cartridges. Did they buy that many, and can you raise the RMA?

Customer support managers

Keep return codes consistent

Reusing the codes already in use keeps returns reporting clean, so reasons can be totalled later.

Raise a Dynamics GP RMA for Contoso for 1 LP-10 printer that arrived faulty, using our usual codes.

How it works

What PopdockAI does when you ask

You give the customer, item, quantity and reason, and your AI assistant checks the sale in Dynamics GP first. The RMA is created only after you approve every field, and no credit is issued.

01

Ask

You give the customer, item, quantity and reason.

Your AI tool

02

Check

It confirms they bought the item and takes the last invoice price.

microsoft-dynamics-gp-get-rm-customer
microsoft-dynamics-gp-get-rm-customer-address
microsoft-dynamics-gp-get-rm-sales-line-item
microsoft-dynamics-gp-get-srv-rma
microsoft-dynamics-gp-get-srv-rma-line

03

Confirm

You approve every field, including the return codes it reuses.

No items found.

04

Create

It creates the RMA and its line and reads the line back.

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-rm-customer

Returns customer records from Dynamics GP Receivables Management, including contact details, class, terms and balances. Filter by salesperson ID, hold, customer name, state, zip, customer balance, customer class and city, and pick the company and the maximum number of records.
get-data

microsoft-dynamics-gp-get-rm-customer-address

Returns customer address records from Dynamics GP Receivables Management, including contact, address, phone and the salesperson and territory for each address. Filter by salesperson ID, state, customer ID, country, zip, city, address code and customer name, 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.
get-data

microsoft-dynamics-gp-get-srv-rma

Returns return material authorizations from Dynamics GP Field Service, including the customer, return type and status, dates and originating service call. Filter by customer ID, return status, service call number, return type, customer name, return document ID, entry date and office ID, and pick the company and the maximum number of records.
get-data

microsoft-dynamics-gp-get-srv-rma-line

Returns return material authorization lines from Dynamics GP Field Service, with the customer, returned item, quantity, status, reason and dates. Filter by return document ID, entry date, return status, extended price, item number, customer ID, return type and customer name, and pick the company and the maximum number of records.
run-action

microsoft-dynamics-gp-srv-rma-add

Adds an RMA in Dynamics GP through eConnect; GP defaults any field not listed. Requires record type, return document ID and customer ID. Optional: return status, site ID, contact, return reference, address ID and eta date. Writes to the live Dynamics GP company database.
run-action

microsoft-dynamics-gp-srv-rma-line-add

Adds an RMA line in Dynamics GP through eConnect; GP defaults any field not listed. Requires line sequence number, type, customer ID, address code, item number and return document ID. Optional: location code, return quantity, unit price, return item number, item description and RMA reason code. Writes to the live Dynamics GP company database.
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

Returns tied to a real sale at the right price

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