n8n-nodes-myobv2
Version:
Comprehensive n8n node for MYOB Business API - Sales Orders, Customers, Items, Invoices, and more
195 lines (155 loc) โข 6.84 kB
Markdown
# Changelog
All notable changes to the MYOB v2 community node will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.2.6] - 2025-01-11
### Fixed
- **Critical**: Resolved "Lines[0].Location.UID" error in updateOrder operation
- Added Location UID to all line items to satisfy MYOB API requirement for inventoried items
- Each line item now includes `Location: { UID: defaultLocationUid }` in the payload
- Ensures compliance with MYOB inventory tracking requirements
### Technical Details
- Updated line item processing logic in updateOrder operation
- All line items now include the required Location UID parameter
- Prevents MYOB API validation errors for inventoried products
- Uses the configured Default Location UID for all line items
## [1.2.5] - 2025-01-11
### Fixed
- **Critical**: Resolved "TaxCode is required" error in updateOrder operation
- Added comprehensive tax code fallback logic for all line items
- Implemented three-level tax code resolution:
1. SKU-matched item's SellTaxCode UID
2. Default product's SellTaxCode UID
3. Configured Default Tax Code UID (new required parameter)
- Added tax code handling for shipping line items
- Ensured all line items always have a TaxCode UID assigned
### Added
- New required parameter: "Default Tax Code UID" for updateOrder operation
- Tax code fallback logic for shipping line items (uses freight tax code or default)
- Comprehensive validation to prevent MYOB TaxCode validation errors
### Changed
- updateOrder operation now requires Default Tax Code UID parameter
- Improved tax code assignment reliability
- Enhanced error handling for tax code lookups
## [1.0.0] - 2025-01-11
### Added
#### ๐ Multi-Resource Support
- **Sales Orders**: Create, Get, List operations
- **Customers**: Create, Get, List operations
- **Items/Inventory**: Create, Get, List operations
- **Invoices**: Get, List, Create from Sales Order operations
#### ๐ง Resource-Operation Architecture
- Resource selector with 4 main categories
- Operation-specific field visibility
- Unified authentication across all resources
- Consistent error handling patterns
#### ๐ฆ Sales Order Features
- Create sales orders with multiple line items
- Support for UI form input and JSON array input
- Shopify webhook integration with automatic SKU lookup
- Discount calculation from Shopify discount allocations
- Multi-line shipping address support
- Shipping line item integration
- Purchase order number support with automatic lookup
- Fallback SKU support for missing items
#### ๐ฅ Customer Management
- Create customers with company name, email, phone
- Auto-generated customer numbers (optional override)
- Address and contact information support
- Customer lookup by UID
- Customer listing with OData filtering
#### ๐ Item/Inventory Management
- Create inventory items with SKU, name, description, price
- Get items by UID or SKU lookup
- List items with advanced filtering
- Automatic inventory item configuration (sold/bought flags)
- Base selling price support
#### ๐งพ Invoice Operations
- Get invoices by UID
- List invoices with filtering
- Convert sales orders to invoices automatically
- Preserve sales order details (customer, lines, addresses, etc.)
#### ๐ Advanced List Operations
- OData filtering support for all list operations
- Pagination with configurable limits
- Date range filtering
- Boolean and text matching filters
- Numeric comparison filters
#### ๐ก๏ธ Error Handling & Validation
- Graceful SKU lookup failures with default fallback
- Detailed error messages with context
- Network error handling with retry suggestions
- Field validation with clear error descriptions
- Continue-on-fail support for batch operations
#### ๐ Authentication
- OAuth2 integration with MYOB cloud
- Automatic base URL construction from company file GUID
- Secure credential management
- Token refresh handling
#### ๐ Shopify Integration
- Direct support for Shopify webhook line_items structure
- Automatic price parsing (string to number)
- Quantity handling (current_quantity fallback)
- Product title and variant consolidation
- Discount allocation processing
- Empty SKU handling with defaults
#### ๐ง Technical Features
- TypeScript implementation with full type safety
- Modular handler architecture for each resource
- Async/await patterns for all API calls
- Comprehensive input validation
- Response normalization across operations
### Technical Details
#### API Endpoints Covered
- `/Sale/Order/Item` - Sales order operations
- `/Contact/Customer` - Customer operations
- `/Inventory/Item` - Item/inventory operations
- `/Sale/Invoice/Item` - Invoice operations
#### Node Structure
- Resource-based operation routing
- Conditional field visibility based on resource/operation
- Unified parameter handling
- Modular handler methods for maintainability
#### Error Handling Strategy
- Try-catch blocks for all operations
- Specific error types for different failure modes
- Fallback mechanisms for SKU lookup failures
- Detailed logging for troubleshooting
#### Performance Considerations
- Efficient SKU lookup caching within single execution
- Minimal API calls through intelligent request batching
- Proper error propagation to prevent unnecessary processing
### Breaking Changes
This is the initial release of the v2 architecture. Users migrating from v1 (n8n-nodes-myob) will need to:
1. Update node configuration to use Resource/Operation pattern
2. Review field mappings as some fields have been reorganized
3. Update any workflows that depend on specific v1 response formats
### Migration Guide from v1
#### v1 โ v2 Mapping
```javascript
// v1 Configuration
Node: MYOB Sales Order
Operation: Create (implicit)
// v2 Configuration
Resource: Sales Order
Operation: Create
```
#### Field Changes
- All sales order fields remain the same
- New resources (Customer, Item, Invoice) add new capabilities
- List operations add filtering and pagination options
### Known Issues
- Invoice creation returns MYOB's standard response format (may not include full invoice details)
- Large result sets may require pagination for optimal performance
- SKU lookup is case-sensitive and requires exact matches
### Future Roadmap
#### Planned for v1.1.0
- Purchase order operations
- Payment handling
- Tax code management
- Enhanced filtering options
#### Under Consideration
- Account management
- Report generation
- Time billing integration
- Advanced custom field support