The financial firewall between your cash registers and your General Ledger. Every dollar of revenue passes through ReSA before it becomes official.
What is ReSA?
Every day, across thousands of stores, millions of transactions occur on Point of Sale (POS) registers. Cash is handed over, credit cards are swiped, items are returned, and voids are performed. If all of this raw, unchecked data flowed directly into the corporate General Ledger (GL) or the RMS stock ledger, errors and fraud would corrupt the company's financials instantly.
Oracle Retail Sales Audit (ReSA) is the gatekeeper. It sits between the store-level POS systems (Xstore, third-party POS) and the corporate financial systems (RMS, GL). Its job is to:
Without ReSA, a retailer has no way to validate that the $2.3 billion in annual revenue recorded by its POS systems is actually accurate.
The Complete Data Flow
Understanding where ReSA fits in the enterprise data flow is critical:
┌──────────┐ ┌──────────┐ ┌──────────────┐ ┌──────────┐ ┌──────────┐
│ XSTORE │───▶│ XCENTER │───▶│ ReSA │───▶│ RMS │───▶│ GL │
│ (POS) │ │(Corporate│ │(Sales Audit) │ │(Inventory│ │(General │
│ │ │ Server) │ │ │ │ & Finance│ │ Ledger) │
│ TLOGs │ │ Routing │ │ Audit & │ │ Stock │ │ Financial│
│ Created │ │ Engine │ │ Validation │ │ Ledger │ │ Reporting│
└──────────┘ └──────────┘ └──────────────┘ └──────────┘ └──────────┘
Key principle: Data only flows from ReSA to RMS after ReSA has validated it. If a transaction fails an audit rule, it is held in the Error Queue and must be manually corrected by a headquarters auditor before it can be released. This prevents bad data from ever touching the stock ledger.
TLOG Processing Pipeline
POS systems (like Oracle Xstore) generate Transaction Logs (TLOGs). A TLOG is a highly detailed, often cryptic flat file or XML payload documenting every single action on the register.
The Processing Steps
1. Trickle Polling: Modern stores send TLOGs to ReSA multiple times a day (trickle polling), rather than waiting for an end-of-day batch. This gives headquarters near-real-time visibility into store operations. Typical polling intervals are every 5–15 minutes.
2. Parsing & Normalization: ReSA parses the raw TLOG (which may be in proprietary POS formats like RTLog, POSLog XML, or custom flat files) into a normalized relational structure. The parsing engine handles:
- Multiple POS vendor formats (Oracle Xstore, NCR, Toshiba, etc.)
- Character encoding differences
- Missing or malformed fields
- Time zone conversions
3. Transaction Type Classification: Each TLOG record is classified into transaction types:
- SALE — Regular merchandise sale
- RETURN — Customer return with or without receipt
- VOID — Cancelled transaction (line void vs post void)
- NO_SALE — Cash drawer opened without a transaction (suspicious activity)
- PAID_OUT — Cash paid out of the drawer (e.g., petty cash)
- PAID_IN — Cash deposited into the drawer (e.g., starting float)
4. Balancing: ReSA compares the declared register totals (what the cashier said was in the drawer at end of day) against the calculated totals (what the TLOG transactions mathematically add up to) to find overages or shortages.
The ReSA Database Schema
ReSA stores parsed transaction data in a highly normalized schema. Understanding these tables is essential for any developer writing custom reports or integrations.
| Column | Type | Description |
|---|---|---|
SA_TRAN_HEADPK | Transaction Header | The master transaction header. One row per transaction. Contains store, register, transaction number, cashier, date/time, transaction type, and status. Primary key: STORE + DAY_DT + TRAN_SEQ_NO + REGISTER_ID. |
SA_TRAN_ITEMPK | Line Items | Individual merchandise items within a transaction. Contains item, quantity, retail price, selling price, discount amount, and tax. Links to SA_TRAN_HEAD via store/day/tran_seq/register. |
SA_TRAN_TENDER | Tender Lines | Payment methods used for each transaction. Contains tender type code, amount tendered, change given, and authorization codes. Supports split tenders (multiple payment methods). |
SA_TRAN_DISCOUNT | Discounts | Discount details applied during the transaction. Contains promotion ID, discount type, discount amount, and reason code. |
SA_TRAN_TAX | Tax Details | Tax calculations per line item. Contains tax jurisdiction, taxable amount, tax rate, and tax amount. |
SA_STORE_DAY | Store Day Status | Tracks the audit status of each store for each business day. Status values: OPEN, CLOSED, AUDITED, POSTED. Data can only flow to RMS when status = POSTED. |
Querying ReSA Data
Audit Rules Engine
The core power of ReSA is its Rules Engine. Business analysts and loss prevention teams configure rules to catch anomalies. Rules are evaluated automatically during the audit process and fall into several categories:
Rule Categories
1. Cashier Fraud Detection:
- "Flag any transaction where a single cashier performs a void greater than $100 without a manager override."
- "Flag any cashier who performs more than 10 post-voids in a single shift."
- "Flag any cashier whose average discount percentage exceeds 15% of sales."
2. Data Integrity Rules:
- "Flag any transaction where a return is processed for an item that is not on file in RMS."
- "Flag any transaction where the tax amount is zero but the item is not tax-exempt."
- "Flag any transaction where the selling price is below the item's cost."
3. Suspicious Activity Patterns:
- "Flag any store where total returns exceed 20% of total sales for the day."
- "Flag any register with more than 5 no-sale drawer openings in an hour."
- "Flag any transaction processed after the store's official closing time."
4. Financial Threshold Rules:
- "Flag any single transaction exceeding $5,000."
- "Flag any single cash tender exceeding $2,000."
- "Flag any gift card reload exceeding $500."
Rule Configuration
Rules are configured in the SA_AUDIT_RULE table and associated parameter tables. Each rule has:
- A rule type (cashier, store, transaction, item)
- A severity level (warning, error, critical)
- Threshold parameters (dollar amounts, percentages, counts)
- An action (flag for review, auto-correct, reject)
Over/Short Balancing
One of ReSA's most important functions is Over/Short (OVR/SHORT) balancing. This compares what should be in the register's cash drawer with what the cashier actually counted.
The Calculation
Over/Short Formula
Expected Cash = Starting Float + Cash Sales − Cash Refunds − Paid Outs + Paid Ins
Over/Short = Actual Cash Count − Expected Cash
- Positive value = Overage (more cash than expected — possible pricing error or customer overpayment)
- Negative value = Shortage (less cash than expected — possible theft, miscounting, or unrecorded transaction)
Most retailers define tolerance thresholds for Over/Short:
- Within ±$2.00: Auto-accept (rounding errors)
- Between ±$2.01 and ±$25.00: Flag for review but auto-post
- Greater than ±$25.00: Hold for mandatory auditor review
Totals Posting to RMS & GL
Once a store's daily transactions have been audited and all errors resolved, the Totals Posting process releases the financial data to downstream systems:
Posting to RMS (Inventory Impact)
The saposupld batch program extracts validated sales data from ReSA and posts it to RMS. This is how RMS knows that items were sold:
- Stock On Hand Reduction: For every item sold, RMS reduces
ITEM_LOC_SOH.STOCK_ON_HANDat the selling store. - Stock Ledger Entry: RMS posts a debit entry to the
STOCK_LEDGERreflecting the cost of goods sold (COGS). - Sales History: RMS updates
ITEM_LOC_HISTwith the sales quantities and amounts for future replenishment and planning calculations.
Posting to GL (Financial Impact)
ReSA generates General Ledger (GL) posting entries that follow standard double-entry accounting:
- Debit: Cash/Accounts Receivable (the money received)
- Credit: Revenue (the sales income)
- Debit: Cost of Goods Sold
- Credit: Inventory (reducing the inventory asset)
The Error Queue Workflow
When a transaction breaks an audit rule, it falls into the ReSA Error Queue. The error queue is the daily workload for headquarters auditors.
Error Resolution Process
- Auditor opens the Error Queue in the ReSA web application
- Reviews flagged transactions — each error shows the rule that was broken, the transaction details, and the severity
- Takes action:
- Override: The auditor determines the transaction is valid despite triggering the rule (e.g., a large legitimate purchase). They override the error with a reason code.
- Correct: The auditor modifies the transaction data to fix the error (e.g., updating a missing item number, correcting a tax amount)
- Delete: The auditor determines the transaction is invalid and removes it from the audit (rare — usually only for duplicate TLOGs)
- Re-audit: After corrections, the auditor re-runs the audit for the store/day
- Post: Once all errors are cleared, the auditor posts the store/day totals
Important Gotchas
- !If a store's daily data is not posted within the ReSA cutoff window (typically 3–5 business days), the financial close process is blocked. Month-end and year-end close dates are firm deadlines.
- !ReSA rules that are too aggressive create excessive false positives, overwhelming auditors. Tune rule thresholds carefully using historical data before deploying to production.
- !When upgrading Xstore, always verify that the TLOG format is still compatible with the ReSA parser. Even minor format changes can cause mass parsing failures.
ReSA Batch Architecture
ReSA operates on a daily batch cycle, typically running during the overnight window:
| Batch Program | Function | Runs After |
|---|---|---|
sagetflatfile | Ingests raw TLOG flat files from the integration layer | TLOG delivery |
saparsexml | Parses XML-format TLOGs into SA_TRAN tables | sagetflatfile |
saaudit | Executes all configured audit rules against parsed data | saparsexml |
sabalancing | Performs Over/Short balancing calculations | saaudit |
saposupld | Posts validated totals to RMS stock ledger | Auditor sign-off |
saglpost | Generates GL posting entries for financial systems | saposupld |
sapurge | Purges aged transaction data beyond the retention period | End of cycle |
ReSA Reporting & Analytics
Beyond its core auditing function, ReSA is a goldmine for retail analytics:
- Shrinkage Analysis: By comparing expected inventory (based on receipts and sales) against actual stock counts, loss prevention teams can identify stores with abnormal shrinkage patterns.
- Cashier Performance: Track metrics like average transaction time, scan rate, void rate, and discount percentage per cashier.
- Tender Mix Analysis: Understand payment method trends (cash vs credit vs mobile wallets) by store, region, and time period.
- Returns Intelligence: Identify stores, items, or customers with abnormal return patterns that may indicate return fraud.
Key Takeaways
- ReSA is the financial gatekeeper — no POS data reaches RMS or the General Ledger without passing through Sales Audit first.
- TLOGs are parsed into normalized tables (SA_TRAN_HEAD, SA_TRAN_ITEM, SA_TRAN_TENDER) for structured querying and auditing.
- The Rules Engine automatically flags suspicious transactions for manual review — covering fraud, data integrity, and financial thresholds.
- Over/Short balancing compares expected cash drawer amounts against actual counts to detect shortages and overages.
- Totals posting updates RMS stock on hand, the stock ledger, and generates GL accounting entries.
- The Error Queue is the daily workload for HQ auditors who must resolve all flagged transactions before financial data can be released.


