All Collections
Detrack Dashboard V4 Articles
Detrack - Integration
How To Integrate WooCommerce Using Detrack Connect
How To Integrate WooCommerce Using Detrack Connect
Operator avatar
Written by Operator
Updated over a week ago

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

  1. Sign up for a Detrack Connect account. If you already have a Detrack Connect account, continue with the next step.

  2. Go to the Connections tab and add a connection.

  3. Select WooCommerce as the Store/System.

    Integration

  4. 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.

  5. Next, go to your WooCommerce account to generate

    1. WooCommerce Store URL

    2. Consumer Key

    3. Consumer Secret

      In WooCommerce

  6. (Optional).
    Requires the Enable Update Shipment checkbox to be enabled.

    1. To get the Store URL, go to WooCommerce > Status > WordPress Address (URL). The WordPress Address is the Store URL.

    2. To get the Consumer Key, go to WooCommerce > Settings (at the left side of the page).

    3. Click Advanced > REST API > Add Key.

    4. 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.

    5. Copy the Consumer Key and Consumer Secret.

      In Detrack Connect

    6. Paste the copied information into the Store section of your Detrack Connect.

      Webhook

  7. This webhook is for your storefront to send information to Detrack Connect.

    1. Click Start by adding a webhook.

    2. Provide a name for your webhook and click Save.

    3. 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

    4. In your WooCommerce, navigate to Settings > Advanced > Webhook > Add Webhook.

    5. Perform the following:

      1. Provide a Name for this webhook.

      2. Set the Status to Active to activate the webhook.

      3. 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.

      4. Paste the copied webhook URL from into the Delivery URL.

      5. 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

    6. Click the Key Icon.

    7. Complete the connection by inputting the Secret from WooCommerce.

    8. Click Save when done and the key icon will turn green.

    9. 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.

  1. Scroll down to Order Update Exclusion section

  2. Click on the dropdown to open up a list of statuses.

  3. Click the status/es that you wish to exclude.

  4. Click Save when done.

Default Field Mapping

Kindly note the following 3 required fields in Detrack for job creation:

  1. date

  2. address

  3. do_number

Below are the default field mapping between Detrack and WooCommerce.

If you happen to be using other plugins, you make make use of the Mapping for custom mapping of data.

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

  • sku

  • quantity

  • description

  • line_items

  • sku

  • quantity

  • name

Plugin

This section is regarding the mapping of the fields between the various plugins and Detrack.

Plugin 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

Mappings

This section is for use if you wish to retrieve certain field information from plugins to override the default fields mapping.

Most of the plugins will be adding the information in the note_attributes key in the request payload.

  1. Create a dummy order from your storefront to Detrack Connect.

  2. There will be an entry under Logs > Incoming from your storefront.

  3. Edit the required Connection.

  4. Click on the Mappings tab.

  5. Click the Start by adding a mapping button.

  6. For Plugin

    1. Select the Order No. of the incoming log.

    2. Select the plugin name.

    3. Select the Detrack field for mapping the information.

  7. For All Fields

    1. Select All Fields for Mapping Fields; and a list of fields will appear according to the information sent over from your storefront.

    2. Click on the required field to open a pop-up, e.g. the customer_note is being used to map over to the Instructions field in Detrack.

    3. A pop-up will appear for the selection of the Detrack field for mapping the information.

    4. Click Save when done.

  8. Click Save when done.

  9. If necessary, repeat the above to perform more mappings.

Detrack Field

Description

Date

Date of delivery. The date that the delivery job will be performed by the courier.

Address

The location of the job to perform the delivery.

Address 1

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

Address 2

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

Address 3

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

Postal Code

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

City

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

State

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

Country

The location of the job to perform the delivery. For use when the address is split up. Part of Line Address.

Company Name

Recipient or Sender’s company name.

Deliver To / Collect From

The name of Recipient.

Last Name

The last name of Recipient.

Phone No.

Recipient’s phone number.

Notify Email

Email of recipient.

Sender Phone No.

Sender’s phone number.

Fax No.

Recipient’s fax number.

Address Latitude

The latitude of the address. To be used with Address Longitude.

Address Longitude

The longitude of the address. To be used with Address Latitude.

Job Time

The time of delivery that the driver is supposed to be performed.

Time Window

The time window for performing the job.

Zone

An area having a particular characteristic, purpose, or use, or subject to particular restrictions.

Instructions

Special information for your courier.

Service Type

Service type of the job.

Payment Mode

Mode of payment for the job.

Did this answer your question?