FleetConnector Documentation
Complete guide to installing, configuring, and using the WooCommerce to Onfleet integration plugin
Ready to automate your WooCommerce deliveries?
Purchase the WordPress plugin for just €199/year. Unlimited orders, premium support included.
Installation
1.1 System requirements
Before installing the WooCommerce to Onfleet plugin, ensure your system meets these requirements:
- WordPress 5.8 or higher: The FleetConnector plugin requires modern WordPress features
- WooCommerce 5.0 or higher: Must be installed and activated before FleetConnector
- PHP 7.4 or higher: Required for modern PHP features and Onfleet SDK
- An active Onfleet account with API access: Get your API key from Onfleet dashboard
- HTTPS enabled (recommended): Required for Onfleet webhooks to work properly
1.2 Installation steps
Purchase and Download
Purchase the WooCommerce to Onfleet 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 Onfleet integration will automatically create necessary database tables for logging.
Activate License
Go to WooCommerce → FleetConnector → License section and enter your license key to activate the integration.
Use the license key of the Onfleet 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 Onfleet connection and customize how orders are synchronized to delivery tasks.
New in 2.2.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 Onfleet
Step 1: Get Your Onfleet API Key
- Log in to your Onfleet dashboard at onfleet.com/dashboard
- Navigate to Settings → API & Webhooks
- Click "Create New API Key"
- Give it a descriptive name (e.g., "WooCommerce Integration")
- Copy the generated API key immediately (you won't be able to see it again)
Step 2: Configure in WooCommerce
- In WordPress admin, go to WooCommerce → FleetConnector
- Find the "Onfleet API Settings" section
- Paste your Onfleet API key in the "Onfleet API Key" field
- Click "Test Connection" to verify (should show your organization name)
- Click "Load Teams" to fetch your available Onfleet teams
- Select a default team from the dropdown (optional but recommended)
- Click "Save Changes" at the bottom of the page
The selected default team is kept when you save the settings without clicking “Load Teams” first.
The buttons on the settings page (such as “Test Connection” and “Load Teams”) are protected with a security token. If a button reports that your session has expired, reload the page and try again.
2.2 Automatic task creation
Enable Auto-Create
Check the "Automatically create Onfleet tasks" checkbox to enable automatic task creation when WooCommerce orders reach specific statuses.
Default: Enabled
When enabled, tasks are created automatically. When disabled, you must create tasks manually for each order.
Select Trigger Statuses
Choose which WooCommerce order statuses should trigger Onfleet task creation:
✓ Processing (Recommended)
Task created as soon as payment is confirmed. Best for immediate dispatch.
✓ Completed (Recommended)
Task created after order is fulfilled. Best for scheduled dispatch.
You can also select other statuses like On-Hold, Pending Payment, or any custom statuses you've created.
2.3 Synchronization settings
Auto-Sync Updates
When enabled, any changes to a WooCommerce order automatically update the corresponding Onfleet task.
What gets synchronized:
- • Customer name and contact details
- • Delivery address
- • Order items and quantities
- • Customer notes
- • Delivery date and time window
Only changes are sent
An order update is only sent to Onfleet when something relevant for the task changed. Saving an order without such a change sends no update and adds no order note. On an update, the delivery date that was sent before is kept, unless the customer chose a new, valid delivery date.
Delete on Cancel
When enabled, cancelling a WooCommerce order automatically deletes the task in Onfleet.
2.4 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)
Times are in your shop’s time zone
Since version 2.2.0, “Complete after” and “Complete before” are read in the time zone set in WordPress under Settings → General. 09:00 means 09:00 local time in your shop.
Updating from a version before 2.2.0
Earlier versions read these times as UTC. 09:00 then became 11:00 in Amsterdam in summer, or 05:00 in New York. If you shifted your times to compensate for this, set them back to the times you actually want.
2.5 Delivery date plugin integration
FleetConnector can automatically detect delivery dates from popular WooCommerce plugins and use them to set accurate delivery windows in Onfleet.
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
WooCommerce Delivery Slots
Simple delivery slot selection
Custom Field
Use your own custom delivery date field
Custom Field Configuration
If you use a custom delivery date field:
- Select "Custom field" from the Delivery Date Plugin dropdown
- Enter the meta key in the "Custom Date Field" input (e.g., _my_delivery_date)
- Save changes
Example meta keys: _delivery_date, delivery_date_field, custom_delivery_date
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.
- As before: the reading of earlier versions: 10/03/2026 (slashes) = October 3, 10-03-2026 and 10.03.2026 = 10 March. Installations updated from an earlier version are set to this, so nothing changes for them.
- Auto: default for new installations. 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 Onfleet delivery is created for tomorrow. You can see why:
- • The Onfleet Delivery Task 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 Onfleet 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 searches Onfleet for a task with this order’s ID in its metadata. If it exists, it is linked to the order instead of creating a duplicate.
2.6 Webhook settings
Webhook URL
Copy this URL to configure webhooks in your Onfleet dashboard:
You'll configure this in Chapter 5 (Webhooks).
Webhook signing secret (recommended)
Optional. Paste the webhook secret from your Onfleet dashboard (Settings → API & Webhooks). Every incoming webhook is then checked against the X-Onfleet-Signature header (HMAC-SHA512); a webhook with a missing or wrong signature is rejected.
With or without a secret, every event is verified with the Onfleet API before the order is changed, so a forged request can’t mark an order as delivered.
Order Status Mappings
Configure what happens to WooCommerce orders when Onfleet tasks change status:
Task Completed Status
Select which order status to set when a delivery task is completed in Onfleet.
Common choice: Completed
Task Failed Status
Select which order status to set when a delivery task fails in Onfleet.
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 “Task Completed Status” is set after the delivery or only after the last trip (the default). A failed pickup sets the “Task Failed Status” right away. See 4.6.
Save Driver Information
When enabled, FleetConnector saves driver name and ID to the order when a task is assigned in Onfleet.
2.7 Display settings
Customize how FleetConnector displays information in your WooCommerce admin.
Show Onfleet Status Column
Control whether the Onfleet status column appears in your WooCommerce orders list.
Default: Enabled
When enabled, an "Onfleet" column shows in the orders list with a checkmark for orders sent to Onfleet and a dash for orders not sent.
Only Create Tasks for Shipping Orders
When enabled, automatic task creation only triggers for orders that require shipping. Virtual products, downloadable products, and local pickup orders will be skipped.
Default: Disabled
When disabled, all orders are eligible for Onfleet task creation regardless of shipping requirements.
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 fc_excluded_shipping_methods filter, and decide per order with the fc_order_needs_delivery filter.
2.8 Danger zone
Clear Activity Logs
Remove all FleetConnector activity logs from the dashboard. This clears the log history but does not affect your orders or Onfleet tasks.
When to use: Use this to clean up old log entries and free up database space. Useful after testing or when logs have grown large.
Clean Up All Task IDs
Remove all Onfleet task ID references from your WooCommerce orders. This breaks the link between orders and their Onfleet tasks.
When to use: Use this when switching to a new Onfleet account or after changing API keys. After cleanup, you can resend orders to Onfleet to create new tasks.
Features
FleetConnector provides multiple ways to create and manage Onfleet tasks from your WooCommerce orders.
3.1 Manual task creation
Even with automatic task creation enabled, you can manually create Onfleet tasks for individual orders.
From Order Actions Dropdown
- Go to WooCommerce → Orders
- Hover over an order in the list
- Click on "Create Onfleet Task" from the row actions
- The task will be created immediately and you'll see a success message
From Order Edit Screen
- Open any WooCommerce order
- Look for the "Onfleet Task Information" meta box on the right side
- Click the "Create Onfleet Task" button
- The task will be created and the meta box will update with task details
3.2 Bulk task creation
Create Onfleet tasks 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 Onfleet Tasks" 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 processes each order individually
- • Orders that already have tasks are skipped
- • Invalid orders (missing address, etc.) are skipped with a warning
- • All actions are logged in the FleetConnector Dashboard
3.3 Onfleet task information meta box
When editing any WooCommerce order, you'll see an "Onfleet Task Information" meta box that shows the current status of the task.
Information Displayed
- Task ID: Unique Onfleet task identifier
- Status: Current task status (Unassigned, Assigned, Active, Completed, Failed)
- Assigned Driver: Name of the driver assigned to this delivery (if assigned)
- Created: Date and time the task was created
- Onfleet Link: Direct link to view the task in Onfleet dashboard
- Last error: Shown in red when the last attempt to send the order to Onfleet failed, with the reason
Available Actions
Create Onfleet Task
Available if no task exists yet
Sync to Onfleet
Manually push order updates to Onfleet
View in Onfleet
Opens the task directly in your Onfleet dashboard
3.4 Onfleet status column
FleetConnector adds an "Onfleet" column to your WooCommerce orders list for quick visibility of which orders have been sent to Onfleet.
Status Indicators
Order has been sent to Onfleet
Order has not been sent to Onfleet
The last attempt to send the order failed. The reason is in the order notes and under “Last error” in the Onfleet 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 an Onfleet order type (delivery or pickup task) and let the plugin create a linked pickup: a second Onfleet task that collects the products again, for rentals, equipment hire, crates or deposits. Available from version 2.2.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 pickup) of the Onfleet task, and the linked pickup: a second Onfleet task that collects the products again.
On a product
Edit the product and open the Onfleet tab in the “Product data” box. It has these fields:
| Field | Options | What it does |
|---|---|---|
| Order type | “Category or plugin setting (now: …)”, Delivery, Pickup | The Onfleet order 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:
- • Onfleet order type: “Plugin setting (now: …)” or Delivery, Pickup
- • 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
An Onfleet task has one type, so an order with products of different types gets the strongest type: Delivery > Pickup. A delivery always has to be driven, so it wins.
The products with another type are listed on the first line of the task notes, 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.
A Pickup order is created as an Onfleet pickup task (pickupTask). When the products of an order change, the next update turns the task into a pickup task or back into a delivery task.
4.3 The linked pickup
When at least one product of the order has a linked pickup, the plugin creates a second Onfleet task, created as a pickup task. It uses the same address and contact details as the delivery and gets “-P” after the order number (for example 1234-P) in its notes, the order notes and the activity log. Onfleet has no order number field..
Its task notes 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 Onfleet.
- • 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.3).
- • 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 “Create Onfleet delivery task” (which creates or updates the pickup when the delivery already exists) or with Retry in the dashboard.
4.4 How the pickup date is worked out
The pickup date is the date of the delivery that was sent to Onfleet 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 fc_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.5).
- • 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 | fc_order_type | Delivery, Pickup | Delivery | Used for products without an order type of their own and without a category type. |
| Pickup after (days) | fc_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 | fc_pickup_day_count | Calendar days, Business days (Mon–Fri) | Calendar days | Business days are Monday to Friday, unless the fc_business_days filter changes them. |
| Time window of the pickup | fc_pickup_time_window | No time window (any time that day), Same time window as the delivery | No time window | Without a time window the pickup task can be completed from 00:00 until 23:59 on the pickup date (shop time zone). |
| Order status on orders with a linked pickup | fc_trip_status_rule | Set the “task completed” status after the last trip (delivery and pickup), Set the “task completed” status after the delivery | After the last trip | See 4.6. |
Developers: the filters and actions of this feature are listed in 7.5, and the product, category and order meta keys in 7.6.
4.6 Order status with a linked pickup
Without a linked pickup, nothing changes: the “Task Completed Status” (see 2.6) 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 “Task 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 Onfleet 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 order 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 Onfleet 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 Onfleet
- • The order types are Onfleet’s delivery and pickup tasks: an order of type Pickup is created with pickupTask: true.
- • The linked pickup is a second task with pickupTask: true, the same destination and recipient, on the pickup date in the shop’s time zone. With “No time window” it can be completed the whole day (00:00–23:59); with “Same time window as the delivery” it gets the delivery window on the pickup date.
- • The tasks have no dependency on each other, so Onfleet can give the pickup to any driver. The default team is used when one is set.
- • The task metadata fleetconnector_order_id and fleetconnector_trip = pickup link it to the order. After a timeout, the plugin looks the pickup up with POST /tasks/metadata before it sends it again, so no duplicate is created.
- • The “-P” number only appears in the task notes, order notes and logs: Onfleet has no order number field.
- • The existing order action “Create Onfleet delivery task” creates or updates the linked pickup when the delivery task already exists. There is no background queue: a failed pickup is retried on the next update of the order, with that order action or with Retry in the dashboard.
- • Onfleet has no “cancelled” state. A pickup task that is deleted in Onfleet is unlinked and created again on the next update of the order. A completed or failed pickup task can’t be changed in Onfleet and stays as it is.
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 Onfleet 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, Onfleet gets a delivery task on Saturday 10 October, and right after it a pickup task on Tuesday 13 October (1234-P in the notes). Its task notes 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 “Task Completed Status” (if you set one).
Webhooks
Webhooks enable real-time synchronization from Onfleet to WooCommerce. When drivers update task status in Onfleet, your WooCommerce orders automatically update.
5.1 Webhook setup
Step 1: Get Your Webhook URL
- In WordPress admin, go to WooCommerce → FleetConnector
- Scroll to the "Webhook Settings" section
- Copy the webhook URL displayed (it will look like https://yoursite.com/wp-json/fleetconnector/v1/webhook)
Step 2: Configure in Onfleet
- Log in to your Onfleet dashboard
- Go to Settings → API & Webhooks
- Click "Add Webhook"
- Paste your webhook URL in the URL field
- Select which events you want to receive (see section 5.2)
- Click "Create Webhook"
- Onfleet will test the connection automatically
Onfleet tests a new webhook URL with a GET request (?check=…) and expects the check value back. The plugin answers this validation request, so the URL passes Onfleet’s test.
Step 3: Add the webhook secret (recommended)
- In your Onfleet dashboard, go to Settings → API & Webhooks and copy the webhook secret
- In WordPress, paste it into Webhook signing secret (recommended) in the “Webhook Settings” section
- Click “Save Changes”
From then on, every webhook must carry a valid X-Onfleet-Signature header (HMAC-SHA512). See “Webhook security” below.
Step 4: Verify Configuration
Test your webhook by:
- Creating a test order in WooCommerce
- Creating an Onfleet task for that order
- Completing the task in Onfleet (or changing its status)
- Checking that the WooCommerce order status updates automatically
- Verifying the event appears in the FleetConnector Dashboard logs
Webhook security
- • Signature check: when a webhook signing secret is saved, a webhook without a valid X-Onfleet-Signature header is rejected.
- • Verified with the Onfleet API: before an order is changed, the plugin fetches the task from the Onfleet API and uses that data. A forged request can’t mark an order as delivered. This check also runs when no secret is set.
- • No duplicate notes: when Onfleet sends the same event more than once, no duplicate order note is added.
5.2 Supported webhook events
FleetConnector supports 7 Onfleet webhook events. Each event triggers specific actions in WooCommerce:
1 Task Completed
When triggered: Driver marks a delivery task as completed in Onfleet.
What happens:
- WooCommerce order status updates to your configured "Completed" status
- Completion time and driver information are saved to order meta
- Event is logged in FleetConnector Dashboard
2 Task Failed
When triggered: Driver marks a delivery as failed or task is cancelled in Onfleet.
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 Task Started
When triggered: Driver starts working on a delivery (en route or at location).
What happens:
- Order note is added with start time
- Task status is updated to "Active"
- Event is logged in FleetConnector Dashboard
4 Task Assigned
When triggered: A task is assigned to a driver in Onfleet.
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 Task Unassigned
When triggered: A task is removed from a driver's route in Onfleet.
What happens:
- Driver information is removed from order meta
- Order note is added indicating unassignment
- Event is logged in FleetConnector Dashboard
6 Task Deleted
When triggered: A task is permanently deleted from Onfleet.
What happens:
- Task ID is removed from order meta
- Order note is added indicating deletion
- Event is logged in FleetConnector Dashboard
7 Task Updated
When triggered: Any task details are modified in Onfleet.
What happens:
- Task metadata is refreshed in WooCommerce
- Event is logged in FleetConnector Dashboard
5.3 Example order status flow
Here's a typical order lifecycle showing how webhooks update WooCommerce:
Order Created
WooCommerce: Processing → Onfleet task created automatically
Task Assigned (Webhook)
Driver info saved → Order note added: "Assigned to John Smith"
Task Started (Webhook)
Order note added: "Delivery started at 2:30 PM"
Task Completed (Webhook)
WooCommerce: Processing → Completed → Customer receives completion email
Dashboard
The FleetConnector Dashboard provides complete visibility into all WooCommerce to Onfleet synchronization activity.
6.1 Accessing the dashboard
Access the dashboard by navigating to:
The dashboard is also accessible from the WordPress admin sidebar under "FleetConnector".
6.2 Statistics overview
At the top of the dashboard, you'll see four key statistics cards:
Total Synced Tasks
1,234
Total number of tasks successfully created in Onfleet
Failed Tasks
23
Tasks that failed to sync due to errors
Webhooks Received
5,678
Total webhook events received from Onfleet
Last 24 Hours
89
Tasks synced in the last 24 hours
6.3 Activity log
The activity log shows a detailed record of all synchronization events between WooCommerce and Onfleet.
Log Columns
- Date/Time: When the event occurred
- Order ID: WooCommerce order number (clickable link to order)
- Action: What happened (Task Created, Task Updated, Webhook Received, etc.)
- Status: Success or Error indicator
- Message: Detailed information about the event
- Details: View full technical details and API responses
Filtering and Search
Use the filters at the top of the log to find specific events:
Search by Order ID
Enter an order number to see all events for that order
Filter by Status
Show only successful events or only errors
Filter by Date Range
View events from a specific time period
Filter by Action Type
Show only specific actions (e.g., webhooks, task creation)
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
- Open in Excel, Google Sheets, or any spreadsheet application
CSV includes:
- • Timestamp of each event
- • Order ID and customer information
- • Action type and status
- • Detailed message and error information
- • Onfleet task ID (if applicable)
6.5 Retry failed tasks
If tasks fail to sync due to temporary issues (API downtime, network errors, etc.), you can retry them directly from the dashboard.
How to Retry
- Filter the log to show only "Error" status events
- Find the failed task you want to retry
- Click "View Details" to see the error message
- If the issue is resolved (e.g., API is back online), click "Retry"
- The system will attempt to create the task again
6.6 Viewing log details
Click "View Details" on any log entry to see complete technical information.
Details Include
- Full Error Message: Complete error text from Onfleet API
- Request Payload: Exact data sent to Onfleet
- Response Data: Complete API response from Onfleet
- Order Information: Customer name, address, phone number
- Task Configuration: Team, delivery window, notes sent
- Webhook Data: Raw webhook payload (for webhook events)
Technical Details
Understanding how FleetConnector works behind the scenes helps you troubleshoot issues and customize the integration.
7.1 How the integration works
FleetConnector bridges WooCommerce and Onfleet using a combination of WordPress hooks and Onfleet API calls.
WooCommerce → Onfleet Flow
Order reaches a trigger status (e.g., Processing)
FleetConnector hooks into woocommerce_order_status_changed
Order data is validated (for example, the order needs an address)
Delivery date is detected from configured plugin or custom field
Task data is formatted according to Onfleet API requirements
API request is sent to POST /api/v2/tasks
Task ID is saved to order meta _onfleet_task_id
Event is logged in FleetConnector database table
Onfleet → WooCommerce Flow (Webhooks)
Event occurs in Onfleet (task completed, assigned, etc.)
Onfleet sends POST request to webhook URL
FleetConnector REST endpoint receives the webhook and checks the signature (when a webhook signing secret is set)
Task ID is extracted from webhook payload
Matching WooCommerce order is found via task ID meta, and the task is fetched from the Onfleet API to verify the event
Order status is updated based on your configuration
Driver info and task metadata are saved to order
Webhook event is logged in dashboard
7.2 Data sent to Onfleet
When creating a task, FleetConnector sends the following data to Onfleet:
Recipient Information
- Name: Shipping name from the order (billing name when there is no shipping name)
- Phone: Shipping phone, or billing phone when there is no shipping phone (automatically formatted, see 7.3)
- Notes: Customer order notes, if provided
Order without a phone number: Onfleet requires a phone number for a recipient, so the task is created without a recipient and the recipient’s name is put in the task notes. No placeholder phone number is sent.
Destination
- Address: 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).
- Unparsed: Sent as unparsed address for Onfleet's geocoding
- Notes: Apartment number or delivery instructions
Task Details
- Complete After: Start of delivery window (from settings or delivery date plugin)
- Complete Before: End of delivery window (from settings or delivery date plugin)
- Notes: Order items, quantities, and totals formatted as list
- Metadata: Order ID, order number, order total
- Auto Assign: Team ID from settings (if configured)
Example Order Items Format
Order #1234 - €49.99 Items: • Product Name x 2 - €29.99 • Another Product x 1 - €19.99 Customer Note: Please ring doorbell twice
fc_task_data_before_create and fc_task_data_before_update filter hooks.
7.3 Phone number formatting
Onfleet requires phone numbers in international E.164 format. FleetConnector automatically formats phone numbers for you.
Automatic Formatting
Country code from the order
The examples above are for an order in the Netherlands. The country calling code comes from 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).
No phone number: an order without a phone number is sent without one; no placeholder number is used. See 7.2 for how the task is created in that case.
Developers: the fc_phone_country_code filter can change the calling code. It receives the calling code and the order’s country code (see 7.5).
7.4 Delivery date detection
FleetConnector intelligently detects delivery dates from various plugins and falls back to sensible defaults.
Detection Priority
- Selected Delivery Date Plugin: Checks the plugin you configured in settings
- Auto-detect Mode: If "Auto" is selected, checks all supported plugins in order
- Custom Field: If "Custom field" is selected, checks your specified meta key
- Fallback: If no date found, uses tomorrow at your configured time window
How Time Windows Work
FleetConnector combines the detected date with your configured time window:
Example:
- Delivery date plugin says: December 25, 2024
- Your time window: 09:00 - 18:00
- Result sent to Onfleet: Dec 25, 2024 09:00 - Dec 25, 2024 18:00, in your shop’s time zone (Settings → General)
7.5 Developer hooks and filters
Developers can customize FleetConnector behavior using WordPress hooks and filters.
Available Filters
fc_task_data_before_create
Modify task data before creating in Onfleet
add_filter('fc_task_data_before_create', function($task_data, $order) {
// Add custom notes
$task_data['notes'] .= "\nCustom info: " . $order->get_meta('_custom_field');
return $task_data;
}, 10, 2);
fc_delivery_date_meta_keys
Add custom delivery date meta keys to check
add_filter('fc_delivery_date_meta_keys', function($keys) {
// Add your custom delivery date field
$keys[] = '_custom_delivery_date';
return $keys;
});
fc_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('fc_phone_country_code', function($calling_code, $country) {
// Orders without a country: assume the Netherlands
if ($country === '') {
return '31';
}
return $calling_code;
}, 10, 2);
fc_excluded_shipping_methods / fc_order_needs_delivery
Used when “Only create tasks for shipping orders” is on: the shipping methods that are skipped (default: local pickup methods), and a per-order decision
add_filter('fc_excluded_shipping_methods', function($methods) {
$methods[] = 'my_pickup_method';
return $methods;
});
fc_task_additional_info
Add additional information to task notes
add_filter('fc_task_additional_info', function($info, $order) {
// Add custom order information
$info[] = 'Customer type: ' . $order->get_meta('_customer_type');
return $info;
}, 10, 2);
Order types and linked pickups (new in 2.2.0)
Filters for the order type per product or category and the linked pickup (see chapter 4).
| Hook | Arguments | Description |
|---|---|---|
| fc_order_type | $type, $order, $item_types | The order type of the whole order (D or P). $item_types lists name, quantity and type of every order line. |
| fc_item_order_type | $type, $item, $product, $order | The order type of one order line |
| fc_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. |
| fc_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. |
| fc_linked_pickup_order_no | $order_no, $order | The pickup number shown in the task notes, order notes and activity log (default: order number + “-P”). Stored when the pickup is created. |
| fc_linked_pickup_payload | $payload, $order, $info | The Onfleet task data of the pickup (create and update; metadata and team are only sent on create). |
| fc_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('fc_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
fc_task_created
Runs after task is successfully created in Onfleet
add_action('fc_task_created', function($task_id, $order, $result) {
// Send custom notification, log to external system, etc.
error_log('Task created: ' . $task_id . ' for order #' . $order->get_id());
}, 10, 3);
fc_task_updated
Runs after task is successfully updated in Onfleet
add_action('fc_task_updated', function($task_id, $order, $result) {
// Handle task update
error_log('Task updated: ' . $task_id);
}, 10, 3);
fc_task_creation_failed
Runs when task creation fails
add_action('fc_task_creation_failed', function($order, $exception) {
// Send alert, create support ticket, etc.
error_log('Task creation failed for order #' . $order->get_id() . ': ' . $exception->getMessage());
}, 10, 2);
fc_webhook_task_completed
Runs when Onfleet webhook indicates task is completed
add_action('fc_webhook_task_completed', function($order_id, $task_data) {
// Custom processing when delivery is completed
$order = wc_get_order($order_id);
$order->add_order_note('Delivery completed via Onfleet');
}, 10, 2);
fc_webhook_task_failed
Runs when Onfleet webhook indicates task has failed
add_action('fc_webhook_task_failed', function($order_id, $task_data) {
// Handle delivery failure
$order = wc_get_order($order_id);
$order->add_order_note('Delivery failed - requires attention');
}, 10, 2);
fc_pickup_* (new in 2.2.0)
Actions for the linked pickup. Deliveries keep firing the existing actions.
| Hook | Arguments | Description |
|---|---|---|
| fc_pickup_created | $task_id, $order, $response | The linked pickup was created |
| fc_pickup_updated | $task_id, $order, $response | The linked pickup was updated |
| fc_pickup_deleted | $task_id, $order | The linked pickup was removed |
| fc_pickup_create_failed fc_pickup_update_failed fc_pickup_delete_failed |
$order, $error | A request for the linked pickup failed ($error is a WP_Error) |
| fc_pickup_status_started fc_pickup_status_assigned fc_pickup_status_unassigned fc_pickup_status_updated fc_pickup_status_completed fc_pickup_status_failed fc_pickup_status_deleted |
$order, $data | A verified Onfleet webhook was processed for the linked pickup task (deleted: the task was deleted in Onfleet) |
7.6 Database structure
FleetConnector creates a custom database table to store synchronization logs.
Table: wp_fleetconnector_logs
| Column | Type | Description |
|---|---|---|
| id | BIGINT | Primary key |
| order_id | BIGINT | WooCommerce order ID |
| action | VARCHAR(50) | Action type (task_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 (order types and linked pickups)
The delivery task keeps its existing keys (such as _onfleet_task_id). Order types and linked pickups add:
_onfleet_type_info: How the order type was chosen (type, source, mixed products), shown in the order box_onfleet_pickup_task_id: Onfleet task ID of the linked pickup_onfleet_pickup_short_id: Short ID of the pickup task_onfleet_pickup_order_no: Pickup number shown in notes and logs (…-P)_onfleet_pickup_date: Pickup date sent to Onfleet (YYYY-MM-DD)_onfleet_pickup_info: How the pickup date was worked out (shown as “Why this pickup date”)_onfleet_pickup_warning: Fingerprint of the last pickup date warning, so the same problem is logged only once_onfleet_pickup_last_error: Most recent error of the linked pickup_onfleet_pickup_{field}: Details of the pickup task: tracking_url, task_created, task_updated, payload_hash, create_pending, task_started, task_assigned, driver_name, driver_id, worker_name, task_completed, task_failed, failure_reason, 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.
_fc_order_type: Order type (D or P); not set = category or plugin setting_fc_linked_pickup: Linked pickup: yes or no (products); yes (categories). Not set = category setting_fc_pickup_days: Pickup after (days)_fc_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 Onfleet integration.
8.1 Common issues
Tasks Not Creating Automatically
Symptoms: Orders reach trigger status but no Onfleet task is created
Solutions:
- Verify "Automatically create Onfleet tasks" is checked in settings
- Check that the order status matches your configured trigger statuses
- Ensure your Onfleet 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 Onfleet box of the order (orders with a failed send show a red ! in the Onfleet column)
- Verify the order has a valid address
- If “Only create tasks for shipping orders” is on, local pickup orders are skipped on purpose
Invalid Phone Number Error
Symptoms: Task creation fails with "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.3)
- 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
fc_phone_country_codefilter to change the calling code
An order without a phone number doesn’t cause this error: the task is created without a recipient (see 7.2).
Webhooks Not Updating Orders
Symptoms: Task status changes in Onfleet but WooCommerce order doesn't update
Solutions:
- Verify your site uses HTTPS (required for webhooks)
- Check webhook is configured correctly in Onfleet dashboard
- Test webhook URL is reachable from external services
- Check FleetConnector Dashboard for incoming webhook logs
- Verify permalink settings in WordPress (Settings → Permalinks → Save)
- Check for server firewall blocking incoming POST requests
- If you saved a webhook signing secret, check it matches the secret in Onfleet (Settings → API & Webhooks); webhooks with a wrong signature are rejected
Wrong Delivery Date
Symptoms: Tasks created with incorrect or tomorrow's date instead of selected date
Solutions:
- Verify correct delivery date plugin is selected in settings
- Try "Auto-detect" mode to automatically find delivery dates
- If using custom field, verify the meta key is correct
- Check delivery date plugin is saving data correctly to order meta
- View log details in dashboard to see what date was detected
Address Geocoding Failures
Symptoms: Task creation fails with "Could not geocode address" error
Solutions:
- Check shipping address is complete (street, city, postal code, country)
- Verify address format is valid and recognized by Google Maps
- Avoid using P.O. boxes (Onfleet requires physical delivery addresses)
- Test the address manually in Google Maps
- Check for typos or special characters in address fields
Duplicate Tasks Created
Symptoms: Same order creates multiple tasks in Onfleet
Solutions:
- FleetConnector prevents duplicates automatically. Check if multiple trigger statuses overlap
- Verify you're not manually creating tasks AND using auto-create for same orders
- Check for third-party plugins that might be changing order status multiple times
- Review FleetConnector Dashboard logs to see when tasks were created
Onfleet Doesn’t Validate the Webhook URL
Symptoms: Onfleet reports that the webhook URL could not be validated, or has disabled the webhook
Solutions:
- Update the plugin to version 2.2.0 or later: it answers Onfleet’s validation request (?check=…)
- If Onfleet disabled the webhook, delete it in Onfleet (Settings → API & Webhooks) and create it again with the webhook URL from the plugin settings
Delivery Times Shifted After Updating
Symptoms: After updating to 2.2.0, tasks get a different delivery window than before
Solutions:
- Since 2.2.0, “Complete after” and “Complete before” are in your shop’s time zone (Settings → General). Earlier versions read them as UTC.
- If you had shifted these times to compensate for the UTC reading, set them back to the times you actually want (see 2.4)
- Check the time zone under Settings → General is correct
8.2 Debug mode
Coming SoonAdvanced debug mode with detailed logging is currently in development and will be available in a future update.
Planned Features
- • Detailed API request and response logging
- • Webhook payload inspection
- • Full order data logging before sending to Onfleet
- • Phone number formatting process tracking
- • Delivery date detection step logging
- • Diagnostic information in dashboard
8.3 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 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 license includes priority email support and updates for one year. We're committed to helping you succeed with the WooCommerce to Onfleet integration.
8.4 Additional resources
Onfleet API Documentation
docs.onfleet.com: Official Onfleet API reference
WooCommerce Documentation
woocommerce.com/documentation: WooCommerce guides and tutorials
FleetConnector Changelog
View version history: Track all updates and improvements