Skip to main content
WooCommerce Spoke WooCommerce to Spoke

FleetConnector Spoke Documentation

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

Ready to automate your WooCommerce deliveries with Spoke?

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

1

Installation

1.1 System requirements

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

  • WordPress 5.8 or higher: The FleetConnector Spoke plugin requires modern WordPress features
  • WooCommerce 5.0 or higher: Must be installed and activated before FleetConnector Spoke
  • PHP 7.4 or higher: Required for modern PHP features
  • An active Spoke (Circuit) account with API access: Get your API key in Spoke Dispatch → Settings → Integrations → API
  • HTTPS enabled (recommended): Required for Spoke webhooks to work properly

1.2 Installation steps

1

Purchase and Download

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

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

Upload to WordPress

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

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

Activate Plugin

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

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

Activate License

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

WooCommerce → FleetConnector Spoke → License → Enter key → Activate License

Use the license key of the Spoke 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.

2

Configuration

Configure the WooCommerce to Spoke connection and customize how orders are synchronized to delivery stops.

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 Spoke

Step 1: Get Your Spoke API Key

  1. Log in to Spoke Dispatch and open the settings (dispatch.spoke.com/settings)
  2. Navigate to Integrations → API
  3. Click "Generate API Key" or copy your existing key
  4. Copy the generated API key

The plugin connects to the Spoke API at api.spoke.com (the documented host for API v0.2b). Developers can change the base URL with the fcs_api_base_url filter.

Step 2: Configure in WooCommerce

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

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 Plans and Stops

Spoke organizes deliveries differently than other platforms. Understanding this structure is key to using FleetConnector Spoke effectively.

How Spoke Works

  • Plans: Daily containers for organizing deliveries (like a delivery schedule for a specific day)
  • Stops: Individual delivery points within a plan (your WooCommerce orders become stops)

Automatic Plan Management

FleetConnector Spoke automatically manages plans for you:

  • • When an order is created, the plugin checks the delivery date
  • • The plan for that date is looked up by its date in Spoke (all pages of your plans), so no duplicate plans are created
  • • If a plan exists for that date, the stop is added to it
  • • If no plan exists, a new daily plan is automatically created
  • • When two orders for the same date are sent at the same time, only one plan is created
  • • Plan IDs are cached to minimize API calls
Benefit: You don't need to manually create plans. FleetConnector handles all plan management automatically based on delivery dates.

2.3 Automatic stop creation

Enable Auto-Create

Check the "Automatically create Spoke stops" checkbox to enable automatic stop creation when WooCommerce orders reach specific statuses.

Default: Enabled

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

Select Trigger Statuses

Choose which WooCommerce order statuses should trigger Spoke stop creation:

✓ Processing (Recommended)

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

✓ Completed (Recommended)

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

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

2.4 Synchronization settings

Auto-Sync Updates

When enabled, any changes to a WooCommerce order automatically update the corresponding Spoke stop.

What gets synchronized:

  • • Customer name and contact details
  • • Order items and quantities
  • • Customer notes
  • • The time slot (time window of the stop)

New delivery date or address

Spoke can’t move a stop to another day or change its address. When the delivery date or the address of an order changes, the plugin deletes the old stop and creates a new one in the plan of the right day (from version 1.2.0), as long as the stop wasn’t dispatched to a driver yet. After that, the order gets a note to change the stop in Spoke.

Only changes are sent

An order update is only sent to Spoke when something relevant for the stop 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 stop in Spoke.

Warning: This action cannot be undone. The stop will be permanently deleted from Spoke.

2.5 Time window

From version 1.2.0 the plugin sends a time window with each stop, so Spoke plans the delivery within that window. The setting “Time window of the stop” decides where it comes from:

  • • The time slot the customer chose; without one, any time that day (default). The slot is read from Order Delivery Date, Iconic Delivery Slots, YITH Delivery Date or a delivery_time field, for example “09:00 - 12:00” or “9 AM to 12 PM”.
  • • The time slot the customer chose; without one, the default window. Orders without a slot get the default window below.
  • • No time window. Stops can be delivered any time that day.

