Email automationPriority ERP Agent view

How to automate inbound email into Priority ERP

Short answer

Read a shared mailbox through Microsoft Graph or IMAP, classify and extract each message, match it to Priority customers, suppliers and parts, and load it as a draft through the API or a Priority load interface. A person reviews anything below a confidence threshold.

In most Priority shops, orders still arrive by email: a customer PO as a PDF, a spreadsheet with line items, or a plain message saying 'same as last time, 500 more'. Someone in customer service opens it and keys a sales order, and the same thing happens with supplier acknowledgments and RFQ replies.

Priority has strong import tooling, which is the useful part here. Its interfaces load data into tables with the same business rules as manual entry, so the email project is mostly about producing clean, matched input and routing exceptions, not about bypassing the system.

This page focuses on the mailbox-to-Priority pipeline, the matching problems unique to ERP master data, and the review queue that makes it safe.

What teams use it for

Customer PO emails to draft sales orders

Extract customer, PO number, parts, quantities, prices and requested dates, match to customer and part master, and create a draft order for review.

Supplier order acknowledgments

Read acknowledgment emails, find the purchase order, and propose updated confirmed dates for the buyer to accept.

RFQ requests from customers

Turn a request for quote into a draft price quote with matched parts and flagged unknowns, ready for the estimator.

Invoice emails to accounts payable

Route invoice attachments into the capture flow and match them to open purchase orders and receipts.

Shipping notice and delay emails

Pick up carrier and supplier notices, link them to deliveries or purchase orders, and add a note or alert the planner.

Priority ERP integration surface

  • Priority OData REST API for reading customers, parts, price lists and open orders for matching, and for creating draft documents.
  • Priority interfaces, which load rows into a target form's tables with validation; typically driven from a staging table or file and configurable per document type.
  • Priority's own mail functions and attachments on documents, useful for storing the original email or PDF against the order for audit.
  • Part cross-reference and customer-specific part number tables, where available, which are the key to matching customer part numbers to your internal ones.
  • Document status and approval flow, which lets you land the load in a draft status that normal users must finalize.

How it works

  1. 1

    Connect to the mailbox

    Use Microsoft Graph with application permissions limited to one shared mailbox, or IMAP with an app password. Move processed mail to folders rather than deleting.

  2. 2

    Classify the message

    Sort into PO, acknowledgment, RFQ, invoice, other. Start with sender and keyword rules and add a model for the long tail.

  3. 3

    Extract the fields

    Parse attachments (PDF, Excel, CSV) and the body into a common structure with confidence per field. Spreadsheet formats from repeat customers can be handled with fixed mappings.

  4. 4

    Match to master data

    Resolve the sender to a customer, map customer part numbers through cross-references, and check price against the customer's price list. Anything unmatched goes to review.

  5. 5

    Stage and load

    Write matched results to a staging table and use the API or a load interface to create a draft order with the original email attached.

  6. 6

    Review queue

    Show low-confidence lines side by side with the source, let the user fix mappings, and learn the fix as a stored cross-reference for next time.

Example flows

PDF purchase order from a repeat customer

Trigger: An email with a PO attachment arrives in the orders mailbox.

  1. The sender domain and customer reference identify the account.
  2. The PDF is parsed into header and line items.
  3. Customer part numbers are mapped through the cross-reference table.
  4. Price differences against the price list are flagged.
  5. A draft sales order is created and the email stored as an attachment.

Result: A clean PO becomes a draft in under a minute, and a clerk only checks flagged lines.

Supplier acknowledgment with new date

Trigger: A supplier replies to a PO with revised dates.

  1. The PO number is found in the subject or body.
  2. Lines and dates are extracted and compared with the open PO.
  3. Date changes beyond a tolerance create a proposal row for the buyer.
  4. The buyer accepts, and the confirmed date is updated in Priority.

Result: Buyers see date slips on one screen instead of hunting through inboxes.

Keeping data on-prem

Email content and ERP master data are both commercially sensitive, so keep extraction on infrastructure you control. Run the pipeline next to Priority, read the mailbox through a narrowly scoped account, and use an open-weight model on local GPUs for classification and extraction rather than sending customer POs to a third-party API. Store raw emails in your own file share, keep the staging table in your database, and expose nothing inbound. If your mail is in a cloud tenant, only the mailbox API call crosses the boundary.

Security checklist

  • Limit mailbox access to one shared mailbox with a scoped application permission or dedicated account.
  • Treat email as untrusted input: scan attachments, strip active content and guard against prompt injection in message bodies.
  • Never auto-finalize financial documents; land drafts and require a human to release.
  • Verify sender identity beyond display name, using domain checks and known contact lists, to resist spoofed POs.
  • Retain the original message with the draft for audit and dispute resolution.

Ways to get it done

Priority load interface plus rules

Effort: Days per customer template.

Works for customers who send structured spreadsheets in a stable layout.

Commercial order-capture product

Effort: Weeks of onboarding plus subscription cost.

Suitable if volume is high and the vendor supports your Priority version and local-language documents.

Custom pipeline with a partner like Netray

Effort: Pilot on one mailbox in a few weeks, then widen.

Good when formats vary, data must stay private, and you want cross-reference learning and an on-prem model.

Pitfalls

  • !Trusting a sender name instead of the domain, which opens the door to fake POs.
  • !Skipping customer part cross-references, which creates the most common mismatch.
  • !Auto-creating customers or parts from unmatched emails and polluting master data.
  • !Reprocessing the same email after a retry and creating duplicate drafts; use the message id as an idempotency key.
  • !Ignoring replies and threads, where the latest message may change quantities of an earlier PO.

Frequently asked questions

Can Priority import orders from email by itself?

Priority has strong import interfaces but I would not assume native email parsing for free-form messages in your version. A separate pipeline normally reads and extracts the email, then feeds the data into Priority through the API or an interface.

Should the system create orders automatically?

Create drafts, not finalized orders, at least until you have weeks of measured accuracy. Auto-release can be considered for a small set of trusted customers with exact part and price matches, with periodic sampling.

How accurate is extraction from PDFs?

It varies by layout quality and customer. Clean digital PDFs from repeat customers are far easier than scans or free-text emails. Measure on your own mail for a few weeks and set thresholds from the results rather than a vendor claim.

Does the original email stay with the order?

It should. Attach the message and its attachments to the draft document so the reviewer and later auditors can compare the order to the source. Store a link or hash if you keep raw mail outside Priority.

Can this run without sending mail to a cloud AI?

Yes. Classification and extraction can be done with open-weight models on local GPUs, with the mailbox read by a scoped account. Smaller layouts are often handled with rules and templates, with the model reserved for the messy cases.

Want Email automation working on your Priority ERP?

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

Get a free assessment