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.
✅ 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 Field | Zudello Transaction Field | Data Type | Notes |
---|---|---|---|
tranid | document_number | String | Bill number/reference |
trandate | date_issued | Date | Bill date |
duedate | date_due | Date | Payment due date |
entity | supplier | Relation | Links to Supplier |
currency | currency | Relation | Links to Currency |
subsidiary | subsidiary | Relation | Links to Subsidiary |
postingperiod | posting_period | String | Accounting period |
approvalstatus | approval_status | String | Bill approval status |
status | transaction_status | String | Posting status |
exchangerate | exchange_rate | Decimal | Currency conversion rate |
memo | notes | String | Header notes |
terms | payment_terms | Relation | Links to Payment Terms |
Line Item Field Mappings
NetSuite Field | Zudello Line Field | Data Type | Notes |
---|---|---|---|
line | line_number | Integer | Line sequence |
item | item | Relation | Links to Item (if item line) |
account | account | Relation | Links to Account (if expense line) |
description | description | String | Line description |
quantity | quantity | Decimal | Quantity (1 for expenses) |
rate | unit_price | Decimal | Unit rate or amount |
amount | total_exclusive | Decimal | Line amount ex. tax |
taxamount | tax_total | Decimal | Line tax amount |
grossamt | total_inclusive | Decimal | Line amount inc. tax |
department | department | Relation | Links to Department |
class | classification | Relation | Links to Classification |
location | location | Relation | Links to Location |
custcol_project | project | Relation | Links 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 onlytransaction.status = 'Posted'
- Posted transactions onlytransactionline.mainline = 'F'
- Exclude header linestransactionline.taxline = 'F'
- Exclude tax lineslastmodifieddate >= :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
- Skip mainline = 'T' (header summary)
- Skip taxline = 'T' (tax summary)
- Process item lines with item reference
- Process expense lines with account reference
- Calculate missing prices from amount/quantity
Status Mapping
NetSuite Status | Zudello Status | Description |
---|---|---|
Pending Approval | PENDING | Awaiting approval |
Approved | APPROVED | Approved, not posted |
Posted | POSTED | Fully posted |
Paid | PAID | Payment applied |
Voided | VOIDED | Cancelled bill |
Troubleshooting
Issue | Cause | Solution |
---|---|---|
Missing vendor bills | Status filter | Ensure bills are posted |
Wrong document type | Line type detection | Verify item vs expense lines |
Missing line items | Line filtering | Check mainline/taxline flags |
Zero amounts | Missing rate/amount | Verify source data integrity |
Dimension gaps | Unmapped dimensions | Configure dimension mappings |
Approval status wrong | Custom field mapping | Verify approval field setup |
Currency issues | Missing currency sync | Run currency master first |
Related Documentation
- Suppliers - Vendor master data setup
- Items - Inventory item configuration
- Accounts - Chart of accounts for expenses
- Purchase Orders - Related PO tracking
- Purchase Credits - Credit memo processing
- Departments - Department dimension setup
- Projects - Project cost allocation