WooCommerce Connection Guide

Audience: Administrators Difficulty: Advanced Estimated Time: 45 minutes

Overview

Connect your TrafficPOS system to WooCommerce to create a unified inventory management system that synchronizes between in-store and online sales. This integration maintains TrafficPOS as the source of truth while enabling seamless e-commerce operations.

Unified Commerce Solution: Combine the power of offline-first POS operations with WooCommerce's robust e-commerce platform for complete business coverage.

Integration Architecture

TrafficPOS (Source of Truth)

  • Primary Inventory Management: All stock levels maintained here
  • In-Store Sales: Complete POS functionality
  • Offline Operations: Continues working without internet
  • Cannabis Compliance: Specialized dispensary features
  • Real-Time Updates: Immediate inventory adjustments

WooCommerce (Display & Sales)

  • Online Storefront: Customer-facing e-commerce site
  • Product Display: Synchronized product catalog
  • Online Orders: Web-based sales processing
  • Marketing Tools: SEO, promotions, and analytics
  • Customer Accounts: Online customer management

Synchronization Features

  • Real-Time Inventory: Stock updates after each sale
  • Product Sync: Automatic product information updates
  • Sales Reporting: Unified analytics across channels
  • Offline Queue: Syncs when connection returns
  • Conflict Resolution: POS takes priority for inventory

πŸ›‘οΈ Security & Compliance

  • API Authentication: Secure key-based access
  • HTTPS Communication: Encrypted data transmission
  • Data Privacy: No sensitive customer data shared
  • Access Control: Limited API permissions
  • Audit Logging: Complete sync activity tracking

Data Flow Architecture

Integration Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   TrafficPOS     β”‚ ──API──▢│  WooCommerce    β”‚
β”‚  (Source of     β”‚         β”‚  (Display &     β”‚
β”‚    Truth)       │◀────────│   Online Sales) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚                           β”‚
      β–Ό                           β–Ό
 [Local Sales]              [Online Orders]
 [Inventory]                [Product Display]
 [Offline Mode]             [E-commerce]

Prerequisites

Required Components

  • WordPress Website: Active WordPress installation with WooCommerce
  • TrafficPOS Bridge Plugin: The trafficpos-woocommerce-bridge plugin installed
  • HTTPS Certificate: SSL certificate for secure API communication
  • WordPress Admin Access: Administrator permissions to configure plugin
  • TrafficPOS Admin Access: Administrative privileges in POS system

Important Setup Notes

  • WordPress Plugin Required: The bridge plugin must be installed before attempting connection
  • Cannabis Compliance: Ensure your WordPress site complies with local cannabis regulations
  • Backup Recommended: Create backups of both systems before integration
  • Testing Environment: Consider testing on staging site first

WordPress Configuration

1

Install TrafficPOS Bridge Plugin

  • Download the trafficpos-woocommerce-bridge.zip plugin file
  • In WordPress admin, go to Plugins β†’ Add New β†’ Upload Plugin
  • Upload and activate the plugin
  • Verify plugin appears in the WordPress admin menu
2

Generate API Credentials

Navigate to TrafficPOS β†’ Settings in WordPress admin

  • Click "Generate API Key" if no key exists
  • Copy the generated API key (format: np_xxxxxxxxxxxxxxxx)
  • Store the key securely - you'll need it for POS configuration
  • Note your WordPress site URL (e.g., https://yourstore.com)
3

Configure Plugin Settings

  • Enable API Access: Toggle API functionality on
  • Set Sync Permissions: Define what data can be synchronized
  • Configure Rate Limits: Set appropriate API call limits
  • Test API Endpoint: Verify API is responding correctly

TrafficPOS Configuration

1

Enable Online Mode

Navigate to Settings β†’ App Mode in TrafficPOS

  • Switch from Offline Mode to Online Mode
  • Select API Type: "WooCommerce"
  • Confirm the mode change
2

Configure API Connection

Enter your WooCommerce connection details:

  • WordPress Site URL: https://yourstore.com (without /wp-json/trafficpos/v1)
  • API Key: Paste the key generated in WordPress
  • Verify URL Format: No trailing slash, HTTPS protocol
  • Test Connection: Use built-in connection test
3

Configure Synchronization Options

  • βœ“ Sync inventory after each sale: Real-time stock updates
  • βœ“ Enable inventory sync: Regular inventory synchronization
  • βœ“ Report sales to WooCommerce: Create WooCommerce orders
  • Sync Interval: Set frequency (default: 300 seconds)
  • Sync Timeout: Configure request timeout (default: 30 seconds)
4

Save and Test Configuration

  • Click "Save API Settings"
  • Verify connection status shows as "Connected"
  • Check sync status in the dashboard
  • Monitor for any connection errors

Testing the Connection

πŸ§ͺ

Connection Verification

  1. API Status Check: Verify green "Connected" status in POS
  2. WordPress Sync Status: Check TrafficPOS β†’ Sync Status in WordPress
  3. Test Product Sync: Create a test product in POS and verify it appears in WooCommerce
  4. Test Inventory Sync: Make a sale in POS and verify stock decreases in WooCommerce
  5. Check Error Logs: Review both WordPress and browser console for errors

Synchronization Features

Automatic Synchronization

Product Synchronization

  • Frequency: Every 5 minutes (configurable)
  • Direction: POS β†’ WooCommerce
  • Data Synced: Names, descriptions, prices, categories
  • Cannabis Fields: THC/CBD content, strain type
  • Images: Product photos and gallery

Inventory Synchronization

  • Frequency: Real-time after sales
  • Direction: POS β†’ WooCommerce
  • Trigger: Every completed sale
  • Updates: Stock quantities and availability
  • Prevention: Overselling across channels

Sales Reporting

  • Frequency: After each sale
  • Direction: POS β†’ WooCommerce
  • Creates: WooCommerce orders for reporting
  • Analytics: Combined sales data
  • Tracking: Revenue across all channels

Offline Resilience

  • Queue System: Stores updates when offline
  • Auto Retry: Automatic sync when reconnected
  • Conflict Resolution: POS data takes priority
  • Error Handling: Graceful failure management
  • Status Monitoring: Real-time connection status

Manual Operations

Initial Data Migration

From WooCommerce to POS:

  1. In WordPress: TrafficPOS β†’ Export Products
  2. Download the generated JSON file
  3. In TrafficPOS: Settings β†’ Import Products
  4. Upload the JSON file and process import
  5. Verify all products imported correctly

Manual Sync Operations

  • Force Full Sync: Push all products to WooCommerce
  • Inventory Correction: Update all stock levels
  • Product Refresh: Sync specific product changes
  • Error Recovery: Retry failed synchronizations

Troubleshooting Common Issues

Connection Problems

"API Key Invalid" Error

  1. Regenerate API key in WordPress TrafficPOS β†’ Settings
  2. Verify plugin is activated and functioning
  3. Check URL format doesn't include trailing slash
  4. Confirm HTTPS is being used
  5. Test API endpoint directly in browser

Connection Timeout

  • Check WordPress site is accessible
  • Verify SSL certificate is valid
  • Test from different network
  • Check WordPress hosting provider status
  • Increase timeout settings in POS

Synchronization Issues

Products Not Syncing

  • Verify "Enable inventory sync" is checked
  • Check API connection status in WordPress
  • Wait for sync interval to pass (default: 5 minutes)
  • Check product SKUs are unique
  • Review error logs in both systems

Inventory Mismatch

  • Remember: POS is the source of truth
  • Run manual inventory sync from POS
  • Verify product SKUs match between systems
  • Check for conflicting WooCommerce plugins
  • Review sync logs for errors

WordPress Plugin Issues

Plugin Not Appearing

  • Verify plugin uploaded and activated correctly
  • Check WordPress version compatibility
  • Ensure WooCommerce is installed and active
  • Review WordPress error logs
  • Test with default WordPress theme

Security Considerations

Data Security

  • API Key Storage: Stored locally in browser only
  • HTTPS Required: All communication encrypted
  • Limited Data Sync: No sensitive customer information
  • Access Control: API key provides limited permissions

πŸ›‘οΈ Privacy Protection

  • Customer Data: Not synchronized between systems
  • Employee Data: POS-only, not shared
  • Sales Data: Only aggregated reporting data
  • WordPress Users: Not synced with POS accounts

Best Practices

Initial Setup Recommendations

Optimal Setup Sequence

  1. Backup Both Systems: Create complete backups before integration
  2. Test on Staging: Use staging WordPress site for initial testing
  3. Export WooCommerce Products First: Migrate existing products to POS
  4. Import to POS: Complete import and verify all products
  5. Enable Sync After Import: Start synchronization once data is aligned
  6. Monitor Initial Sync: Watch for errors during first sync cycles

Daily Operations

Regular Monitoring

  • Check Sync Status: Weekly sync status review
  • Monitor Error Logs: Regular log file review
  • Verify Inventory: Spot-check inventory synchronization
  • Update Plugins: Keep WordPress plugin updated

Maintenance Tasks

  • API Key Rotation: Periodic security key updates
  • Performance Monitoring: Track sync performance
  • Backup Verification: Test backup and restore procedures
  • Documentation Updates: Maintain configuration records

Benefits of Integration

Business Advantages

  • Unified Inventory: Prevent overselling across in-store and online channels
  • Operational Efficiency: Single source of truth for product management
  • Customer Experience: Consistent product availability information
  • Business Intelligence: Combined analytics from all sales channels
  • Growth Enablement: Seamless expansion to online sales
  • Compliance Maintenance: Centralized cannabis product tracking

Related Guides

WooCommerce Export

Export products and data from WooCommerce to TrafficPOS

Offline Mode

Understanding offline operations and sync queuing

Security Guide

Security considerations for API integrations