How To Integrate Shopify Using Detrack Connect

[ultimate_heading main_heading=”Introduction” heading_tag=”h3″ main_heading_color=”#e05048″ sub_heading_color=”#e05048″ alignment=”left”][/ultimate_heading]

This tutorial is to help you integrate your Shopify E-commerce platform with Detrack using Detrack Connect.

With this integration, all selected orders from your Shopify storefront will be sent to Detrack for last mile tracking, capturing of real-time proof of delivery and more. You can also choose to set up the integration for the order’s delivery completion status to be feedback to your Shopify storefront.

Here’s how you can get started with the Shopify 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 "Shopify" as the Store/System.
  4. Integration

  5. 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.
  6. Next, go to your Shopify account to generate
    1. Store Name
    2. Shopify store API key
    3. Store Password
    to input into Detrack Connect.
  7. In Shopify

    1. Click on "Apps" from the side navigation bar.
    2. Click on "Manage private apps". Refer to Manage Private App if you need permission to enable it.
    3. Click "Create new private App".
    4. Perform the following:
      1. Provide a "Name" and "Email" to the app.
      2. Select "Read and Write" for "Products" and "Orders" for Detrack Connect to update the order in your Shopify account. There will be a 403 or 422 error if permission is not granted.
      3. Click "Save" done.
      4. In the ensuing pop-up, click "Create app".
    5. At the admin API panel, copy the "API key" and "Password".
    6. Paste into the "Store" section of your Detrack Connect.
  8. Click "Save" when done.
  9. Webhook

  10. 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. This URL is the address for your storefront to send the information over via webhook. Copy the URL and head over to your Shopify account.
    4. In Shopify

    5. In your Shopify account, scroll down to "Settings" at the bottom left corner and click "Notifications".
    6. Scroll down to the "Webhook" section and click "Create Webhook".
    7. Select the event (Shopify recommends using "Order fulfilment") for triggering the webhook PUSH notification and paste the Detrack Connect URL into the "URL" section and click "Save webhook". When the order is marked as fulfilled or partially fulfilled in your Shopify admin and the shipment is in transit, this will trigger the Order fulfilment webhook for job creation in Detrack. You can also use other event triggers like "Order creation", "Order payment" or "Order update".
      If you wish to add more events to trigger the webhook, please repeat Steps v and vi.
    8. At the webhook section, a special webhook signature from Shopify will be generated. Copy this signature from Shopify.
    9. In Detrack Connect

    10. Navigate back to Detrack Connect and click on the "Key" icon.
    11. Paste the copied Shopify "Webhook Signature" into the pop-up.
    12. Click "Save" when done, and the "Key" icon will turn green.
    13. You can check by creating a dummy order from your Shopify storefront, and fulfil it to test. If the setup is done correctly, it will be captured under Logs > Incoming Log.

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.

[ultimate_heading main_heading=”Status Mapping” heading_tag=”h3″ main_heading_color=”#e05048″ sub_heading_color=”#e05048″ alignment=”left”][/ultimate_heading]

This section is regarding the mapping of the statuses between Detrack and Shopify.

Detrack Shopify
Info received On its way
Out for delivery Out for delivery
Completed Delivered
Partially Completed In Transit
Failed Failed
[ultimate_heading main_heading=”Field Mapping” heading_tag=”h3″ main_heading_color=”#e05048″ sub_heading_color=”#e05048″ alignment=”left”][/ultimate_heading]

Below is the default field mapping between Detrack and Shopify. If you happen to be using other plug-ins, you may use the Mappings feature to perform custom mapping of data.

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

  1. date
  2. address
  3. do_number
Detrack Shopify
do_number order_number
date updated_at
start_date updated_at
job_received_date updated_at
address_1 address1
address_2 address2
city city
state province
postal_code zip
country country
last_name last_name
deliver_to_collect_from first_name
notify_email email
total_price total_price
address_lat latitude
address_lng longitude
phone_number phone
tracking_number id
    items

  • sku
  • quantity
  • description
    line_items

  • sku
  • quantity
  • title

Refer to Shopify Fields and Description and Detrack Fields and Description.

[ultimate_heading main_heading=”Mappings” heading_tag=”h3″ main_heading_color=”#e05048″ sub_heading_color=”#e05048″ alignment=”left”][/ultimate_heading]

This section is for use if you wish to retrieve certain field information from plug-ins to override the default field mapping.

Most of the plug-ins will be adding the information in the “note_attributes” key in the request payload.

    Steps

  1. Create a dummy order from your storefront to Detrack Connect.
  2. There will be an entry under Logs > Incoming from your storefront.
  3. Click on the “Mappings” tab.
  4. Click the “Start by adding a mapping” button.
  5. A form will appear.

      Select the following:

    1. the “Order No” of the incoming log.
    2. the plug-in name.
    3. the Detrack field for mapping the information.
  6. Click “Save” when done.
  7. If necessary, repeat the above to perform more mappings.
[ultimate_heading main_heading=”Plug-in” heading_tag=”h3″ main_heading_color=”#e05048″ sub_heading_color=”#e05048″ alignment=”left”][/ultimate_heading]

This section is regarding the mapping of the fields between Detrack and Shopify plug-ins.

Plug-in Name Detrack Field
Default Date date date