Sample output from the Audit Trail Investigator prompt in the NetSuite AI Prompt Library, run against a NetSuite test account. Every name and number here is test data. Back to the post · The library

Forensic review · NetSuite TD3016323

Audit Trail Investigation

Transaction lineage, user activity, change history, and anomaly screening across twelve months of posting activity, with the one finding that reframes all the others.

Prepared 2026-09-23 · Scope: posting transactions dated after 2025-09-23, system notes and login audit for the same window · Source: NetSuite via SuiteQL · Prompt: Audit Trail Investigator, NetSuite AI Prompt Library v1 · Standard Review depth

Investigation Summary

Scope: Standard Review. Posting transactions dated in the trailing twelve months (3,361 documents), the system notes recorded against transactions in the same window (1,022 notes), the login audit trail (7,042 events), and the employee master. The account holds 2.09 million system notes in total; 1.68 million of them belong to one custom record type and were excluded as out of scope for a transaction investigation.

The investigation produced one finding that governs every other. The entire twelve-month transaction history was entered into the account between September 2 and September 30, 2026: 2,783 of 3,361 documents (83%) were created more than 30 days after their transaction date, the median gap is 125 days, and 172 documents were created before the date they carry. This is a bulk load, not organic activity. Every timing test in the framework, after-hours entry, weekend entry, sequence analysis, must be read in that light: the patterns are real, but they describe the load, not the business.

Two findings survive that caveat. First, 98.3% of transactions carry no creator at all, so user attribution is impossible for the population; the system notes attribute the load to two user identities, both belonging to the account owner, working mostly through a Suitelet. Second, 45 pairs of transactions share a type, a counterparty, an amount, and a date within seven days, and two of them, an invoice pair and a payment pair, are same-day duplicates that deserve a look.

Documents in scope
3,361
posting, trailing 12 months
Without a creator
98%
3,305 documents
Entered 30+ days after date
83%
median gap 125 days
Possible duplicates
45
same type, entity, amount, within 7 days
Data integrity flag. Eight documents carry creation timestamps in October 2026, after the date of this investigation. Either the creation timestamp field is being written by the loading process rather than by the system, or the system clock was wrong during part of the load. Either way, the timestamp field cannot be treated as an independent record of when a document was entered. This is flagged for human review before any timing conclusion is used.

Transaction Timeline

Based on: creation timestamp against transaction date. The transaction dates run from September 2025 to September 2026, one year of business activity. The creation timestamps run from September 2 to September 30, 2026, four weeks. Everything the account shows as a year of trading was keyed in a month.

TypeDocumentsAfter hoursWeekendRound amountsMedian days after dateEntered 30+ days late
VendBill5522094910120471
VendPymt543210405117457
CashSale5425413550154462
ItemRcpt410260401112336
CustInvc4051372400149343
CustPymt3941422392148315
ItemShip3892022440150322
Journal60281106238
Deposit272518016522

The lag is consistent across document types, which is what a scripted load looks like. Vendor bills and payments were entered in one pass, customer documents in another, with medians four weeks apart. Journals were entered last, with the shortest lag, and mostly in the first half of September.

User Activity Analysis

The transaction table attributes only 56 of 3,361 documents to a user. The system notes are more complete: 1,022 notes on transactions in the window, 741 by the identity "Timothy Dietrich" and 278 by "Tim Dietrich", both belonging to the account owner. By context, 835 of the notes were written from a Suitelet, 120 from the user interface, and 64 through the REST API. The load was performed by a script, and the script's user is the owner.

Login audit, trailing twelve months. 7,042 events from 116 distinct IP addresses, 63 failures. The account owner accounts for 6,766 of them, and 5,663 of those are calls to the MCP endpoint, which is programmatic access by an AI tool, not a person at a keyboard. Six other named users logged in during the year. The failures are token expiries (18) and a handful of wrong passwords; one wrong second factor. Nothing in the login trail suggests unauthorized access.

UserLogin events
Tim Dietrich6,766
Timothy Dietrich139
Partner Admin 151
(token)26
Kathryn Glass24
Jacob Bailey19
Ben Morgan12
Nick Singh4
Ann Traynor1

Access review. 51 employee records, 20 inactive, 21 with NetSuite access. No inactive employee retains access. However, 13 employees with access have no login event in twelve months. Those are dormant accounts under the prompt's definition and are listed for review: Abby Kwan, Conner Avery, Dean Nolan, Emma Richards, Frank Davenport, Jeff Shipit, Joel Williams, Larry Nelson, Melissa Seaver, Molly Williams, Rick Ventz, Stella James, Sylvia Belanger.

Change Analysis

125 documents were modified on a day after their creation, 3.7% of the population. The system notes on journal entries, the highest-risk document type, total 29 notes across 10 journals, all from May 2026, and all of them creation events through the REST API or a Suitelet. There are no field-level edits to journals in the window. That is either good news or evidence that journals are created complete by script and never touched, which for this account is the same thing.

The prompt's change-analysis block looks for override actions and deletions. The system notes in scope contain no approval overrides, because the account runs no approval workflow on the document types examined, and the deleted-record log was not in scope for this review.

Anomaly Inventory

Timing

1,786 documents (53%) were created outside 08:00 to 18:00, and 1,239 (37%) on a weekend. Under the prompt's thresholds that is "extensive" after-hours activity and would rate high risk. It does not here. The hour histogram below shows the load running in sessions at 03:00 to 07:00 and 15:00 to 17:00, and the weekday chart shows Wednesday and Saturday as the two busiest days. Those are the hours a person ran a loading script, not the hours a business enters invoices.

00:002701:004303:0021704:006905:0053506:0018007:0056208:00909:002510:0014211:0016612:002513:002315:0014416:0067217:0036918:002419:00320:004221:004422:001023:0030 MON59TUE24WED967THU443FRI629SAT855SUN384

Round amounts

18 documents (0.5%) are exact multiples of $1,000. That is well under the 5% low-risk threshold. The largest is a $31,000 vendor bill from Generation N; the rest are small vendor bills and payments to Bedline, Crown Equipment, and Flexsteel. None warrants follow-up on amount alone.

Sequential and duplicate patterns

The prompt's sequential test compares each document with the previous one of the same type. Applied as a duplicate screen (same type, same counterparty, same amount, dates within seven days), it returns 45 candidates. Most are retail cash sales for the same customer at the same price a few days apart, which is ordinary repeat purchasing. Two are not ordinary and are listed first below.

TypeCounterpartyAmountDocumentsDates
VendPymtGeneration N$33,700.0000000005/1-12102024-181841 / 00000005/13/1/2026 / 3/1/2026
CustInvcMacgruber Incorporated$16,884.00INV762 / INV7638/27/2026 / 8/27/2026
ItemRcptBroyhill$2,780.00IR1092 / IR10978/7/2026 / 8/12/2026
ItemRcptBroyhill$2,780.00IR1119 / IR11229/6/2026 / 9/7/2026
VendBillBroyhill$2,780.00None / None8/9/2026 / 8/14/2026
VendBillBroyhill$2,780.00None / None9/9/2026 / 9/10/2026
VendPymtBroyhill$2,780.00980 / 9838/12/2026 / 8/17/2026
VendPymtBroyhill$2,780.001000 / 10019/13/2026 / 9/14/2026
ItemRcptHestra$2,600.00IR820 / IR8235/11/2026 / 5/11/2026
VendBillHestra$2,600.00None / None5/12/2026 / 5/12/2026

Evidence Documentation

Every figure above is reproducible from the queries in the appendix. Evidence for the bulk-load finding is the distribution of creation timestamps (3,353 in September 2026, 8 in October 2026, none earlier) against transaction dates spanning twelve months. Evidence for the attribution finding is the creator field, null on 3,305 rows, cross-referenced with the system note author on 1,022 notes. Evidence for the duplicate candidates is the document pairs listed, with internal ids retained in the data extract.

30 / 60 / 90 day framing

Appendix: Data Lineage

IDTypeNameHandleScopeUsed forComplete
DL-001SuiteQLPosting transactionstransaction (posting = T)Trailing 12 months, 3,361 rowsPopulation, timing, amounts, duplicatesYes
DL-002SuiteQLCreation timestampstransaction, TO_CHAR(createddate, HH24:MI)Same population plus all journalsHour and weekday analysisYes
DL-003SuiteQLSystem notes on transactionssystemnote, recordtypeid = -30Trailing 12 months, 1,022 notesAttribution, context, change reviewYes
DL-004SuiteQLLogin auditloginauditTrailing 12 months, 7,042 eventsAccess patternsYes
DL-005SuiteQLEmployeesemployee51 recordsAccess reviewYes, no last-login field

Adaptations from the prompt's templates: the modification-history query joins system notes to transactions by recordtypeid = -30 and recordid, because systemnote.record holds a display name rather than an id; the JSON returned for createddate carries the date only, so the hour was fetched with TO_CHAR(createddate, 'HH24:MI'); transaction.subsidiary is not exposed, so no subsidiary filter was applied; employee.lastlogindate is not exposed, so dormancy was measured from the login audit instead; the sequential-analysis window function was replaced by a duplicate screen computed in code.

Queries
SELECT t.id, t.type, t.tranid, t.trandate, t.createddate, BUILTIN.DF(t.createdby), t.createdby, t.foreigntotal, BUILTIN.DF(t.entity), t.memo, t.lastmodifieddate
FROM transaction t WHERE t.posting = 'T' AND t.trandate >= ADD_MONTHS(SYSDATE, -12)

SELECT id, type, TO_CHAR(createddate, 'YYYY-MM-DD HH24:MI'), TO_CHAR(lastmodifieddate, 'YYYY-MM-DD HH24:MI'), TO_CHAR(createddate, 'DY')
FROM transaction WHERE type = 'Journal' OR (posting = 'T' AND trandate >= ADD_MONTHS(SYSDATE, -12))

SELECT sn.field, sn.type, sn.context, sn.name, BUILTIN.DF(sn.name), COUNT(*), MIN(sn.date), MAX(sn.date)
FROM systemnote sn WHERE sn.recordtypeid = -30 AND sn.date >= ADD_MONTHS(SYSDATE, -12)
GROUP BY sn.field, sn.type, sn.context, sn.name, BUILTIN.DF(sn.name)

SELECT sn.recordid, sn.record, sn.date, BUILTIN.DF(sn.name), sn.field, sn.oldvalue, sn.newvalue, sn.type, sn.context
FROM systemnote sn WHERE sn.recordtypeid = -30 AND sn.record LIKE 'Journal%' AND sn.date >= ADD_MONTHS(SYSDATE, -12)

SELECT BUILTIN.DF(la.user), la.status, la.detail, la.ipaddress, la.requesturi, COUNT(*), MIN(la.date), MAX(la.date)
FROM loginaudit la WHERE la.date >= ADD_MONTHS(SYSDATE, -12)
GROUP BY BUILTIN.DF(la.user), la.status, la.detail, la.ipaddress, la.requesturi

SELECT e.id, e.entityid, e.isinactive, e.giveaccess, BUILTIN.DF(e.department), e.hiredate, e.releasedate FROM employee e

Appendix: Assumptions and Verification

AssumptionCategoryRationaleSensitivityImpact if wrong
Creation timestamp records when a document was enteredDataSystem-maintained fieldHighThe bulk-load finding; the October timestamps already cast doubt
System note author is the actual actorDataSystem attributionHighAttribution of the load
After hours = before 08:00 or from 18:00, account time zoneBusiness logicPrompt definitionLowAfter-hours counts
Duplicate = same type, counterparty, amount, within 7 daysMethodConservative screenMediumCandidate list; requires human confirmation
Custom-record system notes out of scopeMethod1.68M notes on one custom record type; not transactionsLowNone for transaction findings
TestObjectiveResult
G1-001Trail completenessQualified system notes cover the load; the transaction creator field does not
G1-002Timestamp accuracyFail 8 creation timestamps postdate the investigation
G1-003User attributionFail 98.3% of documents have no creator; attribution rests on system notes
G2-001Pattern detection reasonablePass patterns match a scripted load; reviewed manually
G2-002Timeline sequencePass creation order consistent with document type batches

Confidence: 95% that the twelve-month history was bulk-loaded in September 2026 (timestamp distribution, system note context, uniform lag); 90% that the two same-day pairs are duplicates worth reviewing; low confidence in any conclusion about user behavior, because the population contains almost no organic activity.

Analysis is read-only and derived from live SuiteQL. Customer- and vendor-specific actions require human review before any account change.SuiteStep, LLC