Welcome to theย ERPNext Integration for WooCommerce!ย This powerful tool connects your WooCommerce store with ERPNext, enabling seamless synchronization of products, customers, and orders. This page guides you through the initial setup and installation process.
Overview
Integrating WooCommerce with ERPNext streamlines your e-commerce operations by:
- Syncing inventory to prevent overselling.
- Centralizing customer data for consistent management.
- Automating order processing to reduce manual work.
Prerequisites
โ Back to topBefore installing, ensure your environment meets these requirements:
- WordPress: Version 5.0 or higher.
- WooCommerce: Version 5.0 or higher (compatible with High-Performance Order Storage, HPOS).
- PHP: Version 7.4 or higher (tested up to PHP 8.3).
- ERPNext: An active instance with API access enabled (refer to ERPNext documentation for setup).
- SSL Certificate: Recommended for secure API communication.
- Server Resources: Adequate memory (at least 256MB PHP memory limit) and database connectivity.
Note: Ensure your ERPNext instance is accessible via a public or private URL and that API keys are generated.
Installation
โ Back to topTo start using a product from WooCommerce.com, you can use the โAdd to storeโ functionality on the order confirmation page or the My subscriptions section in your account.
- Navigate to My subscriptions.
- Find the Add to store button next to the product youโre planning to install.
- Follow the instructions on the screen, and the product will be automatically added to your store.
Alternative options and more information at:
Managing WooCommerce.com subscriptions.
Post-Installation Checklist
- Confirm Activation: Check that the plugin appears in the WordPress Admin menu.
- WooCommerce Compatibility: Verify no compatibility warnings appear in the plugin dashboard.
- Permissions: Ensure the WordPress user has administrative privileges for plugin configuration.
- Backup: Create a full backup of your WordPress site and ERPNext instance before proceeding.
Connecting to ERPNext
โ Back to topEstablish a secure connection between your WooCommerce store and ERPNext instance to enable data synchronization. This section explains how to configure and validate the API connection.
API Configuration
- Navigate to API Settings:
- In WordPress Admin, go toย ERPNext Integrationย โย API Settings.
- Enter ERPNext Details:
- Host URL: Enter the full URL of your ERPNext instance (e.g., https://erp.example.com).
- API Key: Obtain from ERPNext under User Settings โ API Access.
- Steps in ERPNext:
- Log in to ERPNext as an admin.
- Go to User โ [Your User] โ API Access.
- Generate and copy the API Key.
- Steps in ERPNext:
- API Secret: Copy the API Secret from the same ERPNext API Access page.
- SSL Verification: Enable for secure connections (recommended). Disable only for testing if SSL issues occur.
- Debug Mode: Enable to log detailed API interactions for troubleshooting.
- Log Level: Select from Error, Warning, Info, or Debug to control log verbosity.
- Test Connection:
- Clickย Test Connectionย to verify credentials.
- A green checkmark indicates success; a red error message indicates issues.
Connection Validation
- Automatic Validation: The plugin checks credentials upon saving settings.
- Dashboard Indicator: View connection status on the ERPNext Integration dashboard.
- Green: Connected.
- Red: Connection failedโcheck logs for details.
- Log Review: Access logs in ERPNext Integration โ Logs to diagnose issues.
- Example Error: Invalid API Key suggests incorrect credentials.
Best Practices
- Secure Credentials: Store API Key and Secret securely; avoid sharing them publicly.
- SSL: Use HTTPS for the ERPNext URL to ensure data security.
- Firewall: Whitelist your WordPress serverโs IP in ERPNext if restricted.
- Test Regularly: Periodically test the connection after ERPNext updates.
General Configuration
โ Back to topSet up foundational settings to ensure smooth synchronization between WooCommerce and ERPNext. This page covers configuring company, account, order, tax, and shipping settings.
Company and Account Settings
- Navigate to Configurations:
- Go to WordPressย Adminย โย ERPNext Integrationย โย Configurations.
- Configure Settings:
| Setting | Description | Example |
| Company | Default ERPNext company. | MyStore Inc. |
| Default Warehouse | Primary warehouse for inventory. | Main Warehouse |
| Price List | Price list for product pricing. | Retail Price List |
| Currency | Currency for transactions. | USD |
| Debtors Account | Account for customer receivables. | Accounts Receivable |
| Income Account | Account for sales revenue. | Sales Income |
| Cost Center | Cost center for financial tracking. | Main Cost Center |
| Tax Template | Default tax template for orders. | Standard Tax |
Tip: Ensure the selected company exists in ERPNext and has associated warehouses.
Order Settings
Configure how orders are created and processed in ERPNext:
- Order Naming Series: Select a naming series (e.g., SO-YYYY-####).
- Example: SO-2025-0001 for sequential order IDs.
- Default Customer: Set a fallback customer for guest orders (e.g., Guest Customer).
- Add Shipping as Item: Enable to include shipping as a line item in ERPNext.
- Item Code Prefix: Add a prefix to item codes (e.g., WC- for WooCommerce products).
- Item Group: Select a default group (e.g., E-commerce Products).
- Default UOM: Set unit of measure (e.g., Unit or Piece).
- Default HSN Code: Specify tax code for compliance (e.g., 12345678).
Tax and Shipping Settings
- Sales Tax Account: Choose the account for tax liabilities (e.g., Sales Tax Payable).
- Tax Template: Select a default tax template (e.g., GST 5%).
- Shipping Account: Set the account for shipping charges (e.g., Shipping Income).
- Shipping Rule: Define a default rule (e.g., Flat Rate Shipping).
Product Synchronization
โ Back to topSynchronize product data betweenย WooCommerceย andย ERPNextย to maintain accurate inventory and product details. This page details the setup process.
Product Sync Settings
- Navigate to Products:
- Go to WordPressย Adminย โย ERPNext Integrationย โย Products.
- Enable Product Sync:
- Toggle theย Product Syncย switch to ON.
- Configure Sync Settings:
- Sync Interval: Set frequency (e.g., every 15 minutes, 30 minutes, or hourly).
- Sync Direction:
- ERPNext to WooCommerce: Import products to WooCommerce.
- Bidirectional: Sync changes both ways.
- Auto Create Products: Automatically create WooCommerce products from ERPNext.
- Update Existing Products: Update WooCommerce products with ERPNext changes.
Inventory Settings
- Enable Inventory Sync: Toggle to ON.
- Inventory Sync Interval: Set frequency (e.g., every 30 minutes).
- Low Stock Threshold: Set a threshold for notifications (e.g., 10 units).
- Warehouse Mapping: Map WooCommerce locations to ERPNext warehouses.
- Example: Map Online Store to Main Warehouse.
- Stock Status Mapping:
- Map WooCommerce statuses (e.g., In Stock, Out of Stock) to ERPNext.
Attributes and Categories
- Sync Attributes:
- Enable to sync ERPNext item attributes to WooCommerce.
- Map attributes (e.g., ERPNext Color to WooCommerce Color).
- Sync Categories:
- Enable to sync ERPNext item groups to WooCommerce categories.
- Map groups (e.g., ERPNext Electronics to WooCommerce Gadgets).
Manual Sync
- Monitor Progress: View sync progress and logs inย ERPNext Integrationย โย Logs
- Sync All Products: Click to import all ERPNext products to WooCommerce.
- Sync Inventory Now: Trigger immediate inventory updates.
Customer Synchronization
โ Back to topKeep customer data consistent acrossย WooCommerceย andย ERPNext. This page explains how to configure customer synchronization.
Customer Sync Settings
- Navigate to Order Sync:
- Go to WordPressย Adminย โย ERPNext Integrationย โย Order Sync.
- Enable Customer Sync:
- Toggle theย Customer Syncย switch to ON.
- Configure Settings:
- Customer Group: Select a default group (e.g., Online Customers).
- Territory: Set a default territory (e.g., United States).
- Auto Create Customers: Create ERPNext customers from WooCommerce orders.
Data Mapping
- Field Mapping:
- Map WooCommerce fields (e.g., First Name) to ERPNext fields (e.g., first_name).
- Example: Map billing_email to email_id.
- Address Mapping:
- Map billing and shipping fields (e.g., billing_address_1 to address_line1).
- Customer Metadata: Map custom fields if used (e.g., WooCommerce loyalty_points to ERPNext custom field).
Manual Sync
- Sync Previous Customers: Batch sync existing WooCommerce customers to ERPNext.
- Monitor Sync: Check ERPNext Integration โ Logs for status and errors.
Order Synchronization
โ Back to topAutomate order processing by syncingย WooCommerceย orders toย ERPNext. This page covers order sync setup and options.
Order Sync Settings
- Navigate to Order Sync:
- Go to WordPressย Adminย โย ERPNext Integrationย โย Order Sync.
- Enable Order Sync:
- Toggle theย Order Syncย switch to ON.
- Configure Settings:
- Order Status Mapping: Map WooCommerce statuses (e.g., Processing) to ERPNext (e.g., Draft).
- Auto Submit Orders: Submit orders in ERPNext automatically.
- Create Sales Invoices: Generate invoices for completed orders.
- Create Delivery Notes: Create delivery notes in ERPNext.
- Payment Integration: Map payment methods (e.g., WooCommerce PayPal to ERPNext PayPal).
Order Processing Options
- Sync Previous Orders: Batch sync existing WooCommerce orders.
- Individual Order Sync: Sync specific orders manually.
- Monitor Sync: View sync history and logs in ERPNext Integration โ Logs.
Monitoring and Management
โ Back to topTrack and manage synchronization activities to ensure smooth operations. This page covers the tools available for monitoring and maintenance.
Dashboard Overview
- Access Dashboard: View sync activities in WordPressย Adminย โย ERPNext Integration.
- Key Metrics:
- Total orders synced
- Total customers synced
- Last inventory update
- Connection status
- Recent sync activities
Sync History
- View History: Access detailed order sync history.
- Filter and Search: Find specific orders or sync events.
- Resync Orders: Manually resync failed orders.
- Status Tracking: Monitor order statuses in ERPNext.
Logs and Troubleshooting
- Access Logs: View logs inย ERPNext Integrationย โย Logs.
- Log Levels: Set to Error, Warning, Info, or Debug.
- Error Tracking: Identify and resolve sync errors.
- Performance Monitoring: Track sync timing and performance.
Cache Management
- Cache Status: Monitor cached ERPNext data.
- Refresh Cache: Update cached data manually.
- Clear Cache: Reset cache to resolve data issues.
Advanced Features
โ Back to topEnhance the WooCommerce ERPNext Integration Plugin with advanced functionality for greater control and customization.
Cron Job Management
- Automatic Sync: Uses WordPress cron jobs for scheduled synchronization.
- Custom Intervals: Set specific intervals for products, customers, and orders.
- Manual Triggers: Trigger sync jobs manually if needed.
- Cron Monitoring: Check cron job status inย ERPNext Integrationย โย Logs.
Batch Processing
- Bulk Operations: Sync large datasets efficiently.
- Progress Tracking: Monitor batch sync progress.
- Error Handling: Robust handling for batch errors.
- Resume Capability: Resume interrupted batch operations.
Field Mapping and Customization
- Custom Field Mapping: Map custom fields between platforms.
Example: Map WooCommerce gift_wrap to ERPNext custom field. - Data Transformation: Transform data during sync (e.g., format phone numbers).
- Conditional Logic: Apply rules for specific sync scenarios.
- Custom Hooks: Use WordPress hooks for custom functionality.
Example Hook: add_action(โwc_erpnext_sync_orderโ, โcustom_order_logicโ);
Troubleshooting and Support
โ Back to topResolve common issues and access support resources for the WooCommerce ERPNext Integration Plugin.
Troubleshooting Common Issues
| Issue Type | Steps to Resolve |
| ERPNext Connection | Verify Host URL, API credentials, and SSL settings. Ensure ERPNext API is enabled. |
| WordPress/WooCommerce | Check plugin/theme compatibility, increase PHP memory limit (e.g., 512MB), verify database connectivity. |
| Sync Issues | Confirm cron jobs are running, validate field mappings, check permissions, ensure data formats match. |
| Performance | Adjust sync intervals, use batch processing, enable caching, optimize server resources. |
| Logs | Enable debug mode, review error logs, adjust log levels, implement log rotation. |
Example: Connection Failure
- Error:ย Failed to connect to ERPNext.
- Steps:
- Verify Host URL includesย https://.
- Regenerate API Key/Secret in ERPNext.
- Disable SSL verification temporarily to test.
- Check ERPNext server logs for blocked requests.
Support Resources
- Plugin Documentation: Access help sections inย ERPNext Integrationย โย Help.
- WordPress Codex: General WordPress troubleshooting.
- WooCommerce Docs: Store-specific issues.
- ERPNext Docs: API and configuration details.
- Community Support:
- WordPress Forums
- WooCommerce Community
- ERPNext Community
- Plugin Support: Contact the developer via the pluginโs support channel.
Getting Help
For unresolved issues, provide the following to support:
- Description of the issue and steps to reproduce
- Plugin version
- WordPress/WooCommerce versions
- ERPNext version
- Error logs (from ERPNext Integration โ Logs)
