Supplier invoice: from email to an ERP document
The accounting inbox receives invoice INV-2048 from an approved supplier. Purchase order PO-531 already exists in ERP for four units at $310 each, totaling $1,240 before tax. The incoming invoice specifies the same items and net amount.
The pipeline downloads the attachment and extracts the supplier, invoice number, purchase order reference, item lines, and amount. It checks the supplier record, duplicate invoice numbers, quantities, prices, and whether company rules allow the document to be created.
Once the checks pass, the system creates an incoming invoice draft in ERP, attaches the source file, and records the operation identifier. It does not trigger a payment: payment authority and mandatory approvals remain separate controlled processes.
Processing workflow
- EmailReceiving the email
The invoice and attachment enter processing.
- OCR / LLMExtracting invoice details
Invoice number, purchase order, items and amount.
- Rules / ERPValidating the data
Supplier, duplicates and purchase order reconciliation.
- ERP APICreation request
Create a draft without initiating payment.
- ERPConfirming the outcome
Verify the created draft and attachment.
- PostgreSQLAudit log and next step
Record the processing outcome.
Data and outcome
| Field | Demo value |
|---|
| Invoice | INV-2048 |
| Purchase order | PO-531 |
| Items | 4 × $310 |
| Net amount | $1,240 |
| Supplier | Approved master-data record |
| Outcome | ERP draft created; no payment initiated |
Customer request: a reply based only on verified facts
A signed-in customer asks through the portal: “What is the status of order ORD-2451?” Instead of searching CRM and ERP manually, the system maps the query to the account, verifies access to the order, and retrieves the current status from the authoritative source.
ERP reports: “Handed over to the carrier.” The system writes a short response using that confirmed status, sends it to the portal, and records the response time. An LLM may help with wording or language, but it must not alter factual ERP content.
If the customer is not authorized or the current order status is unavailable, the system neither exposes another customer’s data nor invents a status. It returns a safe response and records the reason.
Processing workflow
- Customer portalReceiving the request
A question about order ORD-2451.
- Account / permissionsIdentity and access
Verify the customer and order ownership.
- ERP APIRetrieving the facts
Current status from the authoritative source.
- Rules / optional LLMPreparing the reply
Wording based on verified ERP fields.
- Customer portalSending the message
The reply is sent to the customer portal.
- PostgreSQLConfirmation and audit log
Record delivery and the request outcome.
Data and outcome
| Step | Automated behavior |
|---|
| Identity | Map the request to the authenticated customer |
| Access | Verify authorization for ORD-2451 |
| Facts | Read the current order status from ERP |
| Response | Use only confirmed fields |
| Outcome | Reply delivered; audit event stored |
Website order: coordinated CRM and ERP actions
A website receives order #8032 for three units of a product. ERP reports 12 units available. The pipeline receives the order, finds or creates the customer record in CRM, validates required fields, and registers the order in ERP.
ERP reserves three units, reducing the quantity available to new orders from 12 to 9. Physical on-hand stock remains 12 until goods are dispatched. A document draft is prepared, CRM receives the updated status, and the customer receives an order acceptance and reservation confirmation.
If fewer than three units are available, the pipeline does not claim a successful reservation or promise shipment. It sets the appropriate status and initiates the configured stock review or replenishment route.
Processing workflow
- WebsiteOrder event
Order #8032 for three units.
- CRMValidation and customer record
Required fields and customer lookup or creation.
- ERP APIRegistering the order
Send the order and verify the ERP response.
- ERP / rulesChecking stock
Quantity available for the new order.
- ERP APIRequesting a reservation
Request three units without promising dispatch.
- ERPConfirming the reservation
Verify the actual reservation outcome.
- CRM / notificationsStatus, notification and audit log
CRM and the customer receive the confirmed outcome.
Data and outcome
| Measure | Before | After successful processing |
|---|
| Available stock | 12 units | 9 units |
| New order | 3 units | Registered |
| Reserved stock | 0 units | 3 units |
| Physical stock | 12 units | 12 until dispatch |
| Notification | Not sent | Sent after confirmation |