Zenkraft is now called Bringg on Salesforce Read More
  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.

    You can also filter the shipments using a custom SoQL query. Example query:
    SELECT Id FROM zkmulti__MCShipment__c WHERE zkmulti__Shipment_Deleted__c = FALSE AND zkmulti__Delivered__c = FALSE
  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

Examples for custom SoQL

Track return shipments for a specific carrier, where the :preferenceId is the Salesforce ID of the preference and :cutoffDateTime is the date from where the shipments should be tracked.

SELECT Id FROM zkmulti__MCShipment__c WHERE CreatedDate >= :cutoffDateTime AND zkmulti__Shipment_Deleted__c=FALSE AND zkmulti__Shipmate_Preference__c= :preferenceId AND zkmulti__Delivered__c=FALSE AND zkmulti__Return_Shipment__c=TRUE ORDER BY Name

Track outbound shipments for a specific carrier, where the :preferenceId is the Salesforce ID of the preference and :cutoffDateTime is the date from where the shipments should be tracked.

SELECT Id FROM zkmulti__MCShipment__c WHERE CreatedDate >= :cutoffDateTime AND zkmulti__Shipment_Deleted__c=FALSE AND zkmulti__Shipmate_Preference__c= :preferenceId AND zkmulti__Delivered__c=FALSE AND zkmulti__Return_Shipment__c=FALSE ORDER BY Name

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 fields available on the object (in this example the Order) where the you will add the tracking reference (Type: Text, Length 100 - in this example the PO number) 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 example we are tracking shipments on the Order object using the Purchase Order number.

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. In this example the process should start when the "PO number" field is populated.

  1. PO Number has been changed
  2. PO 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 (Order 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 scheduled tracking job runs to update all shipments which aren't marked Delivered. When it comes to high volume tracking issues, often the main cause is old shipments that were created but never used, or got stuck in the delivery process.

You can optimize tracking by following these 2 steps:

Reduce the number of days to track shipments

The default number of days that shipments keep tracking for is 180 days, but you can change this by using the custom setting Number of Days to Track Shipments.

v1.113 and below: Go to 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.

v1.114 and above: Go to Zenkraft Settings > Other Settings and find "Number of Days to Track Shipments". Modify the number and save your changes.

Reschedule the tracking job to run less often

Go to Zenkraft Settings > Scheduled Tracking and reschedule the tracking job to run less frequently.

Unless you ship with express service where you get tracking updates from the carrier almost every hour there is no need to run the job hourly. You could change the schedule to run once every 3-4 hours, or even less often.

Enabling Checkpoint Objects

It is possible to save shipment checkpoints to the Checkpoints object related to the shipment.

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.

v1.113 and below

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.

v1.114 and above

Go to Zenkraft Settings > Other Settings and find "Record Shipping Checkpoints" and set to True.

Set Up Branded Tracking

You can provide a seamless brand experience to your customers from within your own website using our Branded Tracking Widget, or through Salesforce using our Branded Tracking setup.

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" and other tracking related issues

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. This can also be a solution to any other USPS-Endicia related tracking issues.

  1. Create a USPS Online Tools ID by clicking "Register Now".
  2. Once you have the User ID add it to the app.
    • v1.113 and below: Go to Setup > Custom Settings > Zenkraft General Settings, then click Manage, then Edit. Check the "USPS Tracking" checkbox and enter the web tools Used ID to the "USPS Web API UsedID" field.
    • v1.114 and above: Go to Zenkraft Settings > Other settings and enable USPS-Tracking and enter the web tools ID.
  3. Save your changes. All USPS shipments will now be tracked using USPS Web Tools via the Track Shipment button and Scheduled Tracking.

If you are still unable to track these shipments please follow the below steps to obtain Package Tracking API (API=TrackV2) access.

  1. Navigate to https://usps.force.com/emailus/s/web-tools-inquiry
  2. Provide user name (Web Tools User ID)
  3. Select “Tracking APIs”
  4. Select “Track API”
  5. Submit the request with the following information below in the “Additional Information” text box:
    • Web Tools UserID:
    • Mailer ID (MID):
    • Company Name:
    • Requester First and Last Name:
    • Requester Email:
    • Requester Phone number:
    • Mailing Address:
    • Mailing City:
    • Mailing State:
    • Mailing Zip Code:
    • PROD Registration Date:
    • API access requested:
    • Package Tracking (API=TrackV2)
    • Anticipated volume:
    • Any additional information from the customer:

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.

If the job is running, you might not be getting a response because the shipment is not yet active in the carrier's system. Many carriers only provide tracking updates once the shipment is picked up (and therefore activated).

If you receive the tracking numbers before they are activated you can add an additional setting to your Process Builder called forceShipmentCreation and set it to true. If this setting is enabled the shipment will be created regardless of the initial tracking response.

Bear in mind however, that by using this setting you might also create shipments for incorrect tracking numbers or for ones that are never going to be used and will potentially clog you tracking jobs.

Back to Top