Articles in this section

Process orders from trading partners that don't use EDI

You can automate purchase orders from trading partners that send orders as PDF or spreadsheet files — by email or file upload, instead of EDI — with a flow that reads each order with intelligent document processing, validates it against your customer and item records, and creates the sales order in your ERP. The flow runs alongside your B2B Manager EDI flows, so every partner reaches the same order process.

Use this pattern for the partners that EDI doesn't cover: smaller customers, new partners during onboarding, and partners that send occasional orders. Nothing changes for the partner.

How the flow works

  1. Receive — Partners upload orders to their own SFTP account that Celigo hosts, or email them to a shared mailbox.
  2. Classify — Optional: an AI agent confirms that each file is a purchase order and routes anything else to review.
  3. Extract — An AI agent reads each order — PDF, scanned PDF, Word, or Excel — and returns the header and lines in your order schema.
  4. Validate — Lookups match the partner, ship-to address, and items to your records, and checks compare prices and units of measure.
  5. Create — The flow creates the sales order in your ERP with the same field mappings your EDI orders use.
  6. Review — Orders that fail a check wait in error management with a message that explains what to fix.

Prerequisites:

  • Turn on intelligent document processing for your account. See Turn on intelligent document processing.
  • Collect sample orders from each partner, including multi-page orders and any scanned or spreadsheet orders.
  • Decide how you'll match each partner's item numbers to yours — for example, a cross-reference in your ERP or a lookup cache.

Give partners a place to send orders

Partners can upload orders to a Celigo-hosted SFTP account of their own (see Celigo-hosted file server overview), email them to a shared mailbox that the Google Mail (Gmail) or Microsoft Outlook Mail connector reads, or upload them to your existing FTP or SFTP server. Keep the partner's identity with each order — the folder it arrived in or the email sender — so the flow can find the customer record and the partner's item cross-reference. For how each source brings files into a flow, see Extract data from documents.

Extract the order

Build the extraction agent as described in Extract data from documents, with an order schema in place of the invoice schema: the PO number, dates, currency, and payment terms; a ship_to address object; a lines array with the buyer's item number, UPC, description, quantity, unit of measure, and unit price; and the needs_review and review_reasons fields.

Add instructions for the details that vary most between partners:

  • Copy item numbers, UPCs, and the PO number exactly as printed. Return UPCs as digits only.
  • Return the unit of measure the buyer printed for each line; don't convert quantities between units.
  • If a line has no price, return null for unit_price.
  • Don't return totals, taxes, freight, or notes as lines.

For a partner whose spreadsheet orders have the same layout every time, a file definition is faster and costs less than an agent.

Validate the order

Add these checks after the agent, and bring their results into the record with response mapping:

  • Partner and customer — Find the customer record from the partner's folder or email sender.
  • Ship-to address — Match the extracted address to the customer's ship-to addresses.
  • Items — Translate each buyer_item_number or upc to your item with the partner's cross-reference.
  • Prices and units — Compare each line's price and unit of measure to the customer's price list within your tolerance.
  • Duplicates — Search for an existing sales order with the same customer and PO number.

Create the sales order

Map the validated fields to your ERP's sales order the same way your EDI order flow maps an EDI purchase order, so orders from every partner look the same to fulfillment, invoicing, and reporting. Store the original PO number and the source file name on the order for traceability.

Route exceptions to your team

Orders that fail a check — an unknown item, a price outside tolerance, a missing ship-to address, a duplicate PO number, or needs_review set to true — wait in error management with a message that explains what to fix. Your team corrects the retry data and retries the order. See Validate extracted data and route exceptions for review.

When the same correction repeats, add it to the partner's item cross-reference or to the agent's instructions, so the next order goes through on its own.

Classify mixed partner files

When partners drop several kinds of files in the same place — EDI files and PDF orders, or orders and invoices — classify each file before you extract it, or start from the AI EDI Document Classify-and-Route Agent template in Marketplace. See Classify documents and route them by type.

Related articles