Tracking Widget
Getting Started
0
1
Creating Links
To create a Tracking Link for inside an email or on an order history page, simply append “tn=[tracking number]” and/optionally “carrier=[carrier code]” as show in the examples below:
To display the Carrier Selection menu:
http://www.yourdomain.com/your-tracking-page/?tn=123456789
To specify the Carrier:
http://www.yourdomain.com/your-tracking-page/?tn=123456789&carrier=ups
To Auto Detect the Carrier:
http://www.yourdomain.com/your-tracking-page/?tn=123456789&carrier=auto
1
0
PostalMate Integration
Integrate with PostalMate
If you use PC Synergy’s PostalMate software, you can integrate PackageMapping with the following steps:
The default tracking option in PostalMate is the Carrier’s website (Boo!).
Select “Other website (advanced)” to have tracking directed to your own website.
Other website (advanced):
The tracking number will link to whatever web page you specify, and be inserted into the proper place in the tracking feature. This is done by entering “%%TRKNO%%” into the URL.
If your website was “http://www.mywebsite.com” and your Tracking Page was located at “/tracking” and you placed the PackageMapping Tracking Widget on your Tracking Page, then your tracking URL would be: http://www.mywebsite.com/tracking
To automatically load the Tracking Number, you would append “?tn=%%TRKNO%%”.
Default Example:
http://www.mywebsite.com/tracking/?tn=%%TRKNO%%
To automatically load the Tracking Results using Automatic Carrier Detection, you would append “?carrier=auto&tn=%%TRKNO%%”.
Advanced Example:
http://www.mywebsite.com/tracking/?carrier=auto&tn=%%TRKNO%%
Note: In the Default Example, your customer will click the tracking link from their email and be sent to your Tracking Page with the Tracking Number preloaded into the Tracking Widget. The Tracking Widget will display a list of matching Carriers based on the Tracking Number format. Your customer will select the carrier they recognized from their email. This is the safest method.
In the Advanced Example, the Tracking Widget will automatically display the tracking results by attempting to detect the correct carrier. This may be more convenient and have a slightly better user experience. However, results may vary so it’s safer to let your customer choose the carrier. If you only ship with one carrier, then you can replace “carrier=auto” with “carrier=ups” or “carrier=”usps”, depending on which carrier you ship. A full list of Carrier Codes can be found here.
For more information, please reference this PDF: http://www.pcsynergy.com/pdfs/email/emailtracking.pdf
It has been brought to our attention that on some mobile devices such as the iPhone, the email receipt sent out from PostalMate which contains the tracking number might be converted into a link (by the phone) to the carrier’s website. We have contacted PostalMate and they will not fix this until they receive enough Feature Requests from their customers. Please ask them to fix this problem by submitting a feature request here: http://www.pcsynergy.com/support/feature-request-form/
As always, if you need help, please contact us.
0
1
Auto Load Results
To load the Tracking Results automatically without passing the Tracking Number through the URL, you’ll need to dynamically change the JavaScript as shown below:
Replace the “var zcpmc_options = {};” part of JavaScript on your page with the following:
var zcpmc_options = {tn: ‘123456789’, carrier: ‘ups’};
To use the Auto Detect Carrier:
var zcpmc_options = {tn: ‘123456789’, carrier: ‘auto’};
To force the Carrier, but allow Tracking Number input from URL:
var zcpmc_options = {carrier: ‘auto’};
0
1
Web Service API
API Introduction
To access our web service API, you’ll first need to purchase a plan that supports web service access. You can purchase a plan here.
The web service is a RESTful API which is compatible with JSON and XML formats. All requests are made with POST calls. We recommend using the JSON format as it is a smaller payload and is not strongly typed as is XML. However, we provide both formats for your preference.
Please make sure to keep your Web Service Key private and in a safe place that is not accessible to unauthorized users or made public. DO NOT share your Web Service Key. If someone else uses your Web Service Key they will abuse your available tracks and your account may be disabled.
DO NOT USE JavaScript to make calls to our web service since the Web Service Key would have to be stored in a publicly accessible area. All web service calls to our API should be done from server side code such as C# or PHP.
You can view the REST API help page here.
Code samples are provided in this documentation.
If you happen to port the code samples to other code languages, please share your code with us and we’ll add it to our documentation.
0
0
Carrier Codes
Below is a list of currently supported Carrier Codes and corresponding Carrier labels. You will need the Carrier Code in various situations when using the API.
- canadapost Canada Post
- cdl CDL Last Mile Solution
- dhl DHL
- fdm FDM
- fedex FedEx
- gso Golden State Overnight Delivery Service
- landmarkglobal Landmark Global
- lasership LaserShip
- lso Lone Star Overnight
- ontrac OnTrac
- purolator Purolator
- puropost PuroPost
- rrdintl RR Donnelley International Services
- speedee Spee-Dee Delivery Service
- ups UPS
- upsmi UPS Mail Innovations
- usps United States Postal Service
0
0
Activity Statuses
Unknown
Will Pickup
Out For Delivery
In Transit
Delivery Exception
Information Received
Delivery Attempted
At Pickup
Picked Up
Delivered
At Carrier Facility
Returned To Shipper
Tendered To Partner Carrier
Void
At Custom Clearance Department
0
1
PHP Code Example
0
0
C# Code Sample
You’ll need the Newtonsoft.Json library. You can either use NuGet with the command [c]install-package Newtonsoft.Json[/c] or from their website: http://james.newtonking.com/json
The project can be downloaded from GitHub
0
0