Print this page

Can I track my packages in Salesforce?

Knowledge Article Number 000004923
Description

Can I track my packages in Salesforce?

Resolution

By using the provided coding below, you will be able to actively track your packages using the 4 primary shipping companies, FedEx, UPS, USPS and DHL. In order for this to function, you will need to create 3 different fields within your Asset object, preferably though this will function on any object, a picklist, a text field and a formula(text.)


Label: Shipping Company
Name: Shipping_Company
Format: Picklist
Values: FedEx, UPS, USPS, DHL
Description: With this field you will select which of the Shipping companies you package is currently being distributed by.

**In the event that you only use one of these companies, feel free to remove the values of those not being used.

Label: Tracking #
Name: Tracking
Format: Text
Length: 25
Description: In this field, you will want to insert the tracking number provided by your shipping company.

Label: Track Status
Name: Track_Status
Format: Formula(Text)
Formula:
IF( ISPICKVAL({!Shipping_Company__c},"USPS"), HYPERLINK("http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum="& {!Tracking__c} ,"Track "& {!Name} &" - "&{!SerialNumber} ),

IF( ISPICKVAL({!Shipping_Company__c},"UPS"), HYPERLINK("http://wwwapps.ups.com/etracking/tracking.cgi?tracknums_displayed=1&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber1="& {!Tracking__c} ,"Track "& {!Name} &" - "&{!SerialNumber}),

IF( ISPICKVAL( {!Shipping_Company__c},"FedEx"), HYPERLINK ("http://www.fedex.com/Tracking?cntry_code=us&tracknumbers="& {!Tracking__c} ,"Track "& {!Name} &" - "&{!SerialNumber}) ,

IF( ISPICKVAL( {!Shipping_Company__c} ,"DHL"), HYPERLINK ("http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber="& {!Tracking__c} ,"Track "& {!Name} &" - "&{!SerialNumber}),
Null))))


In order to make this functionality most accessible, we suggest that you also include this link within the visible related list fields for the Account and Contact objects. In order to do this, please follow the click path below:

Setup | Customize | Contacts or Accounts | Page Layouts | Edit

Here click on the Assets related list and click on the 'Edit Related List Properties' button. You will be able to select which fields you would like to be able to display within the related list.





promote demote