NetSuite Invoice Mapping Documentation
A NetSuite Invoice can be captured into iPaaS.com as a transaction, linked to the originating Sales Order, and — through a related collection — an invoice's payment can be written back to NetSuite as a Customer Payment applied to that invoice. The invoice capture maps the transaction header (number, type, status, customer, dates, amounts) and, through its child collections, the invoice lines, address, and note.
Collections in This Document
Collection | Direction | Purpose |
Add/Update NetSuite Invoice TO iPaaS.com | NetSuite → iPaaS.com | Captures a NetSuite invoice as an iPaaS.com transaction, linked to its originating order. |
Add/Update NetSuite Invoice Line TO iPaaS.com | NetSuite → iPaaS.com | The invoice line items. |
Add NetSuite Invoice Address TO iPaaS.com | NetSuite → iPaaS.com | The invoice's billing/shipping address. |
Add/Update NetSuite Invoice Note TO iPaaS.com | NetSuite → iPaaS.com | The invoice note/memo. |
Add/Update NetSuite Customer Payment FROM iPaaS.com | iPaaS.com → NetSuite | Creates a NetSuite Customer Payment from an iPaaS.com invoice's payment and applies it to the invoice. |
How Sales Orders, Invoices, and Payments relate
A NetSuite invoice is generated from a Sales Order. When the integration captures the invoice (TO iPaaS.com), it records the originating order on the NetSuite Sales Order ID custom field and links the iPaaS.com invoice transaction to its order through ParentId. Before capturing, the integration validates the invoice against that originating order (matching line quantities and totals — see the filter). In the other direction, the Customer Payment FROM iPaaS.com collection takes a payment recorded on the iPaaS.com invoice and posts it to NetSuite as a Customer Payment applied to the corresponding NetSuite invoice. See the NetSuite Sales Order To iPaaS.com Mapping Documentation for the order side.
ID Format
Invoice capture (Manual Sync): the NetSuite invoice's internal ID. iPaaS.com records the NetSuite internal ID as the external-ID link (primary match), and carries it in the Transaction Number as the fallback match key.
Customer Payment (Manual Sync): the iPaaS.com record ID of the invoice transaction whose payment should be recorded. The NetSuite customer payment's own internal ID is supplied through the Netsuite Customer Payment Id iPaaS.com custom field.
Custom Field Support
NetSuite-specific invoice identifiers are captured into iPaaS.com custom fields named NetSuite … — NetSuite Sales Order ID (the originating order), NetSuite Invoice Internal Id, NetSuite Invoice External Id, and Payment Terms. Add the matching iPaaS.com custom fields to retain these attributes. The Customer Payment collection reads the Netsuite Customer Payment Id custom field (see ID Format).
Mapping Collection Status
Status: all collections Enabled.
Trigger Events: the Invoice capture collections fire on NetSuite
invoice/created/invoice/updatedevents (Inbound Data Flows + the NetSuite-side webhook scripts). The Customer Payment collection fires on the iPaaS.com transaction outbound triggers (Outbound Data Flows). Manual Sync is available for all.
Duplicate or Conflicting Mappings
Add / Update NetSuite Sales Order TO iPaaS.com — captures the originating order (a transaction routes to the order or invoice collection by its filter).
Supported Child Collections
The Add/Update NetSuite Invoice TO iPaaS.com parent transfers these children:
Add/Update NetSuite Invoice Line TO iPaaS.com — the invoice line items.
Add NetSuite Invoice Address TO iPaaS.com — the billing/shipping address.
Add/Update NetSuite Invoice Note TO iPaaS.com — the invoice note/memo.
System Caveats
NetSuite / Invoice capture
Order–invoice validation. Capture is gated on the invoice's line quantities matching the originating sales order and the order total matching the invoice total (the order total is read from the custbodycustbody_otg_ipaas_original_or custom field set on the FROM-iPaaS side). A mismatch stops the transfer with an error (see Error Handling).
Only partially-paid invoices are captured. A fully paid invoice (amount paid equal to total) is skipped, and an invoice with no amount paid is skipped.
Status is a lookup translation.
Statusmaps the NetSuite invoice status to an iPaaS.com transaction status via a lookup translation configured in the NetSuite subscription's Subscription Settings in iPaaS.com.Customer, products, and shipping method are created for you. Before the invoice is captured, the integration creates as prerequisites in iPaaS.com — if they are not already linked — the customer or company, each line item's product, and the shipping method. A failure on a blocking prerequisite stops the capture.
Customer Payment
The invoice must already exist in NetSuite — the payment is applied to a NetSuite invoice resolved from the related transaction.
Payment cannot exceed the invoice total — if the source payments total more than the invoice total, the transfer fails with an error.
Already-recorded payments are skipped — a transaction that already carries a NetSuite Customer Payment ID is not processed again, preventing duplicate payments.
Setup Requirements
Status lookup translation — configure the NetSuite-invoice-status → iPaaS.com-status mapping in the NetSuite subscription's Subscription Settings in iPaaS.com.
Inbound Data Flows + webhook scripts — enable the NetSuite invoice events and install the NetSuite-side webhook scripts for automatic invoice capture.
Outbound Data Flows — enable the iPaaS.com transaction outbound triggers for the Customer Payment collection.
Custom fields — the NetSuite Sales Order ID / Invoice Internal Id / Invoice External Id / Payment Terms capture custom fields, and the Netsuite Customer Payment Id custom field used by the Customer Payment collection.
Authentication
The integration authenticates to NetSuite using the connection configured for the integration; the webhook scripts that emit NetSuite events and the tax/total custom-field handling are documented in NetSuite Connections and Settings.
Integration Flow
Capture invoice. A NetSuite invoice transfers — on demand (NetSuite invoice internal ID) or on
invoice/created/invoice/updatedevents. The integration validates the invoice against its originating order (line quantities and total), then creates or updates the iPaaS.com transaction (matched by external ID, then Transaction Number), records the originating order on NetSuite Sales Order ID and ParentId, and transfers the lines, address, and note children.Record payment. The Customer Payment FROM iPaaS.com collection takes a payment on the iPaaS.com invoice transaction, resolves the NetSuite customer and invoice, and creates a NetSuite Customer Payment applied to that invoice (optionally through Undeposited Funds).
Mappings
Add/Update NetSuite Invoice TO iPaaS.com
iPaaS.com data type: Transaction
Mapping Filter
if(AmountPaid != null) {if (AmountPaid == Total)
return false;var validateInvoiceLine = await ValidateInvoiceLineItemsAsync(TransactionLineItems,CreatedFrom_Id);
if(validateInvoiceLine == false) {
throw new Exception("Invoice validation failed: one or more invoice line items do not match the original sales order quantities. Invoice will not be transferred to iPaaS.");
return false;
}
var verifyOrderTotalEqualsInvoice = await VerifyOrderTotalEqualsInvoiceAsync(Total,CreatedFrom_Id,"custbodycustbody_otg_ipaas_original_or");
if(verifyOrderTotalEqualsInvoice == false) {
var expected = GetCustomValueObject(AdditionalProperties,"custbodycustbody_otg_ipaas_original_or");
throw new Exception($"Order-Invoice total validation failed: Original order total ({expected}) does not match the invoice total ({Total}). Invoice will not be transferred to iPaaS.");
return false;
}
return true;
}
else {
return false;
}Filter Description. A fully paid invoice (AmountPaid equal to Total) is skipped, and an invoice with no AmountPaid is skipped — only partially-paid invoices proceed. For those, the integration runs two validations against the originating sales order: it checks that the invoice line quantities match the order (else throws "Invoice validation failed: one or more invoice line items do not match the original sales order quantities. Invoice will not be transferred to iPaaS."), then verifies the order total matches the invoice total via the custbodycustbody_otg_ipaas_original_or custom field (else throws "Order-Invoice total validation failed: Original order total (…) does not match the invoice total (…). Invoice will not be transferred to iPaaS."). Only when both pass is the invoice captured.
Captures a partially-paid NetSuite invoice into iPaaS.com after validating it against the originating sales order.
Mapping Type | Source Field (NetSuite) | Destination Field (iPaaS.com) | Description |
Dynamic Formula |
| SystemId | Required. Identifies the iPaaS.com system the transaction belongs to. |
Field | TransactionId | TransactionNumber | Required. Links the invoice to its NetSuite record; the fallback match key. |
Dynamic Formula |
| ParentId | Recommended. Links the invoice to its originating order in iPaaS.com. |
Dynamic Formula |
| CustomerId | Recommended. Links the invoice to the customer, resolved from the invoice's NetSuite customer. |
Static |
| Type | Required. The transaction type (defaults to |
Lookup | Lookup Translation: Status | Status | Required. Sets the iPaaS.com transaction status via a lookup translation (NetSuite invoice status → iPaaS.com status). |
Dynamic Formula |
| EmailAddress | Recommended. The customer's email address. |
Dynamic Formula |
| DiscountAmount | Recommended. The invoice discount amount, captured as a positive value. |
Dynamic Formula |
| TaxAmount | Recommended. The invoice tax amount captured from NetSuite. |
Dynamic Formula |
| ShippingAmount | Recommended. The invoice shipping amount (shipping plus handling). |
Field | Subtotal | Subtotal | Recommended. The invoice subtotal. |
Field | Total | Total | Recommended. The invoice total. |
Field | DueDate | Date | Recommended. The invoice due date. |
Dynamic Formula |
| TransactionCreatedDateTime | Recommended. The date/time the invoice was created in NetSuite. |
Field | CreatedFrom_Id | NetSuite Sales Order ID | Optional. Capture-side custom field — records the originating sales order ID. |
Field | Id | NetSuite Invoice Internal Id | Optional. Capture-side custom field — the NetSuite invoice internal ID. |
Field | ExternalId | NetSuite Invoice External Id | Optional. Capture-side custom field — the NetSuite invoice external ID. |
Field | Terms_RefName | Payment Terms | Optional. Capture-side custom field — the payment terms from NetSuite. |
Add/Update NetSuite Invoice Line TO iPaaS.com
iPaaS.com data type: Transaction Line
Mapping Filter
var cleanName = Item_RefName;
if (cleanName.Contains(" : ")){
string[] skus = cleanName.Split(" : ");
cleanName = skus.LastOrDefault();
}
var netSuiteProductId = await GetNetSuiteProductIdBySku(cleanName);
if(netSuiteProductId != null){
return true;
}
else{
throw new Exception("Sku "+cleanName+" can not be linked/used to a NetSuite item id so transaction can't be created using this line item")
}Filter Description. Derives the SKU from Item_RefName — for matrix items "Parent : Child" it takes the part after " : " — and resolves it to a NetSuite product; passes if found, otherwise throws "Sku [cleanName] can not be linked/used to a NetSuite item id so transaction can't be created using this line item".
Captures each NetSuite invoice line into the iPaaS.com transaction.
Mapping Type | Source Field (NetSuite) | Destination Field (iPaaS.com) | Description |
Static |
| Type | Required. Identifies the line as a product line. |
Static |
| Status | Required. The initial captured line status. |
Dynamic Formula |
| Sku | Required. The item SKU for the line, derived from the NetSuite item reference name. |
Field | Description | Description | Optional. The line description. |
Field | Quantity | Qty | Required. The quantity invoiced on the line. |
Dynamic Formula |
| UnitPrice | Recommended. The unit price (line amount ÷ quantity). |
Field | Amount | ExtendedPrice | Recommended. The extended (line total) amount. |
Field | Rate | OriginalUnitPrice | Optional. The original unit price before discounts. |
Add NetSuite Invoice Address TO iPaaS.com
iPaaS.com data type: Transaction Address
Captures the NetSuite invoice address into iPaaS.com (no filter).
Mapping Type | Source Field (NetSuite) | Destination Field (iPaaS.com) | Description |
Field | Addr1 | Address1 | Recommended. The first address line. |
Field | Addr2 | Address2 | Optional. The second address line. |
Field | Addr3 | Address3 | Optional. The third address line. |
Field | City | City | Recommended. The city. |
Field | State | Region | Recommended. The state/region. |
Field | Country_RefName | Country | Recommended. The country. |
Field | Zip | PostalCode | Recommended. The postal/ZIP code. |
Field | IsPrimaryBilling | IsPrimaryBilling | Recommended. Whether this is the primary billing address. |
Field | IsPrimaryShipping | IsPrimaryShipping | Recommended. Whether this is the primary shipping address. |
Dynamic Formula |
| FirstName | Recommended. The recipient first name, parsed from the NetSuite addressee. |
Dynamic Formula |
| LastName | Recommended. The recipient last name, parsed from the addressee. |
Add/Update NetSuite Invoice Note TO iPaaS.com
iPaaS.com data type: Transaction Note
Mapping Filter
SourceTypeName == "ParentOnly" && !string.IsNullOrEmpty(Parent.Memo)
Filter Description. Captures a single customer note from the parent invoice's memo, only when that memo is non-empty.
Captures the invoice memo into iPaaS.com as a customer note.
Mapping Type | Source Field (NetSuite) | Destination Field (iPaaS.com) | Description |
Static |
| Type | Control. The note type recorded in iPaaS.com. |
Dynamic Formula |
| Text | Optional. The invoice memo text captured from NetSuite. |
Add/Update NetSuite Customer Payment FROM iPaaS.com
iPaaS.com data type: Transaction
Mapping Filter
var customerPaymentId= GetCustomFieldValue(CustomFields, "Netsuite Customer Payment Id");if(Payments?.Count > 0 && Type == "Invoice" && Type != "Return" && string.IsNullOrEmpty(customerPaymentId)){
if(Payments.sum(sa=>sa.Amount) > Total){
throw new exception("Payment Total must not be greater than the Invoice Total. Unable to create Customer Payment.")
}
return true;
}
return false;Filter Description. Processes the transaction only when it has at least one payment, its Type is Invoice (and not Return), and the Netsuite Customer Payment Id custom field is empty (no payment recorded yet). It then validates that the summed payment amount does not exceed the invoice total; if it does, it throws "Payment Total must not be greater than the Invoice Total. Unable to create Customer Payment." and the payment is not created. Every other case is skipped.
Creates a NetSuite Customer Payment from an iPaaS.com invoice's payment and applies it to the related invoice.
Mapping Type | Source Field (iPaaS.com) | Destination Field (NetSuite) | Description |
Static |
| CreateTransactionAs | Control — required. Tells the integration to create the transaction as a NetSuite customer payment; the value must be exactly |
Dynamic Formula |
| Payment | Required. The payment amount, totalled from the transaction's payments. |
Dynamic Formula |
| CustomerPaymentCustomer_Id | Required. Identifies the NetSuite customer the payment is recorded against (company when present, otherwise the customer); the customer must exist in NetSuite. |
Field | Netsuite Customer Payment Id (custom field) | CustomerPaymentId | Required. The NetSuite internal ID of the customer payment, supplied from the Netsuite Customer Payment Id iPaaS.com custom field. |
Dynamic Formula |
| CustomerPaymentApplyItem_CustomerPaymentDoc_Id | Required when applying. Identifies the NetSuite invoice the payment is applied to; the invoice must already exist in NetSuite. |
Dynamic Formula |
| PaymentOption_Id | Recommended. The NetSuite payment method, resolved from the source payment's method; the method must exist in NetSuite. |
Field | Id | ExternalId | Recommended. An external identifier set from the source transaction ID, for correlating the payment. |
Dynamic Formula |
| UndepFunds_Id | Control. Whether the payment posts to NetSuite's Undeposited Funds account. |
Static |
| CustomerPaymentApplyItem_Apply | Control. Whether the payment is applied to the related invoice; keep |
Dynamic Formula |
| Memo | Optional. A memo taken from the first payment's description. |
Error Handling
"Invoice validation failed: one or more invoice line items do not match the original sales order quantities. Invoice will not be transferred to iPaaS." — the invoice's line quantities differ from the originating sales order. Resolution: confirm the invoice matches its order, or adjust in NetSuite, before re-syncing.
"Order-Invoice total validation failed: Original order total (…) does not match the invoice total (…). Invoice will not be transferred to iPaaS." — the invoice total differs from the originating order total (read from
custbodycustbody_otg_ipaas_original_or). Resolution: confirm the order/invoice totals reconcile."Sku [item] can not be linked/used to a NetSuite item id so transaction can't be created using this line item" — an invoice line's item could not be resolved to a NetSuite product. Resolution: confirm the item/SKU is linked in NetSuite.
"Payment Total must not be greater than the Invoice Total. Unable to create Customer Payment." — the payments exceed the invoice total. Resolution: confirm the payment amounts and the invoice total.
Invoice not found (Customer Payment) — the payment applies to a NetSuite invoice resolved from the related transaction; if the invoice has not been created in NetSuite, the payment cannot be applied. Resolution: ensure the invoice exists in NetSuite first.
Testing & Validation
Test Scenarios
Capture an invoice. Manually sync a partially-paid NetSuite invoice and confirm an iPaaS.com transaction is created, linked to its originating order (NetSuite Sales Order ID + ParentId), with lines, address, and note.
Validation guards. Confirm an invoice whose lines or total do not match its order is rejected with the documented validation message; confirm a fully paid invoice is skipped.
Line SKU resolution. Confirm a line whose item resolves to a NetSuite product captures, and an unresolved item raises the documented error.
Customer payment. Sync an invoice transaction with a payment and confirm a NetSuite Customer Payment is created and applied to the invoice; confirm a payment exceeding the invoice total is rejected; confirm a transaction already carrying a Customer Payment ID is skipped.
Validation Checklist
The Status lookup translation is configured in the NetSuite subscription's Subscription Settings in iPaaS.com.
The capture custom fields (NetSuite Sales Order ID / Invoice Internal Id / Invoice External Id / Payment Terms) and the Netsuite Customer Payment Id custom field exist in iPaaS.com.
The originating order total custom field (
custbodycustbody_otg_ipaas_original_or) is set on NetSuite orders so the order–invoice validation passes.For customer payments, the related invoice exists in NetSuite and the payment method resolves.
Additional Notes
Relationship to orders. Invoices link to their originating Sales Order; see the NetSuite Sales Order To iPaaS.com Mapping Documentation.
Customer Payment is the only FROM-iPaaS collection here; it writes a payment to NetSuite rather than capturing data from it.
Known limitations affecting invoices will be collected in NetSuite Known Limitations.
