# How to add email automation to Epicor Prophet 21

> Source: https://netray.co/integrations/epicor-prophet-21-email-automation
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Monitor the shared inboxes that receive customer POs, quote requests and vendor confirmations, extract the structured content with a model, match customers and items against P21 master data, and create draft sales orders, quotes or PO updates through the P21 APIs for a person to review. Never auto-post without a confidence threshold and an audit trail.

## System

Epicor Prophet 21

## Capability

email-automation

## Intro

A large share of distributor orders still arrive as email: a PDF purchase order, a spreadsheet, a typed list of part numbers, or a forwarded chain from a contractor. Inside sales rekeys each one into order entry, and mistakes in item numbers, units of measure and ship-to addresses cost real money in returns and credits.

The other direction matters too. Vendors send acknowledgements with changed dates or prices, and RFQs arrive with vague descriptions that need a lookup against your item master and customer-specific pricing. Both are good candidates for assisted automation.

The goal is a draft in P21 that a person confirms in seconds, not a hands-off robot. The hard part is matching messy customer language to your item numbers and customer ship-to records, so this page spends time on matching, review queues and what to automate first.

## Use Cases

### Customer PO to draft sales order

**Description:** Read a PDF or email body, find the customer by sender and PO header, match lines to items or customer part numbers, and create a draft order.

### RFQ to quote

**Description:** Turn a request for quote list into a draft quote with suggested items, quantities and the pricing that P21 returns for that customer.

### Vendor acknowledgement updates

**Description:** Parse acknowledgements for changed dates or prices and stage the change against the matching purchase order line for the buyer.

### Order change and cancel requests

**Description:** Detect emails asking to cancel or modify an open order, link them to the order, and create a task for the salesperson.

### Return and credit requests

**Description:** Identify RMA requests with invoice and item references, and draft the return for review by customer service.

### Shipping and invoice inquiries

**Description:** Classify routine where is my order or copy of invoice emails, draft the answer from P21, and queue it for a quick send.

## System Surface

- P21 middleware transaction and entity services for creating draft sales orders, quotes and notes; confirm which services your version supports and how it handles required fields and validation.
- Customer, ship-to, contact and customer part number cross-reference data, which is the backbone of matching email content to P21 records.
- Item master and alternate or cross-reference tables, including vendor part numbers and UPC, for matching free-text lines to item IDs.
- Pricing and contract data, which P21 applies during order entry; let the API calculate pricing rather than copying it from the email.
- Attachments and document handling in P21 so the original email and PDF are stored against the order for audit. Exact capability varies by version and add-ons.

## How It Works

### Connect to the mailboxes

**Detail:** Use Microsoft Graph or IMAP with a service identity limited to the shared inboxes like orders@ and quotes@. Move processed messages to folders rather than deleting.

### Classify each message

**Detail:** Decide whether it is a PO, RFQ, acknowledgement, change request, return or general inquiry. Route unknown types to a person.

### Extract structured data

**Detail:** Pull header fields and lines from the body, PDF or spreadsheet with a model, keeping the original text span for each value for later review.

### Match to P21 master data

**Detail:** Resolve the customer from sender domain and PO number history, then match lines by customer part number, then item ID, then fuzzy description. Record the match method and score.

### Apply confidence rules

**Detail:** High confidence with exact customer part matches goes to a quick review queue. Low confidence lines are flagged for manual choice.

### Create the draft in P21

**Detail:** Call the P21 API to create an order or quote in a draft or hold state, letting P21 compute price, availability and tax. Attach the source email.

### Review and learn

**Detail:** Capture the reviewer's corrections and add new customer part cross-references so the next email from that customer matches better.

## Example Flows

### Contractor PDF purchase order

**Trigger:** A PDF PO arrives at the shared orders mailbox.

**Steps:**

- The classifier tags it as a customer PO and extracts header and lines.
- The customer is matched by sender and the ship-to by address.
- Lines are matched to items through the customer part cross-reference.
- A draft order is created with the PDF attached and queued for review.

