1. Home
  2. Docs
  3. Guides
  4. Tracking
Log a Case

Tracking Technical Guide

Get real-time visibility of your shipments alongside customer data for a true Customer 360 experience.

Overview

Scheduled tracking runs a batch job and will attempt to update the status of your shipments at a regular interval.

This can be any where between every hour and every 24 hours. The job will update the status fields on the shipment object and once the shipment is delivered the delivered checkbox will be checked.

Optionally you can enable checkpoint objects to be created. This means each time the carrier scans the package a new record will be created. This is particularly useful for alerting customers of package delays or running other processes in your organization.

Tracking Limitations

Our tracking tool is only as powerful as your Salesforce org. Please check and calculate the limitations of your Salesforce org before turning on the automated tracking function.

You need to consider how many shipments will be in transit at any point, keeping in mind that shipments with longer delivery time stay in transit for a longer period.

It is also important to remember, that shipment tracking data is managed by the carriers. Before enabling scheduled tracking please ensure that the carrier has confirmed they can provide regular and frequent tracking updates.

Tracking Multiple Packages in One Shipment

If your shipment has multiple packages the application will set the tracking stage of the shipment based on the master tracking number. However, the shipment will not be marked Delivered (checkbox) until all packages are delivered.
For example, if you have three packages and two of them are delivered but the third one is cancelled, the shipment will never be marked delivered.

Scheduled Tracking

Setup Scheduled Tracking

To setup Schedule Tracking, follow the steps below:

  1. Navigate to Zenkraft Settings then select the Scheduled Tracking tab
  2. Click the + button
  3. Select the Scheduler Type. By default it is set to All Shipments. You can also select By Carrier or By Preference, which can help to evenly distribute the workload.
  4. Define how often the tracking should occur by clicking the gear icon
  5. Select how often you want the automatic track to occur. Customers commonly set this to once every few hours.
  6. Click Save

If you receive an error referencing the old scheduled tracking, make sure to delete it, then proceed to set a new schedule.

Edit Scheduled Tracking

To edit Schedule Tracking click on the edit button by the Scheduler Name. In Edit mode you can change the settings as described above in the Setup section.

Delete Scheduled Tracking

To delete a Scheduled Tracking click on the delete button.

Alternatively, you can delete a scheduled job by navigating to Setup | Monitoring | Scheduled Jobs and clicking Del

Track External shipments

Our invocable method allows you to create a Multi Carrier Shipment object as long as you have a Tracking Number and the Ship Date* (only required for FedEx) using Process Builder and our standard Multi Carrier for Salesforce App.

You also need to create a lookup relationship and have Custom Address Source object set up. You don't need to fill in all the fields just create the custom address source with the correct lookup relationship.

For this guide we will work from an Opportunity object.

Step 1: Create Fields

Firstly make sure you have two custom fields available on the Opportunity object where the user will add the tracking number (Type: Text, Length 100) and the shipment date (Type: Date):

Step 2: Create Process Builder Process

Create a Process Builder Process by going to Setup > Create > Workflow & Approvals > Process Builder and click the New button.

Give the process a name, description, and choose to start the process when "A record changes".

Next choose the object you are starting the process from. Remember in this guide, we are using the Opportunity object, and we will be running the shipment creation once the Opportunity object has the Tracking Number and Ship Dates filled.

Make sure you set "Start the process" to be "when a record is created or edited". Click Save, and then select "Add Criteria".

We need to look out for three conditions to be met.

  1. Tracking Number has been changed
  2. Tracking Number is not null
  3. Ship Date is not null

This is how your page will look:

Click Save.

Next add an Immediate Action. The Action Type will be "Apex", and the Apex Class will be "Track Shipment".

There are now Apex variables that need to be set. Below is an explanation of each one:

  • preferenceId - this is the Preference ID
  • trackingNumber - this is the tracking number you want to track (or reference if you are using that)
  • shipDate - the date this tracking number was created
  • recordId - the id of the record using (Opportunity ID in this case)
  • createShipmentIfNotFound - if set to True, a new shipment object will be created if the tracking number does not already exist as a shipment on Salesforce
  • customAddressId - if you want to relate this shipment to your object (Opportunity in this case) you need to specify the Custom Address Source ID, so that the link can be made. To get this ID, navigate to your Custom Address Source and copy the last part of the URL. If you are in Lightning just use the first 15 characters of this objectId

For the recordId please set the Type as Field Reference, and the value to be the Object ID. In our case it will end up being the Opportunity ID.

Once all these fields have been added your screen will look like this:

Click Save, and don't forget to Activate this Process.

That is all set, you will now be able to have shipments created via process builder for tracking.

