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. v1.113 and below: Navigate to Zenkraft Settings then select the Scheduled Tracking tab

    v1.114 and above: Navigate to Zenkraft Settings / Bringg Settings > Tracking.
  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

Manual Tracking

If you want an instant tracking update on the shipment you can track each record manually.

Go to the Shipment record and select Track Shipment from the top menu. If the button is not visible click on the downward error to see all options.

You will be redirected to the tracking page that will show the latest available tracking stage.

If you have checkpoints enabled then those will be listed under Travel History.

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 A Flow

Create a flow by going to Setup > Process Automation > Flows and click the New Flow button.

Select Record-Triggered Flow. Choose the object that will start the flow. The flow should trigger when the record is updated, and the tracking number is not "null". You can also add your additional criteria here, for example if the ship date also needs to be populated or the record needs to be a certain type.

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:

  • trackingNumber - this is the tracking number you want to track (or reference if you are using that) - REQUIRED
  • preferenceId - this is the Preference ID
  • shipDate - the date this tracking number was created - REQUIRED for some carriers
  • recordId - the ID of the object record you are using using (Opportunity ID in this case) - REQUIRED
  • 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 - REQUIRED
  • forceShipmentCreation - create the shipment record regardless of the tracking response. This also means shipment records might be created using incorrect tracking numbers.
  • dateRangeStart and dateRangeEnd - if you are unsure of the exact ship date but know the time frame of when the shipment was created you can use that (carrier dependent).

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

Once the flow is saved don't forget to activate it.

TESTING: Once you have activated the flow go to a record (in our case an Opportunity), add a live tracking number and ship date, and the shipment should 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 A Flow

Create a flow by going to Setup > Process Automation > Flows and click the New Flow button.

Select Record-Triggered Flow. Choose the object that will start the flow. In this example we are tracking shipments on the Order object using the Purchase Order number.

Select Record-Triggered Flow. Choose the object that will start the flow. The flow should trigger when the record is updated, and the tracking number is not "null". You can also add your additional criteria here, for example if the ship date also needs to be populated or the record needs to be a certain type.

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:

  • trackingNumber - this is the tracking number you want to track (or reference if you are using that) - REQUIRED
  • preferenceId - this is the Preference ID
  • shipDate - the date this tracking number was created - REQUIRED for some carriers
  • recordId - the ID of the object record you are using using (Order ID in this case) - REQUIRED
  • 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 (Order 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 - REQUIRED
  • forceShipmentCreation - create the shipment record regardless of the tracking response. This also means shipment records might be created using incorrect tracking numbers.
  • dateRangeStart and dateRangeEnd - if you are unsure of the exact ship date but know the time frame of when the shipment was created you can use that (carrier dependent).
  • 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

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

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

For FedEx something like this:

Once the flow is saved don't forget to activate it.

TESTING: Once you have activated the flow go to a record (in our case and Order), add a valid PO number and ship date, and the shipment should be auto-created.

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 Without Apex

Due to Salesforce limitations if you mass upload tracking numbers created externally to be tracked by our Zenkraft 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 without using our tracking apex action following the below steps. Using this process you will create the 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 A Flow

Create a flow by going to Setup > Process Automation > Flows and click the New Flow button.

Select Record-Triggered Flow. Choose the object that will start the flow. In this guide, we are using the Order object. The flow should trigger when the record is updated, and the tracking number is not "null". You can also add your additional criteria here, for example if the ship date also needs to be populated or the record needs to be a certain type.

Next add an Immediate Action. The action type will be Create a Record. Select "Use separate resources, and liter values", then select the ZK Shipment object.

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:

Once the flow is saved don't forget to activate it.

That is all set, you will now be able to have shipment records created for tracking.

TESTING: Once you have activated the flow go to a record (in our case and Order), add a live tracking number and ship date, and the shipment record should be auto-created.

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

Track External Shipments from Bulk Data Input With Apex

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. Instead of using the regular invocable tracking method you can use the queueable version which will cycle through all updated records.

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 flow by going to Setup > Process Automation > Flows and click the New Flow button.

Select Record-Triggered Flow. Choose the object that will start the flow. The flow should trigger when the record is updated, and the tracking number is not "null". You can also add your additional criteria here, for example if the ship date also needs to be populated or the record needs to be a certain type.

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

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

  • trackingNumber - this is the tracking number you want to track (or reference if you are using that) - REQUIRED
  • preferenceId - this is the Preference ID
  • shipDate - the date this tracking number was created - REQUIRED for some carriers
  • recordId - the ID of the object record you are using using (Opportunity ID in this case) - REQUIRED
  • 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 - REQUIRED
  • forceShipmentCreation - create the shipment record regardless of the tracking response. This also means shipment records might be created using incorrect tracking numbers.
  • dateRangeStart and dateRangeEnd - if you are unsure of the exact ship date but know the time frame of when the shipment was created you can use that (carrier dependent).

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

Once the flow is saved don't forget to activate it.

TESTING: Once you have activated the flow go to a record (in our case an Order), add a live tracking number and ship date, and the shipment should 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.

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 / Bringg 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 / Bringg 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.

You also need to enable checkpoints if you want to be able to see the shipment travel history when doing manual tracking.

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 / Bringg Settings > Other Settings and find "Record Shipping Checkpoints" and set to True.

Delete Checkpoints

If you don't want checkpoints to take up too much space in your org you can enable the Delete Checkpoints After Delivery option under Bringg Settings. Insert the number of days you want to keep the checkpoints for after the shipment is delivered. For example, if you put 2, then the shipment checkpoints will be deleted two days after the shipment is marked 'delivered'.

If you need help with mass deleting checkpoints please contact support.

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. Check if the preference is still working

Try to create a shipment using the same preference you use for tracking.

3. Check if the Number of Days to Track Shipments is set.

Go to Zenkraft Settings / Bringg Settings > Other Settings and find "Number of Days to Track Shipments". If the number is missing replace it with 180 or a lower number.

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

You can also map a Text(255) field in the custom address source under error handling where any potential error message would be saved.

Back to Top