Email automationMicrosoft Dynamics GP Agent view

How to automate email in Microsoft Dynamics GP

Short answer

Monitor shared mailboxes, classify each message, extract fields from the body and attachments, and stage the result for review. Approved items are posted into GP through eConnect, so sales orders, receipts and payables invoices carry full validation.

In many GP companies the real order entry system is a shared inbox. Customers email purchase orders as PDFs, suppliers email order acknowledgements and packing lists, and AP receives invoices at an address that a clerk empties twice a day. Each one is re-keyed into Sales Order Processing, Purchase Order Entry or Payables Transaction Entry.

GP itself is good at sending email, with documents going out by Word Templates or email series, but it has little for receiving. There is no inbound parser, so automation has to sit beside GP.

The aim here is not to remove clerks but to remove typing: the clerk reviews a pre-filled transaction and approves it.

What teams use it for

Customer PO to sales order

Emailed purchase orders are parsed for customer, item numbers, quantities, ship-to and requested date, then staged as a draft SOP order for entry clerk review.

Supplier order acknowledgements

Acknowledgements are matched to open POs and compared with GP promise dates; changes are flagged for the buyer rather than silently applied.

Vendor invoices to payables

Invoices from a mailbox become payables transactions with vendor id, document number, amount and distributions, ready to review in a batch.

RFQ intake for quotes

Inbound requests for quote are identified, items matched to the item master, and a quote draft is started for the sales engineer.

Shipping notices and tracking

Carrier and supplier ASNs update expected receipt dates and attach tracking numbers to the PO record's notes for receiving.

Microsoft Dynamics GP integration surface

  • eConnect is the supported way to insert transactions: taSopHdrIvcInsert with taSopLineIvcInsert for sales documents, taPMTransactionInsert for payables, and the POP receipt procedures for receivings. Procedure names and parameters vary by release, so check your eConnect documentation.
  • Reference data lives in SQL tables such as RM00101 customers, PM00200 vendors and IV00101 items, plus cross-reference tables like item vendor and customer item cross references. Matching depends on how clean these are.
  • Document Attachment Management lets users attach files to GP records, useful for storing the original email or PDF beside the transaction.
  • Integration Manager and Table Import are older, still-supported paths for loading from CSV. They suit a staged file drop if you do not want to write .NET.
  • Outbound email from GP uses SMTP or Outlook settings, which you can reuse for acknowledgements and exception notices.

How it works

  1. 1

    Connect the mailbox

    Use Microsoft Graph for Exchange Online, or IMAP/EWS for on-prem Exchange. Read from dedicated shared mailboxes, not personal ones.

  2. 2

    Classify the message

    Decide if it is a PO, invoice, acknowledgement, RFQ or noise. Rules and sender whitelists first; a language model can handle the ambiguous tail.

  3. 3

    Extract fields

    Parse body text and attachments. For PDFs and scans combine OCR with a model that returns structured JSON against a fixed schema.

  4. 4

    Match against GP master data

    Resolve customer, vendor and item using cross references and fuzzy matching with thresholds. Unmatched lines are marked, never guessed.

  5. 5

    Stage and review

    Write drafts to a review table showing extracted values beside the source. The clerk edits and approves in a simple web page.

  6. 6

    Post with eConnect

    On approval, a service builds the eConnect XML, posts the document to the batch, and stores the GP document number against the email.

  7. 7

    Reply and close the loop

    Send an acknowledgement to the sender, with the GP order number, and archive the message with a link to the transaction.

Example flows

Emailed customer PO becomes a draft order

Trigger: New message with a PDF in the orders mailbox

  1. Classifier tags it as a customer PO from a known sender domain.
  2. Extractor returns PO number, ship-to, lines and requested date.
  3. Items are matched using customer item cross reference; two lines come back unmatched.
  4. Clerk fixes the two lines on the review page and approves.
  5. eConnect creates the order in the chosen SOP batch and the customer gets a confirmation.

Result: Entry drops from several minutes of typing to a short review, with the source PDF attached.

Vendor invoice mismatch caught before posting

Trigger: Vendor invoice arrives in the AP mailbox

  1. Extraction reads vendor, invoice number, amount and PO reference.
  2. The service checks the PO and receipt data for quantity and price.
  3. A price variance over tolerance is flagged for the buyer.
  4. The payable is staged on hold until the buyer responds.

Result: AP stops paying invoices that disagree with the PO, with an audit trail of why.

Keeping data on-prem

The mailbox can be Exchange Online or on-prem Exchange; either way the processing service can run inside your network and talk to SQL Server and eConnect locally. The sensitive step is extraction: sending vendor invoices and customer POs to a public AI API may violate customer contracts or export rules. Run OCR and a small open-weight model on a local GPU or CPU server, keep the review UI internal, and only the mailbox traffic crosses your boundary. Store original emails and parsed JSON in a location covered by your normal backups and retention, since they become audit evidence.

Security checklist

  • Limit mailbox permissions to the specific shared mailboxes; use app-only Graph permissions with scoped access.
  • Never auto-open attachments on a machine with GP access; sandbox conversion of PDFs and Office files.
  • Treat sender domain and DKIM/SPF results as inputs; invoice fraud by spoofed email is common.
  • Require approval for new vendor bank details and any master data change.
  • Retain source email, extracted values, reviewer and GP document number together.

Ways to get it done

AP or order-entry automation product with GP support

Effort: Weeks plus subscription

Fast for invoices if your volume and layout fit the vendor's templates. Check GP version support and per-document pricing.

Build in-house with Graph, OCR and eConnect

Effort: Two to four months for one document type

Fits teams with .NET and data skills who want control and low run cost.

Netray with a GP partner

Effort: Pilot in weeks, per document type

When documents must stay on-prem and you want model-based extraction with confidence thresholds and clerk review.

Pitfalls

  • !Auto-posting without review; one misread quantity becomes a real shipment or payment.
  • !Matching items on description rather than on cross references or stable item numbers.
  • !Ignoring duplicates: the same invoice emailed twice must be caught by vendor plus document number.
  • !Forgetting GP periods and batch status. Posting into a closed period or a locked batch fails and loses the item.

Frequently asked questions

Can GP read incoming email itself?

No. GP can send documents by email but does not parse inbound messages into transactions. You add a service that reads the mailbox, extracts data, and submits it to GP through eConnect or a supported import tool.

Which GP transactions are easiest to automate from email?

Payables invoices and customer POs are the usual starting points. They have clear fields and high volume. Complex items such as drawings or configured products need more review and more careful item matching.

Do we have to use eConnect?

It is the most robust supported path. Integration Manager or Table Import with a CSV can work for lower volumes. Avoid direct table inserts because they skip GP's business logic and can corrupt data.

How accurate is automated extraction?

It depends heavily on document quality and layout variety. Expect clean digital PDFs to do well and scans to need more review. Use confidence thresholds and measure error rate on your own samples before reducing review.

Can this keep the original email with the transaction?

Yes. Use Document Attachment Management or store the message in a controlled repository and write its link into a note or reference field on the GP document.

Want Email automation working on your Microsoft Dynamics GP?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment