Skip to main content
WooCommerce Detrack WooCommerce to Detrack

FleetConnector Detrack Documentation

Complete guide to installing, configuring, and using the WooCommerce to Detrack integration plugin

Ready to automate your WooCommerce deliveries with Detrack?

Purchase the WordPress plugin for just €199/year. Unlimited orders, premium support included.

1

Installation

1.1 System requirements

Before installing the WooCommerce to Detrack plugin, ensure your system meets these requirements:

  • WordPress 5.8 or higher - The FleetConnector Detrack plugin requires modern WordPress features
  • WooCommerce 5.0 or higher - Must be installed and activated before FleetConnector Detrack
  • PHP 7.4 or higher - Required for modern PHP features
  • An active Detrack account with API access - Get your API key from the Detrack dashboard (app.detrack.com)
  • HTTPS enabled (recommended) - Required for Detrack webhooks to work properly

1.2 Installation steps

1

Purchase and Download

Purchase the WooCommerce to Detrack plugin from our website for €199/year. You'll receive a download link and license key via email.

After purchase → Check email → Download fleetconnector-detrack.zip
2

Upload to WordPress

Navigate to Plugins → Add New → Upload Plugin in your WordPress admin.

WordPress Admin → Plugins → Add New → Upload Plugin → Choose fleetconnector-detrack.zip
3

Activate Plugin

After upload completes, click "Activate Plugin". The WooCommerce to Detrack integration will automatically create necessary database tables for logging.

Important: WooCommerce must be installed and activated before activating FleetConnector Detrack. The plugin will not activate without WooCommerce.
4

Activate License

Go to WooCommerce → FleetConnector Detrack → License section and enter your license key to activate the integration.

WooCommerce → FleetConnector Detrack → License → Enter key → Activate License
2

Configuration

Configure the WooCommerce to Detrack connection and customize how orders are synchronized to deliveries.

2.1 Connect WooCommerce to Detrack

Step 1: Get Your Detrack API Key

  1. Log in to your Detrack dashboard at app.detrack.com
  2. Navigate to Settings → API Keys
  3. Click "Generate API Key" or copy your existing key
  4. Copy the generated API key

Step 2: Configure in WooCommerce

  1. In WordPress admin, go to WooCommerce → FleetConnector Detrack
  2. Find the "Detrack API Settings" section
  3. Paste your Detrack API key in the "Detrack API Key" field
  4. Click "Test Connection" to verify (should show your organization name)
  5. Click "Save Changes" at the bottom of the page
Success Indicator: When the WooCommerce to Detrack connection is successful, you'll see your organization name displayed.

2.2 Understanding Detrack deliveries

Detrack uses deliveries as its core entity. Understanding this structure is key to using FleetConnector Detrack effectively.

How Detrack Works

  • Deliveries: Individual delivery jobs that are created and assigned to drivers (your WooCommerce orders become deliveries)
  • Proof of Delivery: Detrack captures signatures, photos, and timestamps as proof of delivery
  • Real-Time Tracking: Live GPS tracking of drivers and delivery progress

Automatic Delivery Creation

FleetConnector Detrack automatically creates deliveries for you:

  • • When an order is created, the plugin creates a delivery in Detrack
  • • The delivery date is set based on your configured delivery date plugin or defaults
  • • Deliveries appear in your Detrack dashboard ready for assignment to drivers
  • • Delivery IDs are saved to the order for tracking and synchronization
Benefit: You don't need to manually create deliveries. FleetConnector handles all delivery creation automatically based on your WooCommerce orders.

2.3 Automatic delivery creation

Enable Auto-Create

Check the "Automatically create Detrack deliveries" checkbox to enable automatic delivery creation when WooCommerce orders reach specific statuses.

Default: Enabled

When enabled, deliveries are created automatically. When disabled, you must create deliveries manually for each order.

Select Trigger Statuses

Choose which WooCommerce order statuses should trigger Detrack delivery creation:

✓ Processing (Recommended)

Delivery created as soon as payment is confirmed. Best for immediate dispatch.

✓ Completed (Recommended)

Delivery created after order is fulfilled. Best for scheduled dispatch.

Tip: Most businesses use "Processing" to dispatch orders immediately after payment confirmation.

2.4 Synchronization settings

Auto-Sync Updates

When enabled, any changes to a WooCommerce order automatically update the corresponding Detrack delivery.

What gets synchronized:

  • • Customer name and contact details
  • • Delivery address
  • • Order items and quantities
  • • Customer notes

Delete on Cancel

When enabled, cancelling a WooCommerce order automatically deletes the delivery in Detrack.

Warning: This action cannot be undone. The delivery will be permanently deleted from Detrack.

2.5 Default delivery windows

Set your default delivery time window. These times are used when no specific delivery date is provided by a delivery date plugin.

Complete After (Start Time)

Earliest time a delivery can take place

Default: 09:00
Format: HH:MM (24-hour)

Complete Before (End Time)

Latest time a delivery can take place

Default: 18:00
Format: HH:MM (24-hour)

2.6 Delivery date plugin integration

FleetConnector Detrack can automatically detect delivery dates from popular WooCommerce plugins and use them when creating deliveries in Detrack.

Supported Delivery Date Plugins

Auto-detect (Recommended)

Automatically detects delivery dates from all supported plugins

Order Delivery Date for WooCommerce

Popular delivery date picker plugin

Iconic WooCommerce Delivery Slots

Advanced delivery slot management

Custom Field

Use your own custom delivery date field

How it works: The delivery date is used to schedule the delivery in Detrack. Orders with the same delivery date can be grouped together for efficient route optimization.

2.7 Webhook settings

Webhook URL

Copy this URL to configure webhooks in your Detrack dashboard:

https://yoursite.com/wp-json/fleetconnector-detrack/v1/webhook

You'll configure this in Chapter 4 (Webhooks).

Order Status Mappings

Configure what happens to WooCommerce orders when Detrack deliveries change status:

Delivery Completed Status

Select which order status to set when a delivery is completed in Detrack.

Common choice: Completed

Delivery Failed Status

Select which order status to set when a delivery fails in Detrack.

Common choice: Failed or leave empty to keep current status

Save Driver Information

When enabled, FleetConnector Detrack saves driver name and ID to the order when a delivery is assigned.

Recommended: Keep this enabled to track which driver delivered each order.

2.8 Display settings

Customize how FleetConnector Detrack displays information in your WooCommerce admin.

Show Detrack Status Column

Control whether the Detrack status column appears in your WooCommerce orders list.

Default: Enabled

When enabled, a "Detrack" column shows in the orders list with a checkmark for orders sent to Detrack and a dash for orders not sent.

Only Create Deliveries for Shipping Orders

When enabled, automatic delivery creation only triggers for orders that require shipping. Virtual products, downloadable products, and local pickup orders will be skipped.

When to enable: Enable this if you sell both physical and digital products and only want to create deliveries for physical orders that need shipping.
3

Features

FleetConnector Detrack provides multiple ways to create and manage Detrack deliveries from your WooCommerce orders.

3.1 Manual delivery creation

Even with automatic delivery creation enabled, you can manually create Detrack deliveries for individual orders.

From Order Actions Dropdown

  1. Go to WooCommerce → Orders
  2. Hover over an order in the list
  3. Click on "Create Detrack Delivery" from the row actions
  4. The delivery will be created immediately and you'll see a success message

From Order Edit Screen

  1. Open any WooCommerce order
  2. Look for the "Detrack Delivery" meta box on the right side
  3. Click the "Create Detrack Delivery" button
  4. The delivery will be created and the meta box will update with delivery details

3.2 Bulk delivery creation

Create Detrack deliveries for multiple orders at once using WooCommerce bulk actions.

How to Use Bulk Actions

  1. Go to WooCommerce → Orders
  2. Check the boxes next to the orders you want to process
  3. Select "Create Detrack Deliveries" from the Bulk Actions dropdown at the top
  4. Click "Apply"
  5. Wait for the processing to complete - you'll see a success message with the count

What happens during bulk creation:

  • • FleetConnector Detrack processes each order individually
  • • Orders that already have deliveries are skipped
  • • Invalid orders (missing address, etc.) are skipped with a warning
  • • Deliveries are created in Detrack with the appropriate delivery date
  • • All actions are logged in the FleetConnector Dashboard

3.3 Detrack delivery information meta box

When editing any WooCommerce order, you'll see a "Detrack Delivery" meta box that shows the current status of the delivery.

Information Displayed

  • Delivery ID: Unique Detrack delivery identifier
  • Tracking Number: The tracking reference for this delivery
  • Status: Current delivery status (Pending, In Transit, Completed, Failed)
  • Assigned Driver: Name of the driver assigned to this delivery (if assigned)
  • Created: Date and time the delivery was created
  • Proof of Delivery: Signature and photo status (if completed)

Available Actions

Create Detrack Delivery

Available if no delivery exists yet

Sync to Detrack

Manually push order updates to Detrack

3.4 Detrack status column

FleetConnector Detrack adds a "Detrack" column to your WooCommerce orders list for quick visibility of which orders have been sent to Detrack.

Status Indicators

Green checkmark

Order has been sent to Detrack

Gray dash

Order has not been sent to Detrack

4

Webhooks

Webhooks enable real-time synchronization from Detrack to WooCommerce. When drivers update delivery status in Detrack, your WooCommerce orders automatically update.

4.1 Webhook setup

Step 1: Get Your Webhook URL

  1. In WordPress admin, go to WooCommerce → FleetConnector Detrack
  2. Scroll to the "Webhook Settings" section
  3. Copy the webhook URL displayed (it will look like https://yoursite.com/wp-json/fleetconnector-detrack/v1/webhook)
Important: Your site MUST use HTTPS for webhooks to work. Detrack requires secure connections for webhook endpoints.

Step 2: Configure in Detrack

  1. Log in to your Detrack dashboard at app.detrack.com
  2. Go to Settings → Webhooks
  3. Click "Add Webhook"
  4. Paste your webhook URL in the URL field
  5. Select which events you want to receive (see section 4.2)
  6. Click "Save" to create the webhook
Success: Once configured, the webhook will start sending notifications for delivery status changes.

4.2 Supported webhook events

FleetConnector Detrack supports the following Detrack webhook events:

1 delivery.completed

When triggered: Driver marks a delivery as successfully completed in Detrack (with proof of delivery).

What happens:

  • WooCommerce order status updates to your configured "Completed" status
  • Completion time, driver information, and proof of delivery details are saved to order meta
  • Event is logged in FleetConnector Dashboard

2 delivery.failed

When triggered: Driver marks a delivery as failed in Detrack.

What happens:

  • WooCommerce order status updates to your configured "Failed" status (if set)
  • Failure reason is saved to order notes
  • Event is logged in FleetConnector Dashboard

3 delivery.in_transit

When triggered: Driver starts the delivery and is en route to the delivery address.

What happens:

  • Order note is added with start time
  • Event is logged in FleetConnector Dashboard

4 delivery.assigned

When triggered: A delivery is assigned to a driver in Detrack.

What happens:

  • Driver name and ID are saved to order meta (if "Save driver info" is enabled)
  • Order note is added with driver name
  • Event is logged in FleetConnector Dashboard

5 delivery.unassigned

When triggered: A delivery is removed from a driver's assignment in Detrack.

What happens:

  • Order note is added indicating unassignment
  • Event is logged in FleetConnector Dashboard

6 delivery.deleted

When triggered: A delivery is permanently deleted from Detrack.

What happens:

  • Delivery ID is removed from order meta
  • Order note is added indicating deletion
  • Event is logged in FleetConnector Dashboard
Recommendation: Enable all webhook events in Detrack for complete synchronization.
5

Dashboard

The FleetConnector Detrack Dashboard provides complete visibility into all WooCommerce to Detrack synchronization activity.

5.1 Accessing the dashboard

Access the dashboard by navigating to:

WordPress Admin → WooCommerce → FleetConnector Detrack → Dashboard

5.2 Statistics overview

At the top of the dashboard, you'll see key statistics cards:

Total Synced Deliveries

Total number of deliveries successfully created in Detrack

Failed Deliveries

Deliveries that failed to sync due to errors

Webhooks Received

Total webhook events received from Detrack

Last 24 Hours

Deliveries synced in the last 24 hours

5.3 Activity log

The activity log shows a detailed record of all synchronization events between WooCommerce and Detrack.

Log Columns

  • Date/Time: When the event occurred
  • Order ID: WooCommerce order number (clickable link to order)
  • Action: What happened (Delivery Created, Delivery Updated, Webhook Received, etc.)
  • Status: Success or Error indicator
  • Message: Detailed information about the event
  • Details: View full technical details and API responses

5.4 Export to CSV

Export your activity log to CSV format for analysis, reporting, or record-keeping.

How to Export

  1. Apply any filters you want (date range, status, etc.)
  2. Click the "Export to CSV" button at the top of the dashboard
  3. The filtered results will download as a CSV file

5.5 Retry failed deliveries

If deliveries fail to sync due to temporary issues, you can retry them directly from the dashboard.

How to Retry

  1. Filter the log to show only "Error" status events
  2. Find the failed delivery you want to retry
  3. Click "Retry" to attempt creation again
6

Technical Details

Understanding how FleetConnector Detrack works behind the scenes.

6.1 How the integration works

FleetConnector Detrack bridges WooCommerce and Detrack using WordPress hooks and direct HTTP API calls.

WooCommerce → Detrack Flow

1

Order reaches a trigger status (e.g., Processing)

2

FleetConnector hooks into woocommerce_order_status_changed

3

Delivery date is detected from order data or delivery date plugin

4

Delivery data is formatted for Detrack API

5

API request is sent to POST /deliveries

6

Delivery ID is saved to order meta

6.2 Data sent to Detrack

When creating a delivery, FleetConnector Detrack sends the following data:

Delivery Data Structure

{
    "date": "2024-01-15",
    "do_number": "WC-1234",
    "address": "Full shipping address",
    "deliver_to": "Customer Name",
    "phone": "+31612345678",
    "notify_email": "customer@example.com",
    "instructions": "Order items and customer notes",
    "items": [
        {
            "description": "Product Name",
            "quantity": 2
        }
    ]
}

6.3 Developer hooks and filters

Developers can customize FleetConnector Detrack behavior using WordPress hooks and filters.

Available Filters

fcd_delivery_data_before_create

Modify delivery data before creating in Detrack

add_filter('fcd_delivery_data_before_create', function($delivery_data, $order) {
    $delivery_data['instructions'] .= "\nCustom info: " . $order->get_meta('_custom_field');
    return $delivery_data;
}, 10, 2);

fcd_phone_country_code

Customize default phone country code

add_filter('fcd_phone_country_code', function($code) {
    return '+1'; // US country code
});

Available Actions

fcd_delivery_created

Runs after delivery is successfully created in Detrack

add_action('fcd_delivery_created', function($delivery_id, $order, $result) {
    error_log('Delivery created: ' . $delivery_id . ' for order #' . $order->get_id());
}, 10, 3);

fcd_webhook_delivery_completed

Runs when Detrack webhook indicates delivery is completed

add_action('fcd_webhook_delivery_completed', function($order, $data) {
    $order->add_order_note('Delivery completed via Detrack');
}, 10, 2);

6.4 Database structure

FleetConnector Detrack creates a custom database table to store synchronization logs.

Table: wp_fcd_delivery_logs

Column Type Description
id BIGINT Primary key
order_id BIGINT WooCommerce order ID
action VARCHAR(50) Action type (delivery_created, webhook_received, etc.)
status VARCHAR(20) success or error
message TEXT Human-readable message
details LONGTEXT JSON-encoded detailed data
created_at DATETIME Timestamp

Order Meta Keys

  • _detrack_delivery_id - Unique Detrack delivery identifier
  • _detrack_do_number - Delivery order number in Detrack
  • _detrack_delivery_created - Timestamp when delivery was created
  • _detrack_driver_name - Assigned driver name
  • _detrack_driver_id - Assigned driver ID
  • _detrack_pod_signature - Proof of delivery signature URL
  • _detrack_pod_photo - Proof of delivery photo URL
7

Troubleshooting

Common issues and their solutions when using the WooCommerce to Detrack integration.

7.1 Common issues

Deliveries Not Creating Automatically

Solutions:

  • Verify "Automatically create Detrack deliveries" is checked in settings
  • Check that the order status matches your configured trigger statuses
  • Ensure your Detrack API key is valid (test connection in settings)
  • Check FleetConnector Dashboard for error messages
  • Verify order has valid shipping address and phone number

Invalid Phone Number Error

Solutions:

  • Check the order's billing phone field is not empty
  • Ensure phone number contains at least 9 digits
  • For international orders, phone must include country code
  • Remove any letters or invalid characters from phone number

Webhooks Not Updating Orders

Solutions:

  • Verify your site uses HTTPS (required for webhooks)
  • Check webhook is configured correctly in Detrack dashboard
  • Test webhook URL is reachable from external services
  • Check FleetConnector Dashboard for incoming webhook logs
  • Verify permalink settings in WordPress (Settings → Permalinks → Save)

Address Geocoding Failures

Solutions:

  • Check shipping address is complete (street, city, postal code, country)
  • Verify address format is valid
  • Avoid using P.O. boxes (Detrack requires physical delivery addresses)
  • Check for typos or special characters in address fields

7.2 Getting support

If you can't resolve an issue using this documentation, we're here to help.

Before Contacting Support

Please gather the following information:

  • WordPress version and WooCommerce version
  • PHP version (visible in WooCommerce → Status)
  • FleetConnector Detrack plugin version
  • Screenshot of error message or unexpected behavior
  • Relevant log entries from FleetConnector Dashboard
  • Order ID of affected order (if applicable)

How to Contact Us

Email Support

Send an email to support@fleetconnector.app

Response time: Within 24 hours on business days

Premium Support Included

Your FleetConnector Detrack license includes priority email support and updates for one year.

7.3 Additional resources

Detrack API Documentation

docs.detrack.com - Official Detrack API reference

WooCommerce Documentation

woocommerce.com/documentation - WooCommerce guides and tutorials

FleetConnector Changelog

View version history - Track all updates and improvements