Vendor Credits
Overview
The Vendor Credits integration creates vendor credit records in NetSuite from Zudello credit note data.
Direction: 📤 Zudello → NetSuite
Type: Real-time sync
API: NetSuite SOAP API
Frequency: On-demand processing
- Real-time vendor credit creation
- Automatic absolute value conversion
- Custom field array processing
- Support for both item and expense lines
- Linked transaction support
Header Field Mappings
The following fields are mapped from Zudello to NetSuite vendor credit headers:
Zudello Field | NetSuite Field | Description |
---|---|---|
CreditNoteNumber | tranId | Transaction reference number |
VendorCode | entity | Vendor reference |
CreditDate | tranDate | Transaction date |
Currency | currency | Transaction currency |
Memo | memo | Transaction memo/description |
Location | location | Location reference |
Department | department | Department reference |
Class | class | Class reference |
Subsidiary | subsidiary | Subsidiary reference |
Account | account | AP account reference |
AppliedTo | appliedTo | Applied transaction reference |
Line Processing
Item Lines
Item-based vendor credit lines with absolute value conversion:
Zudello Field | NetSuite Field | Description |
---|---|---|
ItemCode | item | Item reference |
Description | description | Line description |
Quantity | quantity | Item quantity (absolute value) |
Rate | rate | Unit price (absolute value) |
Amount | amount/grossAmt | Line amount (absolute value) |
Location | location | Line-level location |
Department | department | Line-level department |
Class | class | Line-level class |
TaxCode | taxCode | Tax code reference |
Customer | customer | Customer reference |
IsBillable | isBillable | Billable flag |
Expense Lines
Expense-based vendor credit lines with absolute value conversion:
Zudello Field | NetSuite Field | Description |
---|---|---|
Account | account | Expense account reference |
Description | memo | Line description |
Amount | amount/grossAmt | Line amount (absolute value) |
Location | location | Line-level location |
Department | department | Line-level department |
Class | class | Line-level class |
TaxCode | taxCode | Tax code reference |
Customer | customer | Customer reference |
IsBillable | isBillable | Billable flag |
API Configuration
SOAP API Method
The integration uses the add
operation with the following configuration:
- Record Type: VendorCredit
- Operation: add
- Response Handling: Captures internal ID on success
Authentication
Uses token-based authentication with:
- Account ID
- Consumer Key
- Consumer Secret
- Token ID
- Token Secret
Special Processing
Absolute Value Processing
All credit amounts are automatically converted to absolute values:
- Negative amounts become positive
- Ensures proper credit application
- Applies to quantity, rate, and amount fields
Custom Field Array Conversion
Custom fields support array-based processing:
-
Array Detection
- Identifies array-type custom fields
- Converts single values to arrays
-
Multi-Select Support
- Handles multi-select list fields
- Preserves selection order
-
Type Conversion
- Automatic type detection
- Proper formatting for each field type
Applied Transaction Linking
Vendor credits can be linked to original bills:
- Uses appliedTo field for linking
- Supports partial application
- Maintains audit trail
Processing Logic
Vendor Credit Creation Flow
-
Header Preparation
- Map standard fields
- Convert custom field arrays
- Set applied transaction
-
Line Processing
- Apply absolute value conversion
- Determine line type
- Process tax handling
-
API Submission
- Submit via SOAP API
- Capture response
- Store internal ID
Custom Field Processing
Custom fields undergo special processing:
- Script ID validation
- Array conversion for multi-select
- Type-specific formatting
- Null value handling
Error Handling
Common Errors
Error Type | Description | Resolution |
---|---|---|
INVALID_REF | Invalid vendor reference | Verify vendor exists in NetSuite |
INVALID_FLD | Invalid field value | Check field mappings and data types |
INSUFFICIENT_PERMISSION | User lacks permission | Review user role permissions |
APPLIED_TXN_NOT_FOUND | Applied transaction missing | Verify bill exists in NetSuite |
INVALID_ARRAY_VALUE | Invalid array field value | Check custom field configuration |
NEGATIVE_AMOUNT | Negative credit amount | System auto-converts to positive |
Retry Logic
- Automatic retry for transient errors
- Maximum 3 retry attempts
- Exponential backoff strategy
Troubleshooting
Issue | Possible Cause | Solution |
---|---|---|
Credit not created | Authentication failure | Verify API credentials |
Custom fields missing | Array conversion issue | Check field type configuration |
Application fails | Bill not found | Ensure bill exists before credit |
Amount sign issues | Manual negative entry | System handles conversion |
Multi-select errors | Invalid array format | Review custom field setup |