Oracle Retail22 min readBy Priyanshu Pandey

Oracle Retail Invoice Matching (ReIM): Invoice Processing, Tolerance Rules & Cost Reconciliation

A comprehensive guide to Oracle Retail Invoice Matching (ReIM). Learn how supplier invoices are matched against purchase orders and receipts, tolerance rule configuration, cost discrepancy resolution, debit/credit memo generation, and integration with RMS and Accounts Payable.

Phase 4 · Invoice Matching

Ensuring that every dollar you pay to suppliers is exactly what you agreed to. The three-way match that protects the retailer's bottom line.

22 min read📅Jul 19, 2026✍️Priyanshu Pandey📚Oracle Retail Ecosystem
MATCHING EVERY DOLLAR

What is ReIM?

When a retailer orders merchandise from a supplier, three critical financial documents are created at different points in time:

  1. The Purchase Order (PO): Created in RMS by the buyer — "We want 1,000 units of Item X at $10.00 each."
  2. The Goods Receipt: Created in RMS when the warehouse or store physically receives the shipment — "We actually received 980 units."
  3. The Supplier Invoice: Sent by the supplier — "Please pay us $10,200.00 for 1,000 units at $10.20 each."

Notice the discrepancies? The PO says 1,000 units at $10.00. The receipt says 980 units. The invoice says 1,000 units at $10.20. Who is right? How much should the retailer actually pay?

Oracle Retail Invoice Matching (ReIM) is the system that resolves these discrepancies automatically. It performs a three-way match between the PO, the receipt, and the invoice, applies configurable tolerance rules, and either auto-approves the invoice for payment or routes it for manual review.

THE THREE-WAY MATCH

The Three-Way Match

The three-way match is the fundamental operation that ReIM performs. It compares three sources of truth:

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  PURCHASE    │     │   GOODS      │     │  SUPPLIER    │
│  ORDER       │     │   RECEIPT    │     │  INVOICE     │
│              │     │              │     │              │
│ Item: X      │     │ Item: X      │     │ Item: X      │
│ Qty: 1,000   │     │ Qty: 980     │     │ Qty: 1,000   │
│ Cost: $10.00 │     │ Received OK  │     │ Cost: $10.20 │
│              │     │              │     │              │
│ EXPECTED     │     │ ACTUAL       │     │ CLAIMED      │
└──────┬───────┘     └──────┬───────┘     └──────┬───────┘
       │                    │                    │
       └────────────────────┼────────────────────┘
                            │
                   ┌────────▼────────┐
                   │     ReIM        │
                   │  Three-Way      │
                   │  Match Engine   │
                   │                 │
                   │ Qty Match? NO   │
                   │ (980 ≠ 1,000)   │
                   │                 │
                   │ Cost Match? NO  │
                   │ ($10.00 ≠ $10.20)│
                   └────────┬────────┘
                            │
                   ┌────────▼────────┐
                   │ Apply Tolerance │
                   │ Rules           │
                   │                 │
                   │ Within limits?  │
                   │ YES → Auto-pay  │
                   │ NO → Manual     │
                   │      Review     │
                   └─────────────────┘

Match Types

ReIM supports several matching strategies:

Match TypeDescriptionUse Case
PO-BasedMatch invoice lines to specific PO linesStandard merchandise purchasing
Receipt-BasedMatch invoice lines to specific receipt recordsConsignment or drop-ship scenarios
Summary MatchMatch invoice total to total received valueHigh-volume, low-risk suppliers
Pre-PayPay the invoice before receipt (advance payment)Perishable goods, trusted suppliers
DATA FLOW

Invoice Processing Data Flow

How Invoices Enter the System

Supplier invoices arrive in ReIM through several channels:

  1. EDI (Electronic Data Interchange): The most common method for large retailers. Invoices arrive as EDI 810 documents, which are automatically parsed and loaded into ReIM staging tables.
  2. Manual Entry: For smaller suppliers without EDI capability, accounts payable clerks manually enter invoice details into the ReIM web UI.
  3. Evaluated Receipts Settlement (ERS): In an ERS model, ReIM automatically generates a "self-billed" invoice based on the receipt. The retailer pays what it received at the PO cost, without waiting for the supplier's invoice.