Default window start

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

Default window end

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

Order weight

“Send the order weight to Spoke” adds the total product weight to the stop. Only turn it on when vehicle capacities are enabled in your Spoke team: otherwise Spoke refuses the weight, and the plugin sends the stop without it and adds a note to the order.

2.6 Delivery date plugin integration

FleetConnector Spoke can automatically detect delivery dates from popular WooCommerce plugins and use them to organize stops into the correct daily plans.

Supported Delivery Date Plugins

Auto-detect (Recommended)

Automatically detects delivery dates from all supported plugins

Order Delivery Date for WooCommerce

Popular delivery date picker plugin

Iconic WooCommerce Delivery Slots

Advanced delivery slot management

Custom Field

Use your own custom delivery date field

How it works: The delivery date determines which daily plan the stop is added to. Orders with the same delivery date are grouped into the same plan for efficient route optimization.

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

PluginField (meta key)How the date is storedHow the plugin reads it
Order Delivery Date (Tyche) Lite_orddd_lite_timestampUnix timestamp of the chosen date at midnight UTCRead in UTC, so shops west of UTC don’t get the day before
Order Delivery Date, display fieldThe 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 Slotsjckwds_date, _jckwds_dateDisplay text in Iconic’s date formatNumeric dates like 10/03/2026 follow the Date order setting
Plugins using a delivery_date fielddelivery_date, _delivery_dateUsually YYYY-MM-DDUnambiguous when it is YYYY-MM-DD
Any other pluginYour custom fieldDepends on the pluginDates 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 Spoke delivery is created for tomorrow. You can see why:

  • • The Spoke Delivery Stop 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 Spoke 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 the Spoke plan for a stop with this order’s ID. 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 Spoke dashboard:

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

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

Webhook signing secret (recommended)

Optional. Paste the webhook secret from Spoke Dispatch (settings → API). Every incoming webhook is then checked against the spoke-signature header (HMAC-SHA256); a webhook with a missing or wrong signature is rejected.

With or without a secret, every stop event is verified with the Spoke 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 Spoke stops change status:

Stop Completed Status

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

Common choice: Completed

Stop Failed Status

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

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 “Stop Completed Status” is set after the delivery or only after the last trip (the default). A failed pickup sets the “Stop Failed Status” right away. See 4.6.

Save Driver Information

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

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

2.8 Display settings

Customize how FleetConnector Spoke displays information in your WooCommerce admin.

Show Spoke Status Column

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

Default: Enabled

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

Only Create Stops for Shipping Orders

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

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

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 fcs_excluded_shipping_methods filter, and decide per order with the fcs_order_needs_delivery filter.

3

Features

FleetConnector Spoke provides multiple ways to create and manage Spoke stops from your WooCommerce orders.

3.1 Manual stop creation

Even with automatic stop creation enabled, you can manually create Spoke stops for individual orders.

From Order Actions Dropdown

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

From Order Edit Screen

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

3.2 Bulk stop creation

Create Spoke stops for multiple orders at once using WooCommerce bulk actions.

How to Use Bulk Actions

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

What happens during bulk creation:

  • • FleetConnector Spoke processes each order individually
  • • Orders that already have stops are skipped
  • • Invalid orders (missing address, etc.) are skipped with a warning
  • • Stops are automatically organized into daily plans by delivery date
  • • All actions are logged in the FleetConnector Dashboard

3.3 Spoke delivery information meta box

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

Information Displayed

  • Stop ID: Unique Spoke stop identifier
  • Plan ID: The daily plan this stop belongs to
  • Status: Current stop status (Pending, Allocated, Out for Delivery, Completed, Failed)
  • Assigned Driver: Name of the driver assigned to this delivery (if assigned)
  • Created: Date and time the stop was created
  • Last error: Shown in red when the last attempt to send the order to Spoke failed, with the reason

Available Actions

Create Spoke Stop