Once you have activated the process builder, go to an Opportunity object, add the tracking number and ship date and the shipment will be auto-created.

NOTE: It may not be possible to track shipments using our FedEx Test preference, as the live tracking numbers are stored in the FedEx Live environment. To avoid issues please make sure to use a live FedEx account.

Track External Shipments using a Reference

It is possible to use our invocable tracking method to track shipments based on reference values.

Step 1: Create Fields

Firstly make sure you have two custom fields available on the Opportunity object where the user will add the tracking number (Type: Text, Length 100) and the shipment date (Type: Date):

Step 2: Create Process Builder Process

Create a Process Builder Process by going to Setup > Create > Workflow & Approvals > Process Builder and click the New button.

Give the process a name, description, and choose to start the process when "A record changes".

Next choose the object you are starting the process from. Remember in this guide, we are using the Opportunity object, and we will be running the shipment creation once the Opportunity object has the Tracking Number and Ship Dates filled.

Make sure you set "Start the process" to be "when a record is created or edited". Click Save, and then select "Add Criteria".

We need to look out for three conditions to be met.

  1. Tracking Number has been changed
  2. Tracking Number is not null
  3. Ship Date is not null

This is how your page will look:

Click Save.

Next add an Immediate Action. The Action Type will be "Apex", and the Apex Class will be "Track Shipment".

There are now Apex variables that need to be set. Below is an explanation of each one:

  • preferenceId - this is the Preference ID
  • trackingNumber - this is the tracking number you want to track (or reference if you are using that)
  • shipDate - the date this tracking number was created
  • recordId - the id of the record using (Opportunity ID in this case)
  • createShipmentIfNotFound - if set to True, a new shipment object will be created if the tracking number does not already exist as a shipment on Salesforce
  • customAddressId - if you want to relate this shipment to your object (Opportunity in this case) you need to specify the Custom Address Source ID, so that the link can be made. To get this ID, navigate to your Custom Address Source and copy the last part of the URL. If you are in Lightning just use the first 15 characters of this objectId
  • typeOfTrack - if you set this to any of the below values it will use the reference value to look up the shipment instead of tracking number. Map the reference value to our tracking number parameter in the process builder.


    UPS Value

    • Reference


    FedEx Values

    • BILL_OF_LADING
    • COD_RETURN_TRACKING_NUMBER
    • CUSTOMER_AUTHORIZATION_NUMBER
    • CUSTOMER_REFERENCE
    • DEPARTMENT
    • DOCUMENT_AIRWAY_BILL
    • FREE_FORM_REFERENCE
    • GROUND_INTERNATIONAL
    • GROUND_SHIPMENT_ID
    • GROUP_MPS
    • INVOICE
    • JOB_GLOBAL_TRACKING_NUMBER
    • ORDER_GLOBAL_TRACKING_NUMBER
    • ORDER_TO_PAY_NUMBER
    • OUTBOUND_LINK_TO_RETURN
    • PARTNER_CARRIER_NUMBER
    • PART_NUMBER
    • PURCHASE_ORDER
    • RETURN_MATERIALS_AUTHORIZATION
    • RETURNED_TO_SHIPPER_TRACKING_NUMBER
    • TRACKING_CONTROL_NUMBER
    • TRACKING_NUMBER_OR_DOORTAG
    • TRANSPORTATION_CONTROL_NUMBER
    • SHIPPER_REFERENCE
    • STANDARD_MPS

For the recordId please set the Type as Field Reference, and the value to be the Object ID. In our case it will end up being the Opportunity ID.

If you are tracking by reference the screen should look like this for UPS:

For FedEx something like this:

Click Save, and don't forget to Activate this Process.

That is all set, you will now be able to have shipments created via process builder for tracking.

Once you have activated the process builder, go to an Opportunity object, add the tracking number and ship date and the shipment will be auto-created.

Please note that there are limitations with the carrier APIs which are detailed below:

  • FedEx: You can't track multiple shipments with same PO - unless you specify the dates to search
  • FedEx: You either need to specify the date range to search for OR if you have created these shipments on your account, make sure that you specify your account to search with.
  • FedEx: It may not be possible to track shipments using our FedEx Test preference, as the live tracking numbers are stored in the FedEx Live environment. To avoid issues please make sure to use a live FedEx account.

Track External Shipments from Bulk Data Input

Due to Salesforce limitations if you mass upload tracking number created externally to be tracked by our Multi-Carrier app the apex might not fire for all records. In other cases if you load tracking numbers that were only just recently created, there might not be any tracking information available on the carrier API and therefore the shipment creation could fail.