The Processing Pipeline

  1. Invoice arrives (via EDI or manual entry) and is loaded into IM_DOC_HEAD / IM_DOC_DETAIL
  2. Matching engine compares invoice lines against PO lines and receipt records
  3. Tolerance check evaluates cost and quantity variances against configured thresholds
  4. Auto-resolution applies rules for variances within tolerance
  5. Routing sends out-of-tolerance items to the appropriate reviewer's worklist
  6. Approval triggers payment release to Accounts Payable
  7. Debit/Credit memo generation for over/underpayments
DATA MODEL

The ReIM Database Schema

Core ReIM Tables
ColumnTypeDescription
IM_DOC_HEADPK
Invoice Header

The master invoice header table. Contains document ID, supplier number, invoice number, invoice date, total amount, currency, status (NEW, MATCHED, APPROVED, POSTED, REJECTED). Primary key: DOC_ID.

IM_DOC_DETAILPK
Invoice Lines

Individual line items on the invoice. Contains item number, quantity invoiced, unit cost invoiced, extended amount, and PO reference. Links to IM_DOC_HEAD via DOC_ID.

IM_DOC_NON_MERCH
Non-Merchandise Charges

Freight, handling, insurance, and other non-merchandise charges on the invoice. Each charge has a type code, amount, and allocation method.

IM_MATCH_DETAIL
Match Results

The results of the three-way match. Each row records which PO line and receipt line were matched to which invoice line, along with the variance amounts.

IM_TOLERANCE_HEAD
Tolerance Rules

Tolerance rule definitions. Contains rule ID, match type, variance type (cost, quantity, total), tolerance percentage, tolerance amount, and action (auto-approve, route for review).

IM_DISCREPANCY
Discrepancies

Recorded discrepancies between invoice, PO, and receipt. Contains variance type, variance amount, resolution status, and reviewer assignment.

Find Unmatched Invoices Older Than 7 Days
SQL
SELECT 
    idh.doc_id,
    idh.supplier,
    s.sup_name,
    idh.invoice_no,
    idh.invoice_date,
    idh.total_cost       AS invoice_total,
    idh.status,
    TRUNC(SYSDATE) - idh.invoice_date AS days_outstanding,
    COUNT(idd.detail_id) AS line_count
FROM 
    im_doc_head idh
JOIN 
    sups s ON idh.supplier = s.supplier
JOIN 
    im_doc_detail idd ON idh.doc_id = idd.doc_id
WHERE 
    idh.status IN ('NEW', 'UNMATCHED')
    AND idh.invoice_date < TRUNC(SYSDATE) - 7
GROUP BY 
    idh.doc_id, idh.supplier, s.sup_name,
    idh.invoice_no, idh.invoice_date, 
    idh.total_cost, idh.status
ORDER BY 
    days_outstanding DESC;
TOLERANCE RULES

Tolerance Rules

Tolerance rules are the mechanism by which ReIM decides whether a discrepancy is acceptable or requires human intervention. They are configured per supplier, per item category, or globally.

Cost Tolerance Example

A retailer configures: "Accept cost variances up to 2% or $0.50, whichever is greater."

PO Unit CostInvoice Unit CostVarianceWithin Tolerance?
$10.00$10.15$0.15 (1.5%)✅ Yes — below 2%
$10.00$10.55$0.55 (5.5%)❌ No — exceeds both 2% and $0.50
$2.00$2.45$0.45 (22.5%)✅ Yes — below $0.50 absolute
$100.00$103.00$3.00 (3.0%)❌ No — exceeds both thresholds

Quantity Tolerance Example

A retailer configures: "Accept quantity variances up to 5% of the PO quantity."

PO QtyReceipt QtyInvoice QtyAction
1,000980980✅ Auto-match to receipt qty (within 5%)
1,0009801,000⚠️ Flag — invoice claims 1,000 but only 980 received
1,0008501,000❌ Reject — 15% shortage exceeds 5% tolerance
RESOLVING VARIANCES

Discrepancy Resolution

When a match fails the tolerance check, the discrepancy enters the ReIM Worklist for manual resolution. Reviewers have several options:

  1. Accept Vendor Cost: Pay what the vendor invoiced (useful when the PO cost was genuinely wrong — e.g., a price increase notification was not applied to the PO).
  2. Accept PO Cost: Pay the original PO cost and generate a Debit Memo to the supplier for the overcharge.
  3. Accept Receipt Quantity: Pay only for the quantity actually received and generate a Debit Memo for the quantity discrepancy.
  4. Split Resolution: Accept some line items and reject others on the same invoice.
  5. Reject Invoice: Send the entire invoice back to the supplier for re-submission.
