FleetConnector Detrack Documentation
Complete guide to installing, configuring, and using the WooCommerce to Detrack integration plugin
Ready to automate your WooCommerce deliveries with Detrack?
€199/year per integration · unlimited orders · 14-day money-back guarantee. Requires an active Detrack account.
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
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.
Upload to WordPress
Navigate to Plugins → Add New → Upload Plugin in your WordPress admin.
Activate Plugin
After upload completes, click "Activate Plugin". The WooCommerce to Detrack integration will automatically create necessary database tables for logging.
Activate License
Go to WooCommerce → FleetConnector Detrack → License section and enter your license key to activate the integration.
Use the license key of the Detrack plugin. A key bought for another FleetConnector plugin is refused. The license is checked again once a week; if that check fails because of a network error, the plugin keeps working.
Configuration
Configure the WooCommerce to Detrack connection and customize how orders are synchronized to deliveries.
New in 1.1.0: the order type and linked pickup settings (the “Order Types & Linked Pickups” card, and the fields on products and product categories) are described in chapter 4.
2.1 Connect WooCommerce to Detrack
Step 1: Get Your Detrack API Key
- Log in to your Detrack dashboard at app.detrack.com
- Navigate to Settings → API Keys
- Click "Generate API Key" or copy your existing key
- Copy the generated API key
Step 2: Configure in WooCommerce
- In WordPress admin, go to WooCommerce → FleetConnector Detrack
- Find the "Detrack API Settings" section
- Paste your Detrack API key in the "Detrack API Key" field
- Click "Test Connection" to verify (should show your organization name)
- Click "Save Changes" at the bottom of the page
The buttons on the settings page (such as “Test Connection”) are protected with a security token. If a button reports that your session has expired, reload the page and try again.
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
- • The DO number (the order number) and the job date are saved to the order for tracking and synchronization
- • Updates and deletes use the saved job date, so a fallback date never moves an existing job and a delete always reaches the right job
- • The tracking link is taken from Detrack’s tracking_link
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.
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
Only changes are sent
An order update is only sent to Detrack when something relevant for the job changed. Saving an order without such a change sends no update and adds no order note.
Delete on Cancel
When enabled, cancelling a WooCommerce order automatically deletes the delivery in 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
Format: HH:MM (24-hour)
Complete Before (End Time)
Latest time a delivery can take place
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
Date order in custom fields
A date like 10/03/2026 is 10 March in Europe and October 3 in the US. This setting decides how such dates are read. Timestamps, YYYY-MM-DD dates and dates with a day above 12 are always read correctly.
- Auto (default): Uses the date format of the delivery date plugin that wrote the field when known (Order Delivery Date’s display field), otherwise your WordPress date format (Settings → General). A format that starts with the month (m/d/Y, or the US default F j, Y) means month-day; everything else means day-month. Dates with dots are always day-month.
- Day-month: 10/03/2026 = 10 March 2026.
- Month-day: 10/03/2026 = October 3, 2026.
How the supported plugins store the date
| Plugin | Field (meta key) | How the date is stored | How the plugin reads it |
|---|---|---|---|
| Order Delivery Date (Tyche) Lite | _orddd_lite_timestamp | Unix timestamp of the chosen date at midnight UTC | Read in UTC, so shops west of UTC don’t get the day before |
| Order Delivery Date, display field | The field named after the plugin’s “Delivery Date” label (use it as custom field) | Text in the plugin’s own date format (e.g. d MM, yy or mm/dd/y) | With Date order “Auto”, the day/month order of that format is used |
| Iconic Delivery Slots | jckwds_date, _jckwds_date | Display text in Iconic’s date format | Numeric dates like 10/03/2026 follow the Date order setting |
| Plugins using a delivery_date field | delivery_date, _delivery_date | Usually YYYY-MM-DD | Unambiguous when it is YYYY-MM-DD |
| Any other plugin | Your custom field | Depends on the plugin | Dates like 10/03/2026 follow the Date order setting |
Detect from recent order
Using a booking or delivery date plugin that isn’t listed? Pick a recent order that has a delivery date (or enter its order ID) under Delivery Date Integration and click Show order fields. You see every field of that order with its value and how it is read as a date; likely date fields are marked and listed first. Click Use as delivery date field to save it as the custom field. Fields that may hold secrets and the plugin’s own fields are not shown.
What happens when a fallback date is used
When the order has no delivery date, the value isn’t a readable date, or the customer’s date is already in the past, the Detrack delivery is created for tomorrow. You can see why:
- • The Detrack Delivery Job box on the order shows the delivery date and the reason, for example “Fallback used: the customer’s date 10 March 2026 (field _delivery_date) is in the past. Fallback: tomorrow.” Before the order is sent, the box shows which date it would get.
- • The activity log entry of the send includes the date and the reason.
- • A date in the past or an unreadable value is also logged as a Warning in the activity log (once per order); the dashboard has a Warning filter and a “Date warnings” counter.
When sending an order times out
If Detrack doesn’t answer in time, the order may have been created anyway. The plugin marks the order, and the next attempt (for example Retry in the dashboard or the order action) first looks up the DO number and date in Detrack. If it exists, it is linked to the order instead of creating a duplicate.
2.7 Webhook settings
Webhook URL
Copy this URL to configure webhooks in your Detrack dashboard:
The URL ends with a secret token (?token=…) that is unique to your site. Always copy the complete URL from the settings page. You'll configure this in Chapter 5 (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
On orders with a linked pickup, the setting “Order status on orders with a linked pickup” decides whether the “Delivery Completed Status” is set after the delivery or only after the last trip (the default). A failed pickup sets the “Delivery Failed Status” right away. See 4.6.
Save Driver Information
When enabled, FleetConnector Detrack saves driver name and ID to the order when a delivery is assigned.
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.
Local pickup: with this setting on, orders shipped with a local pickup method (local_pickup, pickup_location, local_pickup_plus) are skipped. Developers can change the list of excluded shipping methods with the fcd_excluded_shipping_methods filter, and decide per order with the fcd_order_needs_delivery filter.
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
- Go to WooCommerce → Orders
- Hover over an order in the list
- Click on "Create Detrack Delivery" from the row actions
- The delivery will be created immediately and you'll see a success message
From Order Edit Screen
- Open any WooCommerce order
- Look for the "Detrack Delivery" meta box on the right side
- Click the "Create Detrack Delivery" button
- 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
- Go to WooCommerce → Orders
- Check the boxes next to the orders you want to process
- Select "Create Detrack Deliveries" from the Bulk Actions dropdown at the top
- Click "Apply"
- 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
- DO Number: The delivery order number in Detrack (your order number)
- Job date: The date of the job in Detrack
- Tracking link: “Open delivery tracking”, from Detrack’s tracking link
- Failure reason: Why the delivery failed (if it failed)
- Assigned Driver: Name of the driver assigned to this delivery (if assigned)
- Created: Date and time the delivery was created
- Proof of Delivery: Links to the signature and up to 10 photos (if completed)
- Last error: Shown in red when the last attempt to send the order to Detrack failed, with the reason
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
Order has been sent to Detrack
Order has not been sent to Detrack
The last attempt to send the order failed. The reason is in the order notes and under “Last error” in the Detrack box of the order.
The order has a linked pickup (see chapter 4). Colour: purple = open, green = collected, red = failed or not sent. Hover for the pickup date and status.
Order types & linked pickups
Give products a Detrack job type (Delivery or Collection) and let the plugin create a linked pickup: a second Detrack job of type Collection that collects the products again, for rentals, equipment hire, crates or deposits. Available from version 1.1.0.
4.1 Where to set it
Everything is set on your products and product categories. There are two independent settings: the order type (Delivery or Collection) of the Detrack job, and the linked pickup: a second Detrack job that collects the products again.
On a product
Edit the product and open the Detrack tab in the “Product data” box. It has these fields:
| Field | Options | What it does |
|---|---|---|
| Order type | “Category or plugin setting (now: …)”, Delivery, Collection | The Detrack job type for this product. The first option uses the category, or else the default order type setting. |
| Linked pickup | “Category setting”, “Yes, collect this product again”, “No” | Yes creates a linked pickup for orders with this product. No switches it off for this product, even when its category has a linked pickup. |
| Pickup after (days) | Number (0 or more) | Days between the delivery and the pickup. Empty uses the category, then the “Pickup after (days)” setting (default 7). The placeholder shows the current default. |
| Pickup date field (optional) | Order meta key, e.g. _rental_end_date | An order field that holds the return or end date, for example from a rental or booking plugin. When it is empty or not a valid date, the number of days is used (see 4.4). |
Variations use the settings of their parent product.
On a product category
Go to Products → Categories and add or edit a category. The same fields are shown at the bottom of the form:
- • Detrack order type: “Plugin setting (now: …)” or Delivery, Collection
- • Linked pickup: “No” or “Yes, collect these products again”
- • Pickup after (days) and Pickup date field (optional), as on a product
A product in several categories combines them: the strongest order type, a linked pickup when one of the categories has it, the most days and the first date field found.
Which setting wins
Product → category → the “Default order type” setting in the “Order Types & Linked Pickups” card. A product setting always wins over its category.
Linked pickup
A product set to Yes or No decides for itself. A product on “Category setting” gets a pickup when one of its categories has one.
4.2 Mixed orders
A Detrack job has one type, so an order with products of different types gets the strongest type: Delivery > Collection. A delivery always has to be driven, so it wins.
The products with another type are listed on the first line of the job instructions, so the driver knows what to do:
The order box shows the type that was used and where it came from (product setting, category setting, plugin setting or custom code), and whether the order is mixed.
Collection is Detrack’s own name for a pickup job. Detrack identifies a job by DO number, date and type, so a job that is already in Detrack keeps its type. When the products change the type later, the order gets a note and the activity log a warning (“Job type kept”); change the type in Detrack by hand if needed.
4.3 The linked pickup
When at least one product of the order has a linked pickup, the plugin creates a second Detrack job of type Collection. It uses the same address and contact details as the delivery and gets its own DO number: the delivery’s DO number + “-P”, for example 1234-P.
Its job instructions start with a line that tells the driver what to collect, followed by the usual order details:
An order gets one linked pickup, even when several of its products need one. The pickup then gets the latest pickup date of those products, so everything is collected in one trip.
Life cycle
- • Created right after the delivery is sent to Detrack.
- • Follows every change of the order (address, products, dates), also after the delivery is completed, for example when a rental is extended.
- • Removed when no product in the order needs a pickup anymore, and created again when one does.
- • Removed together with the delivery whenever the plugin removes the delivery, for example when the order is cancelled and the plugin is set to delete it then (see 2.4).
- • Left alone once the pickup itself is completed or failed.
There is no background queue: a pickup that could not be sent is tried again on the next update of the order, with the order action “Update Detrack description” or with the bulk action “Update Detrack descriptions”.
4.4 How the pickup date is worked out
The pickup date is the date of the delivery that was sent to Detrack plus a number of days:
- • The number of days comes from the product, then from its category, then from the “Pickup after (days)” setting (default: 7).
- • The setting “Count pickup days as” chooses calendar days (default) or business days. Business days are Monday to Friday; developers can change them with the fcd_business_days filter.
Or a date from the order
With a “Pickup date field”, the pickup date is read from that order field instead, for example the end date that a rental or booking plugin stores on the order. It is read in the same way as the delivery date, with the same “Date order in custom fields” setting (see 2.6).
- • Empty, unreadable or before the delivery date: the number of days is used instead (the fallback). A warning “Pickup date fallback used” is added to the activity log once per problem, the order note of a new pickup explains it, and the “Why this pickup date” block in the order box turns amber.
- • On an update: when the field becomes unusable, the pickup keeps the date it was sent with.
- • Several products with a pickup: the latest date is used.
4.5 The settings
The Order Types & Linked Pickups card on the plugin settings page explains the product and category fields and holds these settings:
| Setting | Option name | Options | Default | Description |
|---|---|---|---|---|
| Default order type | fcd_order_type | Delivery, Collection | Delivery | Used for products without an order type of their own and without a category type. |
| Pickup after (days) | fcd_pickup_default_days | Number | 7 | Days between the delivery and the pickup for products and categories without their own number. Also the fallback when a pickup date field is unusable. |
| Count pickup days as | fcd_pickup_day_count | Calendar days, Business days (Mon–Fri) | Calendar days | Business days are Monday to Friday, unless the fcd_business_days filter changes them. |
| Time window of the pickup | fcd_pickup_time_window | No time window (any time that day), Same time window as the delivery | No time window | The plugin sends no time window to Detrack itself. “Same time window” copies the time window fields of the delivery job when custom code adds them (fcd_job_data_before_create / fcd_job_data_before_update). |
| Order status on orders with a linked pickup | fcd_trip_status_rule | Set the “completed” status after the last trip (delivery and pickup), Set the “completed” status after the delivery | After the last trip | See 4.6. |
Developers: the filters and actions of this feature are listed in 7.3, and the product, category and order meta keys in 7.4.
4.6 Order status with a linked pickup
Without a linked pickup, nothing changes: the “Delivery Completed Status” (see 2.7) is set when the delivery is completed. On orders with a linked pickup, the setting “Order status on orders with a linked pickup” decides when that happens:
After the last trip (default)
The status is only set when both the delivery and the pickup are completed. The order note of the first completed trip says what the order is still waiting for, and the order box shows which rule applies.
After the delivery
The status is set when the delivery is completed, exactly as without a pickup. The completed pickup only adds an order note.
- • A failed delivery or pickup sets the “Delivery Failed Status” right away, with both rules.
- • A pickup that is removed because no product needs it anymore no longer holds the status back: the status is set then.
4.7 What you see in WooCommerce
The Detrack box on the order
- • Order type: the type that was sent and why (product, category or plugin setting, custom code, mixed order).
- • Before the order is sent: a preview with the order type and “Linked pickup when sent now”, with the date and the reason.
- • Linked pickup block: the pickup’s own DO number, status, pickup date, driver and the other details the platform reports, and its last error.
- • Why this pickup date: how the date was worked out; amber when a fallback was used.
- • Not sent yet: when the pickup is needed but missing (for example after an error), the block says so and how to send it.
Orders list
- • A small “P” badge next to the Detrack status icon: purple = open, green = collected, red = failed or not sent (hover for the date, status or error).
Dashboard and order notes
- • Activity log rows of the linked pickup have a “Pickup” badge.
- • The order notes record what happened to the linked pickup, for example when it was created, removed, completed or failed.
4.8 How the pickup appears in Detrack
- • The order types are Detrack’s job types: Delivery (D) and Collection (P). Collection is Detrack’s own word for a pickup.
- • The type is part of the job’s identity (DO number + date + type), so an existing job keeps its type. When the products change the type later, the order gets a note and the activity log a warning instead.
- • The pickup is a Collection job with DO number <DO>-P on the pickup date. It has the same address and contact details as the delivery and the same webhook URL with your secret token, so its status updates arrive like those of the delivery.
- • Its payment_amount is 0: a cash-on-delivery amount is only collected on the delivery, never twice.
- • After a timeout, the plugin looks the pickup up with /dn/jobs/show (the -P DO number, its date and type Collection) before it sends it again, so no duplicate is created.
- • Detrack has no “cancelled” status. Time windows are only sent when custom code added them to the delivery job; “Same time window as the delivery” then copies them.
- • There is no background queue: a failed pickup is retried on the next update of the order, with the order action “Update Detrack description” or with the bulk action “Update Detrack descriptions”.
4.9 Example: a rental
A rental that is delivered on the 10th and collected three days later:
- You rent out party tents. On the product “Party tent 3x6 m”, open the Detrack tab and set Linked pickup to “Yes, collect this product again” and Pickup after (days) to 3. Its order type stays on the category or plugin setting, Delivery.
- A customer orders the tent and a box of paper plates (a normal product without a pickup) for delivery on Saturday 10 October 2026.
- When the order is sent, Detrack gets a Delivery job 1234 on Saturday 10 October, and right after it a Collection job 1234-P on Tuesday 13 October. Its job instructions start with “PICKUP - collect the products of delivery 1234 (October 10, 2026): Party tent 3x6 m”.
- With “Count pickup days as: Business days” the pickup would be on Wednesday 14 October instead (Monday, Tuesday, Wednesday).
- Rental plugin with an end date? Enter its order field (for example _rental_end_date) as the product’s Pickup date field. The pickup then follows that date: when the customer extends the rental to Friday 16 October, the next update of the order moves the pickup to the 16th, even though the delivery was already done. If the field is empty or unreadable, the 3 days are used and a warning is logged.
- The driver delivers the tent on the 10th. With the default rule, the order status doesn’t change yet and the order note says it waits for the pickup. When the tent is collected, the order gets the “Delivery Completed Status” (if you set one).
Webhooks
Webhooks enable real-time synchronization from Detrack to WooCommerce. When drivers update delivery status in Detrack, your WooCommerce orders automatically update.
5.1 Webhook setup
Step 1: Get Your Webhook URL
- In WordPress admin, go to WooCommerce → FleetConnector Detrack
- Scroll to the "Webhook Settings" section
- Copy the complete webhook URL displayed, including the token (it will look like https://yoursite.com/wp-json/fleetconnector-detrack/v1/webhook?token=…)
Updating from a version before 1.1.0
The webhook URL now contains a secret token. Copy the URL again from the plugin settings and paste it into Detrack (Integrations → Webhook), replacing the old URL.
Step 2: Configure in Detrack
- Log in to your Detrack dashboard at app.detrack.com
- Go to Integrations → Webhook
- Paste your complete webhook URL (with ?token=…) in the URL field
- Save the webhook
Jobs created by the plugin also carry this webhook URL as their own webhook_url, so status updates of those jobs arrive even without the global webhook in Detrack.
Webhook security
- • Token: a request with a wrong token is rejected.
- • Verified with the Detrack API: before an order is changed, the plugin fetches the job from the Detrack API with your API key and uses that data. A forged request with a guessed DO number can’t complete an order.
- • Formats: both JSON and Detrack’s older form-encoded json field are accepted.
- • Each status once: when Detrack sends the same status more than once, it is applied only once.
5.2 Supported webhook events
Detrack sends the job whenever its status changes. The plugin looks up the job in the Detrack API and acts on these statuses (each status is applied once):
1 completed / completed_partial
When triggered: Driver marks a delivery as completed in Detrack (with proof of delivery).
What happens:
- WooCommerce order status updates to your configured "Completed" status
- Proof of delivery is saved to the order: the signature link and up to 10 photo links
- Event is logged in FleetConnector Dashboard
2 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 in_transit / head_to_delivery
When triggered: Driver starts the delivery and is en route to the delivery address.
What happens:
- Order note is added that the delivery is in transit
4 dispatched
When triggered: A delivery is dispatched to a driver in Detrack.
What happens:
- Driver name is saved to the order and an order note is added (if "Save driver info" is enabled)
With every status update, the tracking link from Detrack’s tracking_link is saved to the order.
Dashboard
The FleetConnector Detrack Dashboard provides complete visibility into all WooCommerce to Detrack synchronization activity.
6.1 Accessing the dashboard
Access the dashboard by navigating to:
6.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
6.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
6.4 Export to CSV
Export your activity log to CSV format for analysis, reporting, or record-keeping.
How to Export
- Apply any filters you want (date range, status, etc.)
- Click the "Export to CSV" button at the top of the dashboard
- The filtered results will download as a CSV file
6.5 Retry failed deliveries
If deliveries fail to sync due to temporary issues, you can retry them directly from the dashboard.
How to Retry
- Filter the log to show only "Error" status events
- Find the failed delivery you want to retry
- Click "Retry" to attempt creation again
Technical Details
Understanding how FleetConnector Detrack works behind the scenes.
7.1 How the integration works
FleetConnector Detrack bridges WooCommerce and Detrack using WordPress hooks and direct HTTP API calls.
WooCommerce → Detrack Flow
Order reaches a trigger status (e.g., Processing)
FleetConnector hooks into woocommerce_order_status_changed
Delivery date is detected from order data or delivery date plugin
Delivery data is formatted for Detrack API
API request is sent to POST /dn/jobs (Detrack API v2)
DO number and job date are saved to order meta
Detrack API v2 endpoints used
POST /dn/jobs: create a delivery jobPUT /dn/jobs/update: update a job (by DO number and job date)DELETE /dn/jobs/delete: delete a job (by DO number and job date)GET /dn/jobs/show: look up a job, for example to verify a webhook
7.2 Data sent to Detrack
When creating a delivery, FleetConnector Detrack sends the following data (empty fields are left out):
Delivery Data Structure
{
"data": {
"type": "Delivery",
"do_number": "1234",
"date": "2026-10-01",
"order_number": "1234",
"address": "Keizersgracht 123, 1015 CJ Amsterdam, Netherlands",
"address_1": "Keizersgracht 123",
"postal_code": "1015 CJ",
"city": "Amsterdam",
"country": "Netherlands",
"deliver_to_collect_from": "Jan Jansen",
"phone_number": "+31612345678",
"notify_email": "jan@example.com",
"instructions": "Order Number: 1234 …",
"items": [
{
"sku": "SKU-001",
"description": "Product Name",
"quantity": 2
}
],
"invoice_number": "1234",
"invoice_amount": "49.99",
"payment_mode": "online",
"payment_amount": 0,
"webhook_url": "https://yoursite.com/wp-json/fleetconnector-detrack/v1/webhook?token=…"
}
}
Field notes
- • do_number is the WooCommerce order number.
- • address is the shipping address, or the billing address when the order has no shipping address. It is formatted in the WooCommerce address format of the order’s country and always includes the country name (and the state, for countries such as the US, Canada and Australia). The parts are also sent separately (address_1, postal_code, city, state, country).
- • payment_amount is the order total only for cash on delivery; for all other payment methods it is 0.
- • webhook_url makes Detrack send status updates of this job to your site (see 5.1).
Phone number
The phone number is converted to international format with the calling code of the order’s country: the shipping country, or the billing country when the phone number came from the billing details.
- • A number that starts with + is kept as it is.
- • A 00 prefix is replaced by +.
- • North America (+1): a 10-digit number gets +1; an 11-digit number starting with 1 gets +.
- • Italy, San Marino and Vatican City: the leading 0 is kept after the country code.
- • A number that already starts with the country code (no leading 0, at least 10 digits, at least 8 digits after the code) is kept with a + in front.
- • Otherwise the leading 0 is dropped and the country code is added (0612345678 → +31612345678 for the Netherlands).
An order without a phone number is sent without a phone number; no placeholder number is used.
7.3 Developer hooks and filters
Developers can customize FleetConnector Detrack behavior using WordPress hooks and filters.
Available Filters
fcd_job_data_before_create
Modify the job data before creating it in Detrack (the fields are under data)
add_filter('fcd_job_data_before_create', function($job_data, $order) {
$job_data['data']['instructions'] .= "\nCustom info: " . $order->get_meta('_custom_field');
return $job_data;
}, 10, 2);
fcd_phone_country_code
Change the calling code used for numbers without one. Receives the calling code of the order’s country (for example 31) and the country code (for example NL).
add_filter('fcd_phone_country_code', function($calling_code, $country) {
// Orders without a country: assume the Netherlands
if ($country === '') {
return '31';
}
return $calling_code;
}, 10, 2);
fcd_excluded_shipping_methods / fcd_order_needs_delivery
The shipping methods that are skipped when “Only create deliveries for shipping orders” is on (default: local pickup methods), and a per-order decision
Order types and linked pickups (new in 1.1.0)
Filters for the order type per product or category and the linked pickup (see chapter 4).
| Hook | Arguments | Description |
|---|---|---|
| fcd_order_type | $type, $order, $item_types | The order type of the whole order (D (Delivery) or P (Collection)). $item_types lists name, quantity and type of every order line. |
| fcd_item_order_type | $type, $item, $product, $order | The order type of one order line |
| fcd_linked_pickup_enabled | $enabled, $order, $items | Whether the order gets a linked pickup ($items: names of the products with a pickup). Return true to add one with the default number of days. |
| fcd_linked_pickup_date | $date, $order, $delivery_date, $info | The pickup date (YYYY-MM-DD). $info says how it was worked out; a value that is not a YYYY-MM-DD date is ignored. |
| fcd_linked_pickup_order_no | $order_no, $order | The DO number of the pickup job (default: the delivery’s DO number + “-P”). Stored when the pickup is created. |
| fcd_linked_pickup_payload | $payload, $order, $info | The Detrack job data of the pickup, as {"data": {...}} (create and update). |
| fcd_business_days | $days | Business days for “Count pickup days as: Business days”, as ISO weekday numbers (1 = Monday … 7 = Sunday). Default: Monday–Friday |
add_filter('fcd_linked_pickup_date', function($date, $order, $delivery_date, $info) {
// Never collect on a Sunday: move the pickup to Monday
if ($date && date('N', strtotime($date)) == 7) {
return date('Y-m-d', strtotime($date . ' +1 day'));
}
return $date;
}, 10, 4);
Available Actions
fcd_job_created
Runs after a job is successfully created in Detrack
add_action('fcd_job_created', function($do_number, $order, $result) {
error_log('Detrack job created: ' . $do_number . ' for order #' . $order->get_id());
}, 10, 3);
fcd_webhook_job_completed
Runs when a verified Detrack status update says the delivery is completed
add_action('fcd_webhook_job_completed', function($order, $data) {
$order->add_order_note('Delivery completed via Detrack');
}, 10, 2);
fcd_pickup_* (new in 1.1.0)
Actions for the linked pickup. Deliveries keep firing the existing actions.
| Hook | Arguments | Description |
|---|---|---|
| fcd_pickup_created | $do_number, $order, $response | The linked pickup was created |
| fcd_pickup_updated | $do_number, $order, $response | The linked pickup was updated |
| fcd_pickup_deleted | $do_number, $order | The linked pickup was removed |
| fcd_pickup_create_failed fcd_pickup_update_failed fcd_pickup_delete_failed |
$order, $error | A request for the linked pickup failed ($error is a WP_Error) |
| fcd_pickup_status_dispatched fcd_pickup_status_in_transit fcd_pickup_status_head_to_delivery fcd_pickup_status_completed fcd_pickup_status_completed_partial fcd_pickup_status_failed |
$order, $data | A verified Detrack status update was processed for the pickup job |
7.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_do_number: Delivery order number in Detrack_detrack_job_date: Date of the job in Detrack (used for updates and deletes)_detrack_job_created: Timestamp when the job was created_detrack_status: Last status received from Detrack_detrack_tracking_url: Tracking link from Detrack_detrack_driver_name: Assigned driver name_detrack_pod_signature_url: Proof of delivery signature URL_detrack_pod_photo_urls: Proof of delivery photo URLs (up to 10)_detrack_last_error: Reason of the last failed send_detrack_job_type: Detrack type of the delivery job (Delivery or Collection)_detrack_type_info: How the job type was chosen, shown in the order box_detrack_type_kept: Set when the products now resolve to another type but the existing job kept its type_detrack_time_window: Time window fields of the delivery job (only when custom code adds them), copied to the pickup with “Same time window as the delivery”_detrack_pickup_do_number: DO number of the linked pickup job (…-P)_detrack_pickup_job_date: Date of the pickup job in Detrack (used for updates and deletes)_detrack_pickup_status: Last Detrack status of the pickup job_detrack_pickup_info: How the pickup date was worked out (shown as “Why this pickup date”)_detrack_pickup_warning: Fingerprint of the last pickup date warning, so the same problem is logged only once_detrack_pickup_last_error: Most recent error of the linked pickup_detrack_pickup_{field}: Details of the pickup job: job_created, job_updated, tracking_url, create_pending, payload_hash, driver_name, job_completed, job_failed, failure_reason, pod_signature_url, pod_photo_urls, completion_details
Product and Category Meta Keys (linked pickups)
Saved on the product (a variation uses its parent product) and on the product category (term meta). They are deleted when the plugin is uninstalled.
_fcd_order_type: Order type (D (Delivery) or P (Collection)); not set = category or plugin setting_fcd_linked_pickup: Linked pickup: yes or no (products); yes (categories). Not set = category setting_fcd_pickup_days: Pickup after (days)_fcd_pickup_date_field: Pickup date field: the order meta key with the pickup date
Troubleshooting
Common issues and their solutions when using the WooCommerce to Detrack integration.
8.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
- Check the order notes and the “Last error” line in the Detrack box of the order (orders with a failed send show a red ! in the Detrack column)
- Verify the order has a valid address
- If “Only create deliveries for shipping orders” is on, local pickup orders are skipped on purpose
Invalid Phone Number Error
Solutions:
- Check that the order has the right shipping or billing country: the country code is taken from it (see 7.2)
- Check the phone number is complete and contains no letters
- Numbers that start with + or 00 are sent as entered, so check the country code in those
- Use the
fcd_phone_country_codefilter to change the calling code
An order without a phone number is sent without one; no placeholder number is used.
Webhooks Not Updating Orders
Solutions:
- Verify your site uses HTTPS (required for webhooks)
- Check webhook is configured correctly in Detrack dashboard (Integrations → Webhook)
- Test webhook URL is reachable from external services
- Check FleetConnector Dashboard for incoming webhook logs
- Verify permalink settings in WordPress (Settings → Permalinks → Save)
Webhook Stopped Working After Updating to 1.1.0
Solutions:
- The webhook URL in the plugin settings now contains a secret token (?token=…). A request with a wrong token is rejected.
- Copy the complete URL again from WooCommerce → FleetConnector Detrack → Webhook Settings and paste it into Detrack (Integrations → Webhook)
- Jobs created by version 1.1.0 or later carry this URL themselves, so their status updates also arrive without the global webhook
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
8.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. FleetConnector is actively maintained, unlike Detrack's official WooCommerce plugin, which has not been updated since 2019.
8.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
Ready to automate your WooCommerce deliveries?
Get the WooCommerce → Detrack plugin for €199/year, backed by a 14-day money-back guarantee. New to FleetConnector? Onfleet is our most popular integration, so explore it too.