Available if no stop exists yet

Sync to Spoke

Manually push order updates to Spoke

3.4 Spoke status column

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

Status Indicators

✔
Green checkmark

Order has been sent to Spoke

—
Gray dash

Order has not been sent to Spoke

!
Red exclamation mark

The last attempt to send the order failed. The reason is in the order notes and under “Last error” in the Spoke box of the order.

P
Small “P” badge

The order has a linked pickup (see chapter 4). Colour: purple = open, green = collected, red = failed or not sent, grey = deleted in Spoke. Hover for the pickup date and status.

4

Order types & linked pickups

Give products a Spoke order type (the stop’s activity: delivery or pickup) and let the plugin create a linked pickup: a second Spoke stop 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 pickup) of the Spoke stop, and the linked pickup: a second Spoke stop that collects the products again.

On a product

Edit the product and open the Spoke tab in the “Product data” box. It has these fields:

FieldOptionsWhat it does
Order type“Category or plugin setting (now: …)”, Delivery, PickupThe Spoke 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_dateAn 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:

  • • Spoke 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

A Spoke stop 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 stop notes, so the driver knows what to do:

Mixed order - Delivery: Party tent 3x6 m x1 | Pickup: Old garden set x1

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.

The type is the stop’s activity (delivery or pickup). When the type changes after the stop was sent, the plugin asks Spoke to change the activity. If Spoke refuses, the stop keeps its activity, and the order gets a note and the activity log a warning (“Stop activity not changed”). Delete the stop in Spoke and send the order again if needed.

4.3 The linked pickup

When at least one product of the order has a linked pickup, the plugin creates a second Spoke stop with activity “pickup”, in the plan of the pickup date. It uses the same address and contact details as the delivery and gets its own recipient external ID: the delivery’s external ID (the WooCommerce order ID) + “-P”, for example 1234-P.

Its stop notes start with a line that tells the driver what to collect, followed by the usual order details:

PICKUP - collect the products of delivery 1234 (October 10, 2026): Party tent 3x6 m

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 Spoke.
  • • 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, failed or deleted in Spoke.

The background queue retries the delivery stop. A pickup that could not be sent is tried again on the next update of the order or with the order action “Update Spoke description”.

4.4 How the pickup date is worked out

The pickup date is the date of the delivery that was sent to Spoke 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 fcs_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.
Tip: The order box shows why the pickup got its date, for example “Pickup 3 days after the delivery.” or “Pickup date from the order (field _rental_end_date).” Developers can set the date themselves with the fcs_linked_pickup_date filter.

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:

SettingOption nameOptionsDefaultDescription
Default order typefcs_order_typeDelivery, PickupDeliveryUsed for products without an order type of their own and without a category type.
Pickup after (days)fcs_pickup_default_daysNumber7Days 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 asfcs_pickup_day_countCalendar days, Business days (Mon–Fri)Calendar daysBusiness days are Monday to Friday, unless the fcs_business_days filter changes them.
Time window of the pickupfcs_pickup_time_windowNo time window (any time that day), Same time window as the deliveryNo time windowWith “Same time window as the delivery”, the pickup gets the delivery’s time window (see 2.5).
Order status on orders with a linked pickupfcs_trip_status_ruleSet the “completed” status after the last trip (delivery and pickup), Set the “completed” status after the deliveryAfter the last tripSee 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 “Stop 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 “Stop Failed Status” right away, with both rules.
  • • A pickup stop that the dispatcher deletes in Spoke counts as cancelled and no longer holds the status back: the status is set then.

4.7 What you see in WooCommerce

