Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket


Optimizely <<product-name>> provides an option to display shipment/order tracking information both on the website and in the Admin Console. Displaying this information requires data to exist within the Shipment database tables. Use the information in this article to enable this functionality.

## Examples when tracking is enabled

This screen capture shows how the tracking information is displayed on the website within the **Order Details** section of **My Account**.



To view the data within the Admin Console, go to **Sales** \> **Order History**, click **View Only** for an order and scroll to the **Shipping Details** section under the **Order Lines**.



## Configure

To see these views, data must exist in the **Shipment** and **ShipmentPackage** tables. The **ShipmentPackageLines** table is an optional table to provide details of products that are within each shipment package.



Shipment refreshes are required to integrate data between <<product-name>> and the ERP.

For testing purposes, populate the **Shipment** tables to view shipment information in the Admin Console or website. The following queries can be used to populate some test data into the database:



Carriers require specific values to populate the base link for the tracking number.

The following **Carrier** values will use the links below, as they are hard-coded into the platform:

Column "Carrier" ValueLink
"UPS" or "CUS"`http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_US&InquiryNumber1=` + tracking_number
"FDX" or "FEDX"`http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers=` + tracking_number
"SPD"`http://packages.speedeedelivery.com/packages/packages.php?tracking=` + tracking_number
"DHL"`http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber=` + tracking_number
"OLDD"`http://www.odfl.com/trace/Trace.jsp?pronum=` + tracking_number

When using one of the conventional carriers above this will create an Application Setting **TrackingUrl_UseCustomUrls** set to **False**

If **TrackingUrl_UseCustomUrls** is set to **True**, then you have the ability to use custom links.

You can add an **Application Setting** for each carrier with this format

Application SettingValue
TrackingUrl\_\[carrier\]URL + \[tracking_number\]

For example, if you set the record to have a Carrier with the value of "truck", then your **Application Setting** should be set to something similar to what's shown below:

Application SettingValue
TrackingUrl_UseCustomUrlsTrue
TrackingUrl_truck`http://www.mytesttruck.com?package=[tracking_number]`

It is important to include "\[tracking number\]" in the URL for the actual tracking number to be replaced in the URL.

Once these generic records are created, you can log in as the respective customer/user and see the shipment information in the **Order History** detail of order.

The Carrier names listed in the table below are examples only. The only requirement is that a Carrier name in the **Name** field within the Admin Console must match the value entered in the Carrier field in the **ShipmentPackage** table (referenced above).

Sample Carrier NamesCarrier Tracking Samples URL
UPS`http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=[tracking_number]`
FEDEX`http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers=[tracking_number]`
Speedee`http://packages.speedeedelivery.com/packages/packages.php?tracking=[tracking_number]`
DHL`http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber=[tracking_number]`
OLDD`http://www.odfl.com/trace/Trace.jsp?pronum=[tracking_number]`

If a matching tracking number is not found, the tracking number will not be hyperlinked.