MEMOS

Debit & Credit Memos

ReIM automatically generates debit and credit memos to financially reconcile discrepancies:

Debit Memo (Retailer claims money FROM supplier):

  • Supplier invoiced at $10.20 but PO says $10.00 → Debit memo for $0.20 × quantity
  • Supplier invoiced 1,000 units but only 980 received → Debit memo for 20 × unit cost

Credit Memo (Retailer owes money TO supplier):

  • Supplier invoiced at $9.80 but PO says $10.00 → Credit memo for $0.20 × quantity (rare — retailers usually just pay the lower amount)
  • Additional freight or handling charges not on the original PO
💡

Vendor Compliance

Smart retailers use ReIM discrepancy data to create Vendor Scorecards that track which suppliers consistently send incorrect invoices, ship wrong quantities, or fail to provide accurate EDI data. This data becomes leverage during vendor negotiations.

BATCH PROCESSING

ReIM Batch Architecture

ReIM operates on a daily batch cycle:

Batch ProgramFunction
ediupldLoads incoming EDI 810 invoice documents into staging tables
reimatchExecutes the three-way matching engine against all unmatched invoices
reitolApplies tolerance rules and auto-resolves within-tolerance discrepancies
reimemoGenerates debit and credit memos for resolved discrepancies
reimpostPosts approved invoices and memos to the AP (Accounts Payable) interface
reimpurgePurges posted and aged invoice records beyond the retention period
INTEGRATION

Integration with RMS & AP

ReIM does not operate in isolation. It has deep integration points with RMS and the corporate Accounts Payable system:

From RMS to ReIM

  • Purchase Order data (PO numbers, line items, unit costs, quantities ordered)
  • Receipt data (quantities received, receipt dates, warehouse/store locations)
  • Supplier master data (supplier terms, payment methods, EDI capabilities)

From ReIM to Accounts Payable

  • Approved invoices ready for payment with the validated amount
  • Debit memos to be deducted from future payments
  • Credit memos to be added to future payments
  • Payment schedule based on supplier terms (Net 30, Net 60, etc.)

From ReIM Back to RMS

  • Cost updates when the actual invoice cost differs from the PO cost and the retailer accepts the vendor cost, RMS updates the item's weighted average cost (WAC)

Important Gotchas

  • !
    ReIM tolerance rules must be tested with historical data before going live. Overly strict tolerances create a flood of manual reviews; overly loose tolerances let real overcharges slip through.
  • !
    EDI 810 invoice formatting varies significantly between suppliers. Each new supplier's EDI setup must be tested end-to-end in a sandbox before production activation.
  • !
    When RMS cost changes (from deals or renegotiations) are not reflected on existing open POs, every invoice for those POs will fail the cost match. Coordinate cost changes with PO management.
  • !
    The reimpost batch must complete before the AP payment run. If ReIM batches are delayed, payments to suppliers are delayed, potentially violating contractual payment terms.

Key Takeaways

  • ReIM performs a three-way match between Purchase Orders, Goods Receipts, and Supplier Invoices to validate every payment.
  • Tolerance rules automate the approval of minor discrepancies while routing significant variances for manual review.
  • The core tables are IM_DOC_HEAD (invoice header) and IM_DOC_DETAIL (invoice lines), with IM_MATCH_DETAIL recording match results.
  • Debit memos recover overcharges from suppliers; credit memos account for underpayments to suppliers.
  • ReIM integrates bidirectionally with RMS (PO and receipt data) and downstream to Accounts Payable (approved payments).
  • Evaluated Receipts Settlement (ERS) eliminates the need for supplier invoices entirely — the retailer self-bills based on receipts.
RetailCoder
All systems operational
v1.0 Live

RC:OMS

Multi-channel order management with double-entry inventory ledger. Amazon, Flipkart, Shopify, WooCommerce — one source of truth.

Launch demo →
v1.0 Live

RC:Storefront

Self-hosted headless e-commerce. Your server, your data, zero transaction fees. Native RC:OMS inventory sync.

Visit Storefront →
Pipeline

RC:Pulse

AI-powered retail analytics and demand forecasting — built natively on top of your RC:OMS and Storefront data.

Request early access →
Built in India 🇮🇳  ·  Architected by Priyanshu PandeyTalk to an engineer →