Overview
The WooCommerce integration enables you to:- Import WooCommerce customers as contacts
- Trigger campaigns based on order events
- Sync customer data automatically
- Send follow-up calls for order confirmations
- Re-engage customers with abandoned carts
Prerequisites
- WordPress site with WooCommerce installed
- WooCommerce REST API enabled
- TelemanAI plugin for WordPress
- Admin access to both WooCommerce and TelemanAI
Setup Instructions
Install TelemanAI WordPress Plugin
- Download the TelemanAI WordPress plugin
- Upload to
/wp-content/plugins/teleman-wordpress/ - Activate the plugin in WordPress admin
- The plugin automatically detects WooCommerce
Configure WooCommerce in TelemanAI
- Log in to TelemanAI dashboard
- Navigate to Integrations → WooCommerce
- Enter your configuration:
- Click Save Configuration
Generate API Token
- In TelemanAI, click Generate Token
- Copy the generated API token
- This token authenticates requests between WooCommerce and TelemanAI
Importing WooCommerce Customers
Fetch Customer Data
In TelemanAI:
- Go to Integrations → WooCommerce
- Click Fetch Customers
- TelemanAI retrieves all customers from WooCommerce
Review Customer Preview
The system displays:
- Customer name
- Phone number (billing phone)
- Email address
- Total orders
- Customer since date
Order-Based Campaign Triggers
Automate campaigns based on WooCommerce order events:Order Confirmation Calls
Trigger a call when an order is placed:Abandoned Cart Recovery
Re-engage customers with abandoned carts:Order Delivery Notification
Notify customers when order is shipped:API Integration
Plugin Endpoint Structure
The WordPress plugin exposes customer data:Customer Data Extraction
Plugin Implementation (phonebook.php):Customer Segmentation
Create targeted campaigns based on customer segments:High-Value Customers
Repeat Customers
Inactive Customers
Routes and Controller
WooCommerce integration routes (seeroutes/woocommerce.php):
| Route | Method | Description |
|---|---|---|
/dashboard/wp | GET | Integration dashboard |
/dashboard/wp/store | POST | Save configuration |
/dashboard/wp/token | POST | Generate API token |
/dashboard/wp/fetch_data | GET | Fetch WooCommerce customers |
/dashboard/wp/store_data | GET | Import customers to contacts |
The WooCommerce integration shares routes with WordPress integration. Controller:
WordPressController.phpDatabase Schema
Configuration is stored in thethird_party table:
referencefield set to “woocommerce”namefrom billing namephonefrom billing phonecountrycan be populated from billing country
Troubleshooting
No Customers Found
No Customers Found
Problem: Fetch returns empty resultSolution:
- Verify WooCommerce is installed and active
- Ensure customers have billing phone numbers
- Check that the plugin endpoint is accessible
- Test the API URL manually:
Connection Failed
Connection Failed
Problem: “The connection is failed” errorSolution:
- Verify WordPress URL is correct and accessible
- Check that the plugin is activated
- Ensure SSL certificate is valid if using HTTPS
- Check server firewall rules
- Review WordPress error logs for PHP errors
Token Generation Failed
Token Generation Failed
Problem: Cannot generate API tokenSolution:
- Ensure WooCommerce configuration is saved first
- Check that the application URL and email are valid
- Verify database connectivity
- Try disconnecting and reconfiguring
Duplicates Not Skipped
Duplicates Not Skipped
Problem: Same customers imported multiple timesSolution:
- TelemanAI checks for duplicate phone numbers automatically
- If duplicates appear, check for variations in phone format:
- +1234567890
- 1234567890
- (123) 456-7890
- Normalize phone numbers in WooCommerce before import
Campaign Not Triggering
Campaign Not Triggering
Problem: Order events don’t trigger campaignsSolution:
- Verify webhook URL is configured in WordPress
- Check that campaign ID exists and is active
- Ensure the order status matches the hook:
woocommerce_order_status_processingwoocommerce_order_status_completed
- Review TelemanAI webhook logs
Best Practices
Advanced Features
Custom Order Meta
Include custom order fields in campaigns:Product-Specific Campaigns
Trigger campaigns for specific products:Subscription Integration
For WooCommerce Subscriptions:Performance Optimization
Batch Processing
For large customer bases, process imports in batches:Caching
Cache customer data to reduce API calls:Next Steps
WordPress Integration
Learn about WordPress integration
Campaign Automation
Automate campaigns based on events
Customer Segmentation
Create customer segments
Analytics
Track WooCommerce campaign performance