This tutorial is to help you integrate your WooCommerce E-commerce platform with Detrack using Detrack Connect.
With this integration, all selected orders from your WooCommerce storefront will be sent to Detrack through Detrack Connect for last mile tracking and real-time proof of delivery. You can also choose to set up the integration for delivery completion status to be feedback to your WooCommerce storefront.
Here’s how you can get started with the WooCommerce integration.
First, sign up for a Detrack Connect account.
Steps
Sign up for a Detrack Connect account. If you already have a Detrack Connect account, continue with the next step.
Go to the "Connections" tab and add a connection.
Select "WooCommerce" as the Store/System.
Integration
Fill in the fields below, the red circled fields are mandatory. If you are doing this integration to pass orders to your 3PL's Detrack account, ask your 3PL for the Detrack Group Name assigned to you as well as for the API key that belongs to your group. Refer to How To Generate The Detrack API Key For Detrack Connect.
Next, go to your WooCommerce account to generate
WooCommerce Store URL
Consumer Key
Consumer Secret
In WooCommerce
(Optional).
Requires the "Enable Update Shipment" checkbox to be enabled.To get the Store URL, go to WooCommerce > Status > WordPress Address (URL). The WordPress Address is the Store URL.
To get the Consumer Key, go to WooCommerce > Settings (at the left side of the page).
Click Advance > REST API > Add Key.
A "Key details" page will appear next where you need to enter the Description, then select "Read/Write" for the permissions field followed by the "Generate the API key" button. Note: if the Write permission is not granted, there will be a "422" error displayed in Detrack Connect when updating job information in your WooCommerce system.
Copy the "Consumer Key" and "Consumer Secret".
In Detrack Connect
Paste the copied information into the "Store" section of your Detrack Connect.
Webhook
This webhook is for your storefront to send information to Detrack Connect.
Click "Start by adding a webhook".
Provide a name for your webhook and click "Save".
Next, you will see the generated Webhook URL which is the address for your storefront to send the information over via webhook. Copy the URL and head over to your WooCommerce account.
In WooCommerce
In your WooCommerce, navigate to Settings > Advanced > Webhook > Add Webhook.
Perform the following:
Provide a "Name" for this webhook.
Set the "Status" to "Active" to activate the webhook.
Set the "Topic" to "Order updated" (recommended) or "Order creation". Kindly note that the job will only be created in Detrack if the status is "Processing".
Paste the copied webhook URL from into the "Delivery URL".
Provide a "Secret" to this webhook (for use in Detrack Connect later). This "Secret" serves as a password for secure connection between your WooCommerce and Detrack Connect
In Detrack Connect
Click the "Key Icon".
Complete the connection by inputting the "Secret" from WooCommerce.
Click "Save" when done and the "key" icon will turn green.
You can create a dummy order from your WooCommerce storefront to check the setup. If the setup is done correctly, an entry will be captured under Logs > Incoming Log according to your defined webhook trigger.
The connection setup has been created! Now you can configure the settings to filter the orders to be sent to Detrack, the shipping date and more right here.
Status Mapping
This section is regarding the mapping of the statuses between Detrack and WooCommerce.
Detrack | WooCommerce |
Info received | Processing |
Out for delivery | Processing |
Completed | Delivered |
Partially Completed | Processing |
On hold | On hold |
Failed | Failed |
For more information, refer to WooCommerce and Detrack status.
Order Status Update Exclusion
This section is to prevent Detrack from updating the information in your WooCommerce storefront when it has a certain status.
Scroll down to “Order Update Exclusion” section
Click on the dropdown to open up a list of “statuses”.
Click the status/es that you wish to exclude.
Click “Save” when done.
Field Mapping
Below are the default field mapping between Detrack and WooCommerce. If you happen to be using other plug-ins, you make make use of the Mappings for custom mapping of data.
Kindly note the following 3 required fields in Detrack for job creation:
date
address
do_number
Detrack | WooComerce |
do_number | id |
date | date_modified |
start_date | date_modified |
job_received_date | date_modified |
payment_mode | payment_method_title |
payment_amount | total |
address_1 | address1 |
address_2 | address2 |
city | city |
state | state |
postal_code | postcode |
country | country |
last_name | last_name |
deliver_to_collect_from | first_name |
items
| line_items
|
For more information, refer to WooCommerce Fields and Description and Detrack Job Fields and Description.
Mappings
This section is for use if you wish to retrieve certain field information from plug-ins to override the default field mapping.
Create a dummy order from your storefront to Detrack Connect.
There will be an entry under Logs > Incoming from your storefront.
Click on the “Mappings” tab.
Click the “Start by adding a mapping” button.
A form will appear.
the “Order No” of the incoming log.
the plug-in name.
the Detrack field for mapping the information.
Click “Save” when done.
If necessary, repeat the above to perform more mappings.
For more information, refer to How To Use The Mapping Feature For Customized Data In Detrack Connect.
Plug-in
This section is regarding the mapping of the fields between the various plug-ins and Detrack.
Plug-in Name | Detrack | Fields |
Order Delivery Date for WooCommerce (Lite version) | date | Delivery Date |
Delivery & Pickup Date Time for WooCommerce | date | delivery_date |
job_time | delivery_time |