Cash Application: Process Mining Analysis
NetSuite account TD3016323 (production, OneWorld, USD) · Objects: CustPymt, CustInvc, Deposit, CashSale, DepAppl, CustDep, CustCred · Scope: all history, Oct 2024 → Sep 2026 · Prepared 2026-09-04 · Revision 1 · Method: SuiteQL via runSql over transaction, nexttransactionlinelink, systemnote · Fifth study in the series; extends the cash-sale-to-deposit consolidation first seen in Order-to-Cash · Document numbers link to the source record inside NetSuite
- 0Executive summary
- 1Method and assumptions
- 2Structure — two cash paths
- 3Touches to settle
- 4Timing — invoice to cash, cash to bank
- 5Unapplied cash — aging and cause
- 6Open A/R and partial payments
- 7Exception registers
- 8Data quality
- 9Findings and actions
- ASuiteQL used
- BHand-check
0Executive summary
748
Customer payments, $2.02M — 736 applied 1:1 to an invoice
2
Touches to settle for 97% of payments — created already applied
$3,246
Unapplied cash on 12 payments; 1 is a same-day duplicate
49
Deposits sweeping 1,026 cash sales, 12–29 each, twice monthly
Cash application in this account has two distinct shapes. Invoice cash is strictly one-to-one: 736 payments each settle exactly one invoice, 89% on the invoice date, and only one invoice (INV03) has ever received two applications (a $150 customer-deposit application plus a $934.78 payment). Store cash is many-to-one: 49 deposits sweep 1,026 cash sales in batches of 12–29 on the 23rd–25th of each month, so a cash sale waits a uniform 1–24 days (median 12) to reach the bank. There is no write-off activity and no journal against A/R in the period.
- Unapplied cash is small but entirely avoidable. Twelve payments carry $3,245.96 unapplied. Three are material ($1,049.79, $960.11, $934.78) and belong to customers with no open invoice at all; one of them, PYMT01 (Susan Adams, $934.78, 2026-08-31), is a same-day, same-amount twin of PYMT675, which was applied to INV03 — a duplicate receipt awaiting refund. Two $32.65 payments from Finch Computing sit unapplied while Finch's INV765 has $190.37 open. Nine small payments ($27–$50, seven customers) have nothing to apply to.
- Open A/R is 85% test data. Of $928,246.62 open across 39 invoices, 32 invoices ($790,017.65) carry a "TEST —" memo and were created on 2026-05-14 by the administrator, including all 11 partially-paid invoices and the two undeposited payments. Real open A/R is 7 invoices, $138,228.97, of which one — INV759 Blockster Inc., $53,424, 63 days past due — is overdue.
- The store sweep leaves a tail. 51 cash sales are not linked to any deposit: 43 (status Deposited, two per month since Oct 2024, $6,370.47) were banked directly, bypassing Undeposited Funds — a second, unrecorded path; 8 in Sep 2026 ($2,265.58) are genuinely unswept, 7 of them with status Unapproved Payment.
1Method and assumptions
| # | Assumption | Effect |
| A1 | Objects: CustPymt (748), CustInvc (764), Deposit (49), CashSale (1,077), DepAppl (1), CustDep (1), CustCred (3). Activities: Invoiced, Paid, Applied, Deposited, Swept. | Two roots: invoice and cash sale. |
| A2 | Links = distinct nexttransactionlinelink pairs: CustInvc→CustPymt/DepAppl/CustCred [Payment]; CashSale→Deposit [DepRfnd]; CustDep→DepAppl. | 736 + 1 + 1 + 1,026 + 1 edges. |
| A3 | "Touches to settle" = 1 (payment created) + number of invoices applied + number of status-change system notes + number of deposits linked. A payment created already applied to one invoice = 2 touches. | Touch count is a floor: UI edits without status change leave no note. |
| A4 | Unapplied = foreignpaymentamountunused > 0. Aging from trandate to 2026-09-04. | Future-dated payments have negative age. |
| A5 | Payment timing vs due date = payment trandate − invoice duedate. | Negative = early. |
| A6 | Test data identified by memo LIKE 'TEST —%' (invoices INV762–INV793, payments PYMT750–PYMT760, created 2026-05-14 by employee 3894). | Reported separately; not excluded from totals unless stated. |
| A7 | Write-offs: journals to A/R and credit memos with no RMA are the only mechanisms; both counted. | 0 journals to A/R in the window (Record-to-Report study); 2 open standalone credits (Return-to-Refund study). |
2Structure — two cash paths
Figure 1 — Two flows. Top: invoice cash, 1:1, 736 payments. Bottom: store cash, M:1, 1,026 cash sales into 49 deposits. Labels: count · median days.
| Multiplicity | 0 | 1 | 2 | 12–29 | Note |
| Invoices per payment | 12 | 736 | 0 | — | No payment ever settles two invoices |
| Applications per invoice (paid invoices) | — | 735 | 1 | — | INV03: DEPA01 $150 + PYMT675 $934.78 = $1,084.78 ✓ |
| Cash sales per deposit | 0 | 0 | 0 | 49 | 12 ×1 · 17 ×7 · 18 ×5 · 19 ×2 · 20 ×6 · 21 ×5 · 22 ×5 · 23 ×3 · 24 ×4 · 25 ×2 · 26 ×4 · 28 ×3 · 29 ×1 |
| Deposits per cash sale | 51 | 1,026 | 0 | — | 51 unlinked: 43 banked directly, 8 unswept |
| Payments per customer with unapplied cash | — | 5 | 3 | — | Dillan Garcia 3 · Finch 2 · Bryan Scott 2 · Donnie Rizzo 2 |
Invoice cash is never consolidated and never split — one payment, one invoice, usually the same day. All the many-to-one structure in this account is on the store side, where the deposit is a twice-monthly sweep. Cash application effort, therefore, is not in matching; it is in the twelve receipts that arrived with nothing to match.
3Touches to settle
| Touches | Payments | Share | Value | What it means |
| 1 — payment created, nothing applied | 12 | 1.6% | 3,245.96 | Unapplied (§5) |
| 2 — created already applied to one invoice | 725 | 96.9% | 1,982,069.19 | Straight-through; no edit, no status change recorded |
| 3 — created, applied, one status change noted | 11 | 1.5% | 35,880.00 | The 11 "TEST — Payment / Partial Payment" receipts, 8 notes each, all 2026-05-14 13:04 by the administrator (UI) |
| Total | 748 | 100% | 2,021,195.15 | No payment has been re-applied, un-applied or edited after posting in any recorded way |
System notes exist on 13 of 748 payments: the 11 test receipts and 2 (PYMT695, PYMT697) with a TRANLINE.SRECONCILIATIONSTATUS note written by -System- on 2026-09-04 02:03 — the only bank-reconciliation trace in the account.
4Timing — invoice to cash, cash to bank
Figure 2 — Invoice date → payment date, 736 pairs.
Figure 3 — Payment date − invoice due date, 736 pairs.
| Invoice → payment | Pairs | Share | Relative to due date | Pairs | Share |
| Same day | 658 | 89.4% | > 30 days early | 70 | 9.5% |
| 1–2 days | 2 | 0.3% | 8–30 days early | 178 | 24.2% |
| 3–4 days | 46 | 6.3% | 1–7 days early | 1 | 0.1% |
| 6–19 days | 22 | 3.0% | On due date | 443 | 60.2% |
| 24–71 days | 6 | 0.8% | 1–7 days late | 39 | 5.3% |
| 139 · 273 days | 2 | 0.3% | 8–30 days late | 1 | 0.1% |
| Median 0 · P90 3 · max 273 | 736 | | > 30 days late (34–243) | 4 | 0.5% |
Customers pay on or before due date 94% of the time; 443 invoices (60%) were settled exactly on their due date and 658 (89%) on their invoice date — the two coincide because most invoices carry due-on-receipt terms. The tail is 44 late payments, 4 of them more than 30 days (max 243). Store cash reaches the bank in a median of 12 days (uniform 1–24) because the sweep runs on the 23rd–25th regardless of when the sale occurred.
| Cash sale → deposit | Pairs | Median | Min | Max | Pattern |
| All swept cash sales | 1,026 | 12 | 1 | 24 | 2 deposits per month, 23rd–25th (3 in Sep 2026); 37–52 cash sales per month; $98.7K–$303.7K per month |
5Unapplied cash — aging and cause
| Payment | Date | Customer | Unapplied | Age d | Customer open A/R | Diagnosis |
| PYMT02 | 2026-09-17 | Donnie Rizzo | 1,049.79 | −13 | none | Cash with no invoice — prepayment or misposted; refund or hold as customer deposit |
| PYMT03 | 2026-08-31 | Robert Huffman | 960.11 | 4 | none | Same |
| PYMT01 | 2026-08-31 | Susan Adams | 934.78 | 4 | none | Duplicate of PYMT675 (same day, same $934.78, applied to INV03). Refund. |
| PYMT13 | 2026-09-10 | Donnie Rizzo | 49.99 | −6 | none | Small residual |
| PYMT07 · PYMT05 | 2026-09-06 · 09-18 | Finch Computing | 65.30 | −2 · −14 | INV765 $190.37 open | Applicable now — reduce INV765 to $125.07 |
| PYMT10 · PYMT11 · PYMT15 | 2026-09-07 → 09-17 | Dillan Garcia | 97.95 | −3 → −13 | none | Three identical $32.65 receipts, no invoice — recurring charge with no billing document |
| PYMT12 · PYMT14 | 2026-09-11 · 09-12 | Bryan Scott | 55.50 | −7 · −8 | none | Two identical $27.75 receipts |
| PYMT16 | 2026-09-14 | Carter Drury | 32.54 | −10 | none | Small residual |
| 12 payments · 7 customers · 10 of 12 future-dated | 3,245.96 | Applicable today: $65.30 · Refundable duplicate: $934.78 · No invoice to match: $2,245.88 |
All 12 are numbered PYMT01–PYMT16 (a separate sequence from the PYMT6xx/7xx production run) and status Deposited. No customer deposit record, no unapplied-payment journal, and no write-off exists against any of them.
6Open A/R and partial payments
| Cohort | Invoices | Open | Overdue | Note |
| "TEST —" invoices (INV762–INV793, created 2026-05-14) | 32 | 790,017.65 | 22 · 731,283.60 | Includes all 11 partially-paid invoices ($16,884 → $100 partials) and the two Not-Deposited payments |
| Production invoices | 7 | 138,228.97 | 1 · 53,424.00 | INV759 Blockster Inc. 63 d past due; INV761, 715, 717, 718, 716, 713 not yet due (Sep 2026) |
| Total open A/R | 39 | 928,246.62 | 25 · 794,882.16 | Partial payments: 11 (all test); write-offs: 0 |
7Exception registers
7-A · Cash sales not linked to a deposit (51, $8,636.05)
| Cohort | Cash sales | Value | Status | Pattern | Reading |
| Oct 2024 – Aug 2026 | 43 | 6,370.47 | Deposited (C) | 1–2 per month, every month | Posted straight to bank, bypassing Undeposited Funds — a second cash path with no deposit record |
| Sep 2026 | 7 | 2,153.77 | Unapproved Payment (A) | CS1071 … incl. CS1072 (the over-refunded sale) | Payment not approved; cannot be swept |
| Sep 2026 | 1 | 111.81 | Not Deposited (B) | CS1070 | Awaiting the September sweep |
7-B · Production open invoices (7)
| Invoice | Date | Due | Customer | Open | Days past due |
| INV759 | 2026-06-03 | 2026-07-03 | Blockster Inc. | 53,424.00 | 63 |
| INV761 | 2026-09-22 | 2026-10-21 | Marshall Industries | 25,355.33 | −47 |
| INV715 | 2026-09-07 | 2026-10-06 | Pineapple Republic | 15,687.25 | −32 |
| INV717 | 2026-09-17 | 2026-10-16 | Design Excellence Ltd. | 13,841.83 | −42 |
| INV718 | 2026-09-19 | 2026-10-18 | Davis Supplies | 12,447.00 | −44 |
| INV716 | 2026-09-16 | 2026-10-15 | Panaderia Co. | 11,302.23 | −41 |
| INV713 | 2026-09-04 | 2026-10-03 | Hugo Limited | 6,171.33 | −29 |
| 7 invoices | 138,228.97 | 1 overdue |
7-C · Late payments over 30 days (4)
Four invoice→payment pairs settled 34–243 days after due date; the 139- and 273-day invoice-to-payment lags belong to this cohort. Query Q6 lists them; they are production invoices from the Oct 2024 – Feb 2025 load.
8Data quality
| Limitation | Evidence | Effect |
| Test data in production A/R | 32 invoices, 11 payments with "TEST —" memo, one creation timestamp (2026-05-14 13:04) | 85% of open A/R and 100% of partial payments are synthetic |
| Touches are a floor | System notes on 13 of 748 payments; no TRANDOC.KSTATUS note on any production payment | Re-applications or edits without status change would be invisible |
| Direct-to-bank cash sales | 43 cash sales status Deposited with no Deposit link | The deposit table under-counts banked cash by $6,370.47 |
| Day resolution; future dates | 10 of 12 unapplied payments dated after 2026-09-04 | Aging of unapplied cash is ≤ 4 days or negative |
transactionline.account NOT_EXPOSED; transaction.account join fails | Q-probe errors | Payment landing account (bank vs Undeposited Funds) read from status only |
9Findings and recommended actions
- Clear the twelve. Apply PYMT05 + PYMT07 ($65.30) to Finch's INV765; refund PYMT01 ($934.78) as a duplicate of PYMT675; contact Donnie Rizzo ($1,099.78 across two receipts) and Robert Huffman ($960.11) for the invoice these were meant for or convert to customer deposits; bill Dillan Garcia and Bryan Scott for the recurring $32.65 / $27.75 receipts that have no document. Total effort: an afternoon. Total unapplied afterwards: zero.
- Purge or flag the test A/R before the next aging report. $790K of $928K open A/R and every partial payment is test data created in one sitting. Either reverse the 32 invoices and 11 payments or exclude memo 'TEST —%' from every A/R saved search and dashboard; today the aging report is 85% noise. The one production overdue — INV759 Blockster $53,424, 63 days — is the only collection call to make.
- Close the second cash path. 43 cash sales over 23 months were banked directly rather than through Undeposited Funds and the twice-monthly sweep. Decide whether direct banking is permitted; if so, record it as a deposit so reconciliation sees it; if not, find the form or role that allows it. Approve the 7 Sep 2026 cash-sale payments so they can be swept.
AAppendix A — SuiteQL used
Q1 — Census with unapplied amounts
SELECT x.type, x.status, x.docs, BUILTIN.DF(t.status) AS label, x.total, x.unapplied, x.with_unapplied
FROM (SELECT type, status, COUNT(*) AS docs, MIN(id) AS sample_id, ROUND(SUM(ABS(foreigntotal)),2) AS total,
ROUND(SUM(foreignpaymentamountunused),2) AS unapplied, SUM(CASE WHEN foreignpaymentamountunused > 0 THEN 1 ELSE 0 END) AS with_unapplied
FROM transaction WHERE type IN ('CustPymt','Deposit','DepAppl','CustDep','CustCred') GROUP BY type, status) x
JOIN transaction t ON t.id = x.sample_id ORDER BY x.type, x.docs DESC
Q2 — Multiplicity
SELECT 'invoices_per_payment' AS metric, k AS n, COUNT(*) AS docs FROM (SELECT l.nextdoc, COUNT(DISTINCT l.previousdoc) AS k FROM nexttransactionlinelink l
JOIN transaction p ON p.id=l.previousdoc AND p.type='CustInvc' JOIN transaction n ON n.id=l.nextdoc AND n.type='CustPymt' WHERE l.linktype='Payment' GROUP BY l.nextdoc) GROUP BY k
UNION ALL SELECT 'payments_per_invoice', k, COUNT(*) FROM (SELECT l.previousdoc, COUNT(DISTINCT l.nextdoc) AS k FROM nexttransactionlinelink l
JOIN transaction p ON p.id=l.previousdoc AND p.type='CustInvc' JOIN transaction n ON n.id=l.nextdoc AND n.type IN ('CustPymt','DepAppl','CustCred') WHERE l.linktype='Payment' GROUP BY l.previousdoc) GROUP BY k
UNION ALL SELECT 'cashsales_per_deposit', k, COUNT(*) FROM (SELECT l.nextdoc, COUNT(DISTINCT l.previousdoc) AS k FROM nexttransactionlinelink l
JOIN transaction n ON n.id=l.nextdoc AND n.type='Deposit' GROUP BY l.nextdoc) GROUP BY k ORDER BY 1, 2
Q3 — Touches to settle
SELECT touches, COUNT(*) AS payments, ROUND(SUM(total),2) AS total FROM (
SELECT p.id, ABS(p.foreigntotal) AS total,
(SELECT COUNT(DISTINCT l.previousdoc) FROM nexttransactionlinelink l WHERE l.nextdoc=p.id)
+ (SELECT COUNT(*) FROM nexttransactionlinelink l WHERE l.previousdoc=p.id) + 1
+ (SELECT COUNT(*) FROM systemnote sn WHERE sn.recordid=p.id AND sn.recordtypeid=-30 AND sn.field='TRANDOC.KSTATUS') AS touches
FROM transaction p WHERE p.type='CustPymt') GROUP BY touches ORDER BY touches
Q4 — Lag distributions
SELECT 'inv_to_pymt' AS metric, TRUNC(n.trandate) - TRUNC(p.trandate) AS days, COUNT(*) AS pairs FROM nexttransactionlinelink l
JOIN transaction p ON p.id=l.previousdoc AND p.type='CustInvc' JOIN transaction n ON n.id=l.nextdoc AND n.type='CustPymt' WHERE l.linktype='Payment' GROUP BY TRUNC(n.trandate) - TRUNC(p.trandate)
UNION ALL SELECT 'cashsale_to_deposit', TRUNC(n.trandate) - TRUNC(p.trandate), COUNT(*) FROM nexttransactionlinelink l
JOIN transaction p ON p.id=l.previousdoc AND p.type='CashSale' JOIN transaction n ON n.id=l.nextdoc AND n.type='Deposit' GROUP BY TRUNC(n.trandate) - TRUNC(p.trandate) ORDER BY 1, 2
Q5 — Payment vs due-date buckets
SELECT CASE WHEN d < -30 THEN 'a >30 early' WHEN d < -7 THEN 'b 8-30 early' WHEN d < 0 THEN 'c 1-7 early' WHEN d = 0 THEN 'd on due'
WHEN d <= 7 THEN 'e 1-7 late' WHEN d <= 30 THEN 'f 8-30 late' ELSE 'g >30 late' END AS bucket, COUNT(*) AS pairs, MIN(d), MAX(d)
FROM (SELECT TRUNC(n.trandate) - TRUNC(p.duedate) AS d FROM nexttransactionlinelink l JOIN transaction p ON p.id=l.previousdoc AND p.type='CustInvc'
JOIN transaction n ON n.id=l.nextdoc AND n.type='CustPymt' WHERE l.linktype='Payment') GROUP BY [same CASE] ORDER BY 1
Q6 — Unapplied payments with customer context
SELECT p.tranid, TO_CHAR(p.trandate,'YYYY-MM-DD') AS pay_date, BUILTIN.DF(p.entity) AS customer, ROUND(p.foreignpaymentamountunused,2) AS unapplied,
(SELECT COUNT(*) FROM transaction i WHERE i.type='CustInvc' AND i.entity = p.entity AND i.foreignamountunpaid > 0) AS customer_open_invoices,
(SELECT LISTAGG(i.tranid || ' $' || ROUND(i.foreignamountunpaid,2), '; ') WITHIN GROUP (ORDER BY i.trandate) FROM transaction i WHERE i.type='CustInvc' AND i.entity = p.entity AND i.foreignamountunpaid > 0) AS open_invoices,
(SELECT LISTAGG(a.tranid || ' ' || TO_CHAR(a.trandate,'YYYY-MM-DD'), '; ') WITHIN GROUP (ORDER BY a.trandate) FROM transaction a
WHERE a.type='CustPymt' AND a.entity=p.entity AND a.id<>p.id AND ABS(a.foreigntotal)=ABS(p.foreigntotal) AND a.foreignpaymentamountunused=0) AS applied_twin
FROM transaction p WHERE p.type='CustPymt' AND p.foreignpaymentamountunused > 0 ORDER BY p.foreignpaymentamountunused DESC
Q7 — Open A/R
SELECT i.id, i.tranid, TO_CHAR(i.trandate,'YYYY-MM-DD') AS trandate, TO_CHAR(i.duedate,'YYYY-MM-DD') AS duedate, BUILTIN.DF(i.entity) AS customer,
ROUND(ABS(i.foreigntotal),2) AS total, ROUND(i.foreignamountpaid,2) AS paid, ROUND(i.foreignamountunpaid,2) AS unpaid, TRUNC(SYSDATE)-TRUNC(i.duedate) AS days_past_due, i.memo
FROM transaction i WHERE i.type='CustInvc' AND i.foreignamountunpaid > 0 ORDER BY i.foreignamountunpaid DESC
Q8 — Deposit sweep by month; unswept cash sales
SELECT TO_CHAR(d.trandate,'YYYY-MM') AS ym, COUNT(DISTINCT d.id) AS deposits, COUNT(DISTINCT l.previousdoc) AS cash_sales_swept, ROUND(SUM(ABS(d.foreigntotal)),2) AS deposited,
MIN(TO_CHAR(d.trandate,'DD')) AS first_day, MAX(TO_CHAR(d.trandate,'DD')) AS last_day
FROM transaction d LEFT JOIN nexttransactionlinelink l ON l.nextdoc = d.id WHERE d.type='Deposit' GROUP BY TO_CHAR(d.trandate,'YYYY-MM') ORDER BY 1;
SELECT TO_CHAR(c.trandate,'YYYY-MM') AS ym, c.status, COUNT(*) AS cash_sales, ROUND(SUM(ABS(c.foreigntotal)),2) AS total, MIN(c.tranid) AS sample
FROM transaction c WHERE c.type='CashSale' AND NOT EXISTS (SELECT 1 FROM nexttransactionlinelink l JOIN transaction d ON d.id=l.nextdoc AND d.type='Deposit' WHERE l.previousdoc=c.id)
GROUP BY TO_CHAR(c.trandate,'YYYY-MM'), c.status ORDER BY 1
Query notes
Three probes failed:
GROUP BY … BUILTIN.DF(sn.name) ("Invalid or unsupported search" — group on the raw id);
BUILTIN.DF(t.account) on transaction and
transactionline.account (NOT_EXPOSED / "unexpected SuiteScript error") — landing account was read from status instead; a correlated
BUILTIN.DF(tl.location) in GROUP BY also errored. Cash-sale statuses: A Unapproved Payment · B Not Deposited · C Deposited.
BAppendix B — Hand-check
Payments 746 + 2 = 748 ✓ · Touch cohorts 12 + 725 + 11 = 748; $3,245.96 + $1,982,069.19 + $35,880.00 = $2,021,195.15 = Σ payment value ($2,018,495.15 + $2,700) ✓ · Invoice→payment buckets 658 + 2 + 46 + 22 + 6 + 2 = 736 ✓ · Due-date buckets 70 + 178 + 1 + 443 + 39 + 1 + 4 = 736 ✓ · INV03: $150 + $934.78 = $1,084.78 = invoice total ✓ · Unapplied: 1,049.79 + 960.11 + 934.78 + 49.99 + 65.30 + 97.95 + 55.50 + 32.54 = $3,245.96 ✓ · Open A/R: 790,017.65 + 138,228.97 = 928,246.62 ✓ · Production open: 53,424 + 25,355.33 + 15,687.25 + 13,841.83 + 12,447 + 11,302.23 + 6,171.33 = 138,228.97 ✓ · Unswept: 43 + 7 + 1 = 51; 6,370.47 + 2,153.77 + 111.81 = 8,636.05 ✓ · Deposits: Σ monthly = 49; Σ cash sales swept = 1,026 ✓.