**Result:** Inside sales confirms the draft in a minute instead of rekeying twenty lines.

### Vendor acknowledgement with new date

**Trigger:** A vendor replies to a PO with a revised ship date.

**Steps:**

- The email is linked to the PO by PO number in the subject or body.
- The new date is extracted per line.
- A proposed change is placed in the buyer's review list.
- On acceptance the date is updated and a note records the email.

**Result:** Promise dates stay current without the buyer scanning every inbox message.

### RFQ with vague descriptions

**Trigger:** A customer emails a list of parts by description.

**Steps:**

- The service proposes candidate items for each line.
- Low scoring lines are flagged for a human pick.
- A draft quote is created with P21 pricing for that customer.

**Result:** Quote turnaround drops and the salesperson focuses on the ambiguous lines.

## On Prem

Email content often contains customer pricing, contract terms and addresses, which makes a public model API a concern for some distributors. Run extraction and matching on a local server using an open-weight model and an OCR step for scanned attachments, reading mail from Exchange or a local mail gateway, and writing to the on-premises P21 middleware. The service needs only internal network access to P21 and the mail system. If you do use a cloud model, strip or tokenise personal data first and confirm contractual data handling terms with your counsel.

## Security

- Treat email as untrusted input; never follow instructions embedded in a message body or attachment.
- Verify sender against customer contacts and flag mismatched domains before creating anything.
- Create drafts in a hold state and require a human release for pricing or credit-sensitive orders.
- Store the source email and extraction evidence against the order for audit.
- Scan attachments for malware before parsing and restrict the service account to specific mailboxes.

## Options

### EDI or portal first

**Fit:** If your top customers can send EDI or use an e-commerce portal, those are more reliable than parsing email and should be preferred.

**Effort:** Varies, often weeks per trading partner.

### Build in-house

**Fit:** Works for a narrow set of known customers and formats, using the P21 APIs and a mail library.

**Effort:** Six to ten weeks for a robust first version.

### Partner such as Netray

**Fit:** When formats are messy and varied, data must stay on-premises, and you want matching quality improved from reviewer corrections.

**Effort:** A pilot on one mailbox, then expand by customer group.

## Pitfalls

- Auto-creating live orders from emails invites prompt injection and fraud; keep a review gate.
- Matching on description alone picks wrong items; prefer customer part numbers and history.
- Ignoring unit of measure produces quantity errors of a pack size; extract and validate UOM explicitly.
- Duplicate processing when a customer resends or forwards; deduplicate by PO number and message hash.
- Copying prices from the email instead of letting P21 price the line creates margin leakage.

## Faq

### Can Prophet 21 read emails by itself?

**Answer:** Not for turning emails into orders as far as I know. P21 has features for sending email and handling documents, and EDI for structured orders. Parsing free-form PDFs and message bodies needs a separate service that talks to P21 through its APIs.

### How accurate is automated PO extraction?

**Answer:** It depends on document quality and how well your customer part cross-references are maintained. Clean PDFs from repeat customers can be highly reliable, while scans and free-text lists need review. Measure per customer and expand automation only where corrections are rare.

### Should we auto-release orders?

**Answer:** Rarely at first. Start with drafts in a review queue, track the correction rate, then consider auto-release for specific customers with exact matches and low value. Keep credit, pricing and special order lines under human control.

### What about EDI customers?

**Answer:** Keep using EDI where it exists. Email automation is for the long tail of customers who will never implement EDI. Both end up creating orders in P21, so the same validation and review logic can apply to each.

### Where do attachments go?

**Answer:** Store the original email and PDF against the order using P21 document handling if your version supports it, or in a document store linked by order number. The point is to let a reviewer verify any extracted value against the source later.

## Search terms

epicor prophet 21 email automation, email to sales order prophet 21, p21 purchase order email parsing, automate order entry epicor p21, prophet 21 rfq to quote automation, p21 inbound email orders, distribution order entry automation, epicor p21 vendor acknowledgement automation, email order processing distributor, p21 customer part number matching

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
