Skip to main content
Version: Current

Purchase Invoices

Overview​

📥 Direction: NetSuite → Zudello
🔄 Sync Type: Incremental sync
⏱️ Frequency: Every 15 minutes
📋 Entity: Vendor bills with line items and expense allocations

Vendor bills (purchase invoices) flow from NetSuite to Zudello for historical reference, audit trails, and reconciliation purposes. The integration handles both item-based and expense-based vendor bills with intelligent document type classification.

Key Benefits

✅ Document Type Intelligence - Automatic INVOICE vs EXPENSE classification
✅ Complete History - Full vendor bill audit trail in Zudello
✅ Expense Allocation - Support for non-inventory expense bills
✅ Multi-level Approval - Track approval status and history
✅ Dimension Support - Full department, class, and location tracking

Processing Strategy​

The integration uses sophisticated SuiteQL queries that:

  • Join vendor bill headers with line details
  • Determine document type based on line composition
  • Handle both inventory and expense transactions
  • Filter for posted bills only
  • Support multi-subsidiary scenarios

Field Mappings​

Header Fields​

NetSuite FieldZudello Transaction FieldData TypeNotes
traniddocument_numberStringBill number/reference
trandatedate_issuedDateBill date
duedatedate_dueDatePayment due date
entitysupplierRelationLinks to Supplier
currencycurrencyRelationLinks to Currency
subsidiarysubsidiaryRelationLinks to Subsidiary
postingperiodposting_periodStringAccounting period
approvalstatusapproval_statusStringBill approval status
statustransaction_statusStringPosting status
exchangerateexchange_rateDecimalCurrency conversion rate
memonotesStringHeader notes
termspayment_termsRelationLinks to Payment Terms

Line Item Field Mappings​

NetSuite FieldZudello Line FieldData TypeNotes
lineline_numberIntegerLine sequence
itemitemRelationLinks to Item (if item line)
accountaccountRelationLinks to Account (if expense line)
descriptiondescriptionStringLine description
quantityquantityDecimalQuantity (1 for expenses)
rateunit_priceDecimalUnit rate or amount
amounttotal_exclusiveDecimalLine amount ex. tax
taxamounttax_totalDecimalLine tax amount
grossamttotal_inclusiveDecimalLine amount inc. tax
departmentdepartmentRelationLinks to Department
classclassificationRelationLinks to Classification
locationlocationRelationLinks to Location
custcol_projectprojectRelationLinks to Project

API Configuration​

SuiteQL Query Structure​

Complex query joining:

  • Transaction table for bill headers
  • TransactionLine table for line details
  • TransactionAccountingLine for posting details
  • Vendor table for supplier information
  • Subsidiary and dimension tables

Query Filters​

  • transaction.type = 'VendBill' - Vendor bills only
  • transaction.status = 'Posted' - Posted transactions only
  • transactionline.mainline = 'F' - Exclude header lines
  • transactionline.taxline = 'F' - Exclude tax lines
  • lastmodifieddate >= :last_sync_date - Incremental updates

Sync Configuration​

Incremental Sync Details​

  • Sync Field: lastmodifieddate
  • Initial Load: All posted vendor bills
  • Updates: Modified records since last sync
  • Frequency: Every 15 minutes
  • Processing Order: Oldest to newest

Document Requirements​

Vendor bills are synced when:

  • Status is "Posted" (not draft or pending)
  • Has at least one valid line item
  • Not marked as deleted or voided
  • Within configured date range

Special Processing Features​

Document Type Logic​

The integration determines document type based on line content:

INVOICE Classification:

  • Contains at least one item line
  • Typically matches to purchase orders
  • Includes inventory receipts

EXPENSE Classification:

  • Contains only expense account lines
  • No inventory items
  • Direct expense allocations

Line Type Handling​

Item Lines:

  • Must have valid item reference
  • Include quantity and rate
  • Link to inventory items

Expense Lines:

  • Must have account reference
  • Quantity defaults to 1
  • Rate equals total amount

Amount Processing​

  • All amounts stored in transaction currency
  • Tax calculated at line level
  • Totals validated against header amounts
  • Support for inclusive/exclusive tax

Dimension Mapping​

Full support for:

  • Department allocations
  • Class/Classification tracking
  • Location assignments
  • Project cost tracking
  • Custom dimension fields

Processing Logic​

Document Type Determination​

IF any line has item reference THEN
document_type = "INVOICE"
ELSE IF all lines have account reference THEN
document_type = "EXPENSE"
ELSE
document_type = "INVOICE" (default)
END IF

Line Processing Rules​

  1. Skip mainline = 'T' (header summary)
  2. Skip taxline = 'T' (tax summary)
  3. Process item lines with item reference
  4. Process expense lines with account reference
  5. Calculate missing prices from amount/quantity

Status Mapping​

NetSuite StatusZudello StatusDescription
Pending ApprovalPENDINGAwaiting approval
ApprovedAPPROVEDApproved, not posted
PostedPOSTEDFully posted
PaidPAIDPayment applied
VoidedVOIDEDCancelled bill

Troubleshooting​

IssueCauseSolution
Missing vendor billsStatus filterEnsure bills are posted
Wrong document typeLine type detectionVerify item vs expense lines
Missing line itemsLine filteringCheck mainline/taxline flags
Zero amountsMissing rate/amountVerify source data integrity
Dimension gapsUnmapped dimensionsConfigure dimension mappings
Approval status wrongCustom field mappingVerify approval field setup
Currency issuesMissing currency syncRun currency master first