If the above scenarios apply to your use case we recommend setting up your external tracking process following the below steps. Using this process you will create the Zenkraft Shipment records with the tracking number, shipping preference information, and object lookup. Once the Shipment records are created the tracking information will be available at the next Scheduled Tracking run or by tracking manually.

1. Create Fields and CAS

Create the following fields, then create a lookup relationship.

  • Tracking number
  • Ship Date - only for FedEx
  • Shipping Preference - only if you are using multiple carriers/accounts

2. Create Process Builder

Create a Process Builder Process by going to Setup > Process Builder and click the New button.

Give the process a name, description, and choose to start the process when "A record changes".

Next choose the object you are starting the process from. Remember in this guide, we are using the Opportunity object, and we will be running the shipment creation once the Opportunity object has the Tracking Number and Ship Dates filled.

Make sure you set "Start the process" to be "when a record is created or edited". Click Save, and then select "Add Criteria".

We need to look out for three conditions to be met.

  1. Tracking Number has been changed
  2. Tracking Number is not null
  3. Ship Date is not null - only for FedEx

This is how your page will look:

Click Save.

Next add an Immediate Action. The action type will be Create a Record and the record type will be the Zenkraft Shipment record.

There are now 3 fields to be set.

  • Shipping Preference - add the Shipping Preference ID or map the Shipping Preference field if you are using multiple carriers/accounts
  • Tracking Number - map the Tracking Number field
  • Lookup Relationship - Select the name of the Lookup Relationship you are using and map the recordID of your original object record to connect the Shipment

This is how your page will look:

Click Save, and don't forget to Activate this Process.

That is all set, you will now be able to have shipments created via process builder for tracking.

Once you have activated the process builder, go to an Opportunity object, add the tracking number and ship date and the shipment will be auto-created.

Now you can either wait for the next Scheduled Tracking job to run or you can run a manual tracking request.

Set up a Tracking Path

You can add a tracking path to your Shipment record in Lightning that always shows the current stage of the shipment on top of the page.

Go to Setup > Object Manager > Shipment > Lightning Record Pages and either create a new record page or or edit the existing one.

In the page editor select Path and drag it to the top of the screen. Now you need to set up the path.

In the Path Settings click on New Path and then follow the wizard.

Once the path setup is completed make sure that the path is selected in the Lightning Page editor, then save and activate the page.

High Volume Shipment Tracking

The default number of days that shipments keep tracking for is 180 days, but you can change this by using the custom setting that can be found under Setup > Custom Settings > General Settings, click on Manage as you can see from the screenshot below.

You can then click on edit under the settings you see here:

And you then see all the custom settings for the Multi Carrier app.

You can now change the number of days to suit the number you need.

Click Save.

Enabling Checkpoint Objects

Turn on checkpoints via Setup > Custom Settings, and clicking on the Manage link for General Settings:

Click on the Edit link as you see here to edit the custom settings:

Next click on the Record Shipping Checkpoints checkbox , and click on Save.

Once this is done, the next time the tracking runs on a shipment that is not delivered you will see a related list on your shipment object that shows you the checkpoints.

Set Up Branded Tracking

To set up branded tracking please follow our Branded Tracking Setup Guide.

Troubleshooting

In this section you will find the troubleshooting steps to the most common issues that may come up.

Tracking not Updating

If the Scheduled Tracking job is enabled tracking information should be pulled in automatically at set intervals. However, if the tracking details are blank you can do the following troubleshooting steps:

1. Check for tracking details on the carrier website

Often tracking information is only available after the label has been scanned by the carrier. If no tracking details are displayed on the carrier website you probably just have to wait.

2. Recreate the tracking job

If the tracking updates are missing for multiple shipments there might be an issue with the Scheduled Tracking job. Try deleting and recreating the Scheduled Tracking.

USPS-Endicia tracking error: "List index out of bounds: 0"

This error usually occurs when the Endicia account does not have USPS web tools enabled. To solve the issue you need to register and then enable USPS web tools.

  1. Create a USPS Online Tools ID by clicking "Register Now".
  2. Once you have the User ID log back into Salesforce.
  3. Go to Setup > Custom Settings > Zenkraft General Settings, then click Manage, then Edit.
  4. Check the "USPS Tracking" checkbox and enter the web tools Used ID to the "USPS Web API UsedID" field.
  5. Save your changes. All USPS shipments will now be tracked using USPS Web Tools via the Track Shipment button and Scheduled Tracking.

Invocable Tracking or Track By Reference not creating shipments

If you have missed a step and the shipment isn't created, you can view error messages under Setup > Jobs > Apex Jobs.

Back to Top