Description
n8n-nodes-avanta
An n8n community node for integrating with the Avanta B2B E-Commerce platform. This node enables seamless integration with Avanta’s comprehensive B2B commerce solution, allowing you to automate customer management, order processing, inventory tracking, and business reporting directly from your n8n workflows.
Table of Contents
- About Avanta
- Installation
- Configuration
- Operations
- Usage Examples
- API Reference
- Contributing
- License
- Support
- Multi-Company Management: Handle complex B2B customer hierarchies and relationships
- Advanced Order Processing: Support for bulk orders, custom pricing, and delivery scheduling
- Comprehensive Reporting: Detailed analytics for orders, shipments, invoices, and business performance
- Flexible Product Catalog: Manage extensive product catalogs with custom attributes and pricing
- Integration Capabilities: RESTful API for seamless integration with existing business systems
About Avanta
Avanta is a comprehensive B2B E-Commerce platform designed to streamline business-to-business transactions and relationships. The platform provides robust tools for managing customer companies, processing orders, handling complex pricing structures, and generating detailed business reports.
Key features of Avanta include:
This n8n node provides direct access to Avanta’s powerful API, enabling you to automate your B2B E-Commerce workflows and integrate Avanta with your existing business processes.
Installation
Community Nodes (Recommended)
1. Go to Settings > Community Nodes in your n8n instance
2. Select Install a community node
3. Enter n8n-nodes-avanta in the npm package name field
4. Click Install
Manual Installation
If you’re running n8n locally, you can install this node manually:
Navigate to your n8n installation directory
cd ~/.n8nInstall the node
npm install n8n-nodes-avantaRestart n8n
Docker Installation
For Docker installations, you can install community nodes by:
1. Using the n8n interface (recommended)
2. Building a custom Docker image with the node pre-installed
Configuration
Credentials Setup
1. In n8n, go to Credentials and create new Avanta API credentials
2. Fill in the required fields:
– Host: Your Avanta API base URL including store scope (e.g., https://your-avanta-instance.com/rest/STORE_CODE or https://your-avanta-instance.com/rest/all for all stores)
– Access Token: Your Avanta API access token
Getting API Credentials
To obtain your Avanta API credentials, you’ll need to generate an access token through the Avanta admin interface:
#### Step 1: Access the Admin Panel
1. Log into your Avanta system with administrator privileges
2. Navigate to System > Integrations > API Tokens in the admin menu
#### Step 2: Create a New Integration Token
1. Click Add New Token or Create Integration
2. Provide a descriptive name for your integration (e.g., “n8n Workflow Integration”)
3. Select the appropriate API Resources and Access Levels based on your workflow needs:
– Companies: For managing B2B customer companies and relationships
– Orders: For order processing and management
– Products: For catalog and inventory operations
– Reports: For generating business analytics and reports
– Users: For customer user management
#### Step 3: Configure Token Permissions
Set the appropriate access levels for each resource:
#### Step 4: Generate and Secure Your Token
1. Click Generate Token
2. Important: Copy the generated access token immediately – it will only be displayed once
3. Store the token securely (consider using a password manager)
4. Note your API base URL including store scope (typically https://your-domain.com/rest/STORE_CODE or https://your-domain.com/rest/all for all stores)
#### Authentication Method
The Avanta API uses Bearer Token Authentication. All API requests must include the access token in the Authorization header:
Authorization: Bearer YOURACCESSTOKEN
#### Token Security Best Practices
#### Troubleshooting Authentication
If you encounter authentication issues:
1. Verify the token hasn’t expired or been revoked
2. Check that the token has the necessary permissions for your operations
3. Ensure your API base URL is correct and accessible
4. Confirm your Avanta instance supports the API version being used
Operations
The Avanta node supports comprehensive B2B E-Commerce operations across the following resources:
Customer Companies
Company Addresses
Company Contacts
Company Users
Business Reports
Product Catalog
Sales Organizations
Usage Examples
Creating a Company
{
"name": "Example Corp",
"email": "contact@example.com",
"group_id": "1",
"additionalFields": {
"telephone": "+1-555-0123",
"vat_id": "US123456789",
"internet": "https://example.com"
}
}
Creating an Order Report
{
"customer_id": "CUST001",
"company_id": 123,
"customer_orderid": "ORD-2024-001",
"order_positions": [
{
"item_pos": 1,
"name": "Product A",
"sku": "PROD-A-001",
"qty": 5,
"price": 29.99,
"subtotal": 149.95
}
]
}
Creating a Company Address
{
"companycustomerid": "COMP001",
"companygroupid": "1",
"externaladdressid": "ADDR001",
"additionalFields": {
"street": "123 Business Ave",
"city": "Business City",
"postcode": "12345",
"country_id": "US",
"address_type": 1
}
}
API Reference
Authentication
All API requests require authentication using a Bearer token:
Authorization: Bearer YOURACCESSTOKEN
Base URL
All API endpoints are relative to your Avanta instance base URL including store scope:
https://your-avanta-instance.com/rest/STORE_CODE/V1/proline-admin/
Or for all stores:
https://your-avanta-instance.com/rest/all/V1/proline-admin/
Common Parameters
Most operations support these common parameters:
Error Handling
The node includes comprehensive error handling:
Data Types and Validation
Required Fields
Each B2B E-Commerce operation has specific required fields. Common required fields include:
name, group_id for company registrationcustomerid, companyid for transaction trackingcompanycustomerid, companygroupid for shipping/billing setupOptional Fields
Most B2B operations support additional optional fields through the “Additional Fields” collection, enabling:
Date Formatting
Date fields are automatically formatted to ISO 8601 format when sent to the API.
Workflow Integration
B2B E-Commerce Use Cases
The Avanta node is designed for comprehensive B2B E-Commerce automation:
Triggers
This node works well with:
Data Flow
The node can be chained with:
Troubleshooting
Common Issues
1. Authentication Errors
– Verify your API credentials are correct
– Check that your access token hasn’t expired
– Ensure your host URL is correct
2. Validation Errors
– Check that all required fields are provided
– Verify data types match expected formats
– Review field length limitations
3. Connection Issues
– Verify network connectivity to your Avanta instance
– Check firewall settings
– Confirm SSL/TLS configuration
Debug Mode
Enable debug mode in n8n to see detailed request/response information:
1. Set environment variable: N8NLOGLEVEL=debug
2. Restart n8n
3. Check logs for detailed API communication
Contributing
We welcome contributions to improve this node! Here’s how you can help:
Development Setup
1. Clone the repository:
git clone https://github.com/ecoplan-avanta/n8n-nodes-avanta.git
cd n8n-nodes-avanta
2. Install dependencies:
npm install
3. Build the project:
npm run build
4. Run linting:
npm run lint
Submitting Changes
1. Fork the repository
2. Create a feature branch: git checkout -b feature/your-feature-name
3. Make your changes
4. Run tests and linting: npm run lint
5. Commit your changes: git commit -m "Add your feature"
6. Push to your fork: git push origin feature/your-feature-name
7. Submit a pull request
Code Standards
License
This project is licensed under the MIT License – see the LICENSE file for details.
Support
Documentation
Community
Commercial Support
For commercial support and custom development:
Changelog
Version 0.1.9
Version 0.1.8
Version 0.1.7
—
Note: This is a community-maintained node. For issues specific to the Avanta API itself, please contact Avanta support directly.