Transaction Match
The Transaction Match record represents a match between imported bank transactions and general ledger transactions.
The internal ID for this record is transactionmatch.
The availability of this record in SuiteScript enables external AI clients to work with transaction matches through the NetSuite AI Connector Service. These connections use Model Context Protocol (MCP). For more information, see NetSuite AI Connector Service.
Your role needs the following access levels for the Reconcile permission:
-
To read a record, View access or higher.
-
To create a record, Create access or higher.
Account, subsidiary, and applicable transaction restrictions also apply.
For more information, see Permissions for Banking Features.
Creating a Transaction Match record requires an active bank or credit card account with the Use Match Bank Data and Reconcile Account Statement Pages checkbox selected on the account page.
The record does not have a standard record form.
For information about scripting with records, see SuiteScript 2.1 Scripting Records and Subrecords and N/record Module.
Supported Script Types
The Transaction Match record is supported in server-side scripts only. It is available in SuiteScript 2.1.
Supported Functions
You can read and create Transaction Match records through SuiteScript. Updating, copying, transforming, deleting, and searching through N/search are not supported.
Usage Notes
The record includes the following subrecords:
-
generalledgertransactionmatch -
importedtransactionmatch
You can populate the corresponding sublists only when creating the parent Transaction Match record. You cannot create their child records independently or update existing matches.
The following fields are system-controlled and read-only:
-
automatch -
matchtype -
matchsource -
suggestedbysystem -
matchedby -
reconciledby
Script Sample
The following sample defines functions for creating and loading a Transaction Match record. The sample loads the N/record module as record, but does not call either function. To create or load a record, call the corresponding function with valid IDs.
To create a match, provide an eligible imported bank transaction and a corresponding general ledger transaction line. The transactionLineId parameter specifies the transaction line's ID, not its sublist index.
/**
* @NApiVersion 2.1
*/
define(['N/record'], (record) => {
const createTransactionMatch = (
bankingTransactionId,
transactionDocId,
transactionLineId
) => {
const transactionMatch = record.create({
type: record.Type.TRANSACTION_MATCH,
isDynamic: true
});
transactionMatch.selectNewLine({
sublistId: 'importedtransactionmatch'
});
transactionMatch.setCurrentSublistValue({
sublistId: 'importedtransactionmatch',
fieldId: 'importedtransaction',
value: bankingTransactionId
});
transactionMatch.commitLine({
sublistId: 'importedtransactionmatch'
});
transactionMatch.selectNewLine({
sublistId: 'generalledgertransactionmatch'
});
transactionMatch.setCurrentSublistValue({
sublistId: 'generalledgertransactionmatch',
fieldId: 'transactiondoc',
value: transactionDocId
});
transactionMatch.setCurrentSublistValue({
sublistId: 'generalledgertransactionmatch',
fieldId: 'transactionline',
value: transactionLineId
});
transactionMatch.commitLine({
sublistId: 'generalledgertransactionmatch'
});
const transactionMatchId = transactionMatch.save();
return transactionMatchId;
};
const loadTransactionMatch = (transactionMatchId) => {
const transactionMatch = record.load({
type: record.Type.TRANSACTION_MATCH,
id: transactionMatchId
});
return transactionMatch;
};
return { createTransactionMatch, loadTransactionMatch };
});