The Spoke 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 recipient external ID, 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 Spoke status icon: purple = open, green = collected, red = failed or not sent, grey = deleted in Spoke (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 Spoke

  • • The order types are the stop’s activity: Delivery (delivery) and Pickup (pickup).
  • • The pickup stop is added to the Spoke plan of the pickup date, with recipient external ID <order ID>-P. After a timeout, the plugin looks it up with filter[externalId] in that plan before it sends it again, so no duplicate is created.
  • • A stop can’t move to another plan, and its address can’t be changed. When the pickup date or the address changes, a pickup stop that is not dispatched, started or attempted yet is deleted and created again in the right plan (with an order note). A stop that is already dispatched stays as it is, and a warning is logged once (“Linked pickup not moved (already dispatched)”); change it in Spoke if needed.
  • • The data of the pickup stop starts from the delivery stop and the fcs_stop_data_before_create filter, which gets “pickup” as a third argument for the pickup stop. The plugin sends no time window itself.
  • • A pickup stop that the dispatcher deletes in Spoke counts as cancelled: it no longer holds back the completed status, and it is not created again automatically. Use the order action “Update Spoke description” to send it again.
  • • A pickup that the plugin removes because no product in the order needs it anymore (from version 1.1.1) also no longer holds back the completed status: when the delivery was already completed, the status is set then.
  • • A failed pickup is not retried by the background queue: it is retried on the next update of the order or with the order action “Update Spoke description”.

4.9 Example: a rental

A rental that is delivered on the 10th and collected three days later:

  1. You rent out party tents. On the product “Party tent 3x6 m”, open the Spoke 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.
  2. A customer orders the tent and a box of paper plates (a normal product without a pickup) for delivery on Saturday 10 October 2026.
  3. When the order is sent, Spoke gets a delivery stop in the plan of Saturday 10 October, and right after it a pickup stop 1234-P in the plan of Tuesday 13 October. Its stop notes start with “PICKUP - collect the products of delivery 1234 (October 10, 2026): Party tent 3x6 m”.
  4. With “Count pickup days as: Business days” the pickup would be on Wednesday 14 October instead (Monday, Tuesday, Wednesday).
  5. 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.
  6. 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 “Stop Completed Status” (if you set one).
5

Webhooks

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

5.1 Webhook setup

Step 1: Get Your Webhook URL

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

Step 2: Configure in Spoke

  1. Log in to Spoke Dispatch and open the settings
  2. Go to the API section, where webhooks are configured
  3. Add a webhook and paste your webhook URL in the URL field
  4. Select which events you want to receive (see section 5.2)
  5. Save the webhook
Success: Once configured, the webhook will start sending notifications for stop status changes.

Step 3: Add the webhook secret (recommended)

  1. In Spoke Dispatch settings → API, copy the webhook secret
  2. In WordPress, paste it into Webhook signing secret (recommended) in the “Webhook Settings” section
  3. Click “Save Changes”

From then on, every webhook must carry a valid spoke-signature header (HMAC-SHA256).

Webhook security

  • • Signature check: when a webhook signing secret is saved, a webhook without a valid spoke-signature header is rejected.
  • • Verified with the Spoke API: for every stop event, the plugin fetches the stop from the Spoke API with your API key before the order is changed. A forged request can’t mark an order as delivered. This check also runs when no secret is set.

5.2 Supported webhook events

FleetConnector Spoke supports the following Spoke webhook events: stop.allocated, stop.out_for_delivery and stop.attempted_delivery, plus Spoke’s “Test” event. For stop.attempted_delivery, the delivery result comes from the stop’s deliveryInfo in the Spoke API: succeeded, or failed with a reason such as “not home”.

1 stop.attempted_delivery (Success)

When triggered: Driver marks a delivery as successfully completed in Spoke.

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 stop.attempted_delivery (Failed)

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

What happens:

  • WooCommerce order status updates to your configured "Failed" status (if set)
  • Failure reason from Spoke (for example “Not home”) is saved to order notes
  • Event is logged in FleetConnector Dashboard

3 stop.out_for_delivery

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

What happens:

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

4 stop.allocated

When triggered: A stop is assigned to a driver in Spoke.

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 Test event

When triggered: You click “Test” for the webhook in Spoke.

What happens:

  • The plugin confirms the event was received; no order is changed
Recommendation: Enable all webhook events in Spoke for complete synchronization.
6

Dashboard

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

6.1 Accessing the dashboard

Access the dashboard by navigating to:

WordPress Admin → WooCommerce → FleetConnector Spoke → Dashboard

6.2 Statistics overview

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

Total Synced Stops

Total number of stops successfully created in Spoke

Failed Stops

Stops that failed to sync due to errors

Webhooks Received

Total webhook events received from Spoke

Last 24 Hours

Stops synced in the last 24 hours

6.3 Activity log

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

Log Columns

  • Date/Time: When the event occurred
  • Order ID: WooCommerce order number (clickable link to order)
  • Action: What happened (Stop Created, Stop 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

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

6.5 Retry failed stops

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

How to Retry

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

Technical Details

Understanding how FleetConnector Spoke works behind the scenes.

7.1 How the integration works

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

WooCommerce → Spoke Flow

1

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

2

FleetConnector hooks into woocommerce_order_status_changed

3

Delivery date is detected and a daily plan is found or created

4

Stop data is formatted for Spoke API

5

API request is sent to POST /plans/{plan_id}/stops

6

Stop ID and Plan ID are saved to order meta

7.2 Data sent to Spoke

When creating a stop, FleetConnector Spoke sends the following data:

Stop Data Structure

{
    "address": {
        "addressName": "Jan Jansen",
        "addressLineOne": "Keizersgracht 123",
        "city": "Amsterdam",
        "zip": "1015 CJ",
        "country": "Netherlands"
    },
    "recipient": {
        "name": "Jan Jansen",
        "phone": "+31612345678",
        "email": "jan@example.com",
        "externalId": "123"
    },
    "notes": "Order Number: 123 …",
    "activity": "delivery",
    "packageCount": 2,
    "orderInfo": {
        "sellerOrderId": "123",
        "products": ["2 x Flowers"]
    },
    "timing": {
        "earliestAttemptTime": { "hour": 9, "minute": 0 },
        "latestAttemptTime": { "hour": 12, "minute": 0 }
    }
}

Address

  • • Stops are sent with a structured address (addressLineOne, addressLineTwo, city, state, zip, country, addressName). Spoke’s API doesn’t accept a single “unparsed” address line.
  • • The shipping address is used, or the billing address when the order has no shipping address. The country is always sent as the country name; empty fields are left out.

Limits

  • • Notes are limited to 2000 characters (Spoke’s limit). Longer notes are cut off.
  • • packageCount is the number of items in the order, and at least 1.
  • • timing is only sent when the order has a time window (see 2.5). weight is only sent when that setting is on.
  • • For a business order the recipient name is “Company (First Last)”.

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 Spoke behavior using WordPress hooks and filters.

Available Filters

fcs_stop_data_before_create

Modify stop data before creating in Spoke. Since 1.1.0 it also runs for the linked pickup stop, with a third argument $trip that is pickup (accept it with function($stop_data, $order, $trip = 'main') and priority arguments 10, 3).

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

fcs_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('fcs_phone_country_code', function($calling_code, $country) {
    // Orders without a country: assume the Netherlands
    if ($country === '') {
        return '31';
    }
    return $calling_code;
}, 10, 2);

fcs_api_base_url

Change the Spoke API base URL (default: https://api.spoke.com/public/v0.2b)

fcs_excluded_shipping_methods / fcs_order_needs_delivery

The shipping methods that are skipped when “Only create stops 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).

HookArgumentsDescription
fcs_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.
fcs_item_order_type $type, $item, $product, $order The order type of one order line
fcs_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.
fcs_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.
fcs_linked_pickup_order_no $order_no, $order The recipient external ID of the pickup stop (default: order ID + “-P”). Stored when the pickup is created.
fcs_linked_pickup_payload $payload, $order, $info The Spoke stop data of the pickup (create and update).
fcs_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('fcs_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

fcs_stop_created

Runs after stop is successfully created in Spoke

add_action('fcs_stop_created', function($stop_id, $order, $result) {
    error_log('Stop created: ' . $stop_id . ' for order #' . $order->get_id());
}, 10, 3);

fcs_webhook_stop_completed

Runs when Spoke webhook indicates stop is completed

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

fcs_pickup_* (new in 1.1.0)

Actions for the linked pickup. Deliveries keep firing the existing actions.

HookArgumentsDescription
fcs_pickup_created $stop_id, $order, $response The linked pickup was created
fcs_pickup_updated $stop_id, $order, $response The linked pickup was updated
fcs_pickup_deleted $stop_id, $order The linked pickup was removed
fcs_pickup_create_failed
fcs_pickup_update_failed
fcs_pickup_delete_failed
$order, $error A request for the linked pickup failed ($error is a WP_Error)
fcs_pickup_status_started
fcs_pickup_status_assigned
fcs_pickup_status_unassigned
fcs_pickup_status_updated
fcs_pickup_status_completed
fcs_pickup_status_failed
fcs_pickup_status_cancelled
$order, $data A verified Spoke webhook was processed for the pickup stop (cancelled: the stop was deleted in Spoke)

7.4 Database structure

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

Table: wp_fcs_stop_logs

Column Type Description
id BIGINT Primary key
order_id BIGINT WooCommerce order ID
action VARCHAR(50) Action type (stop_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

  • _spoke_stop_id: Unique Spoke stop identifier
  • _spoke_plan_id: Daily plan the stop belongs to
  • _spoke_stop_created: Timestamp when stop was created
  • _spoke_driver_name: Assigned driver name
  • _spoke_driver_id: Assigned driver ID
  • _spoke_type_info: How the order type (stop activity) was chosen, shown in the order box
  • _spoke_pickup_stop_id: Spoke stop ID of the linked pickup
  • _spoke_pickup_plan_id: Plan of the pickup date that holds the pickup stop
  • _spoke_pickup_external_id: Recipient external ID of the pickup stop (…-P)
  • _spoke_pickup_date: Pickup date sent to Spoke (YYYY-MM-DD)
  • _spoke_pickup_info: How the pickup date was worked out (shown as “Why this pickup date”)
  • _spoke_pickup_warning: Fingerprint of the last pickup date warning, so the same problem is logged only once
  • _spoke_pickup_{field}: Details of the pickup stop: created, updated, last_error, payload_hash, address_hash, create_pending, pending_date, move_warning, started, assigned, driver_name, completed, failed, failure_reason, cancelled, 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.

  • _fcs_order_type: Order type (D or P); not set = category or plugin setting
  • _fcs_linked_pickup: Linked pickup: yes or no (products); yes (categories). Not set = category setting
  • _fcs_pickup_days: Pickup after (days)
  • _fcs_pickup_date_field: Pickup date field: the order meta key with the pickup date
8

Troubleshooting

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

8.1 Common issues

Stops Not Creating Automatically

Solutions:

  • Verify "Automatically create Spoke stops" is checked in settings
  • Check that the order status matches your configured trigger statuses
  • Ensure your Spoke 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 Spoke box of the order (orders with a failed send show a red ! in the Spoke column)
  • Verify the order has a valid address
  • If “Only create stops 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 fcs_phone_country_code filter 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 Spoke dashboard
  • Test webhook URL is reachable from external services
  • Check FleetConnector Dashboard for incoming webhook logs
  • Verify permalink settings in WordPress (Settings → Permalinks → Save)
  • If you saved a webhook signing secret, check it matches the secret in Spoke Dispatch (settings → API); webhooks with a wrong signature are rejected

Address Geocoding Failures

Solutions:

  • Check shipping address is complete (street, city, postal code, country)
  • Verify address format is valid
  • Avoid using P.O. boxes (Spoke 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 Spoke 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 Spoke license includes priority email support and updates for one year.

8.3 Additional resources

Spoke API Documentation

developer.dispatch.spoke.com: Official Spoke API reference

WooCommerce Documentation

woocommerce.com/documentation: WooCommerce guides and tutorials

FleetConnector Changelog

View version history: Track all updates and improvements