Fedex Tracking (with Activity/Scan Detail) Request

Function will return all available tracking information for a specified tracking number. 2 queries will be available from a successful request which will provide full scan activity for the package along with many other values.

Function TrackRequest
Output Type - 2 Standard CF Queries (1 contains main tracking detail, 1 contains tracking/scan history):
trackQuery
scanQuery
Error Capture Variables FedexError
- 0 = Success
- 1 = Failure
- 2 = Hard Error (configuration problem)

FedexErrorDesc
(contains description of error if present)
Test Environment Available Yes
Example Usage

INSTALLED AS A CUSTOM TAG
<cf_adminpro_fedexxml
function="TrackRequest"
accountnumber="your-fedex-account-number"
fedexindentifier="your-fedex-meter-number"
trackingnumber="123456789012"
trackingsearchtype="TRACKING_NUMBER_OR_DOORTAG"
>

*Note to use as a custom tag you must install the tool in your ColdFusion server CustomTags directory or have it present in the directory you are calling it from.

CFMODULE
<cfmodule template="adminpro_fedexxml.cfm"
function="TrackRequest"
accountnumber="your-fedex-account-number"
fedexindentifier="your-fedex-meter-number"
trackingnumber="123456789012"
trackingsearchtype="TRACKING_NUMBER_OR_DOORTAG"
>

Supplied Example Files example_scenario4.cfm


Track Request (With Full Activity)
Input Attributes (attributes that can be passed to the custom tag with a valid value)
Attribute Name Required Preset value/value list Default Value Restrictions Explanation/Notes
AccountNumber Yes   NO VALUE Your active Fedex account number Your Fedex account number you use for shipping
Fedexindentifier Yes   NO VALUE Your Fedex meter number  
TrackingNumber Yes   NO VALUE   Valid Fedex tracking number, Must be alphanumeric characters with no spaces.
TrackingSearchType Yes TRACKING_NUMBER_OR_DOORTAG
EXPRESS_MPS_MASTER
GROUND_SHIPMENT_ID
RMATCNBOL
PARTNERCARNBR
REF
INV
PO
CUSTAUTHNUM
CUR
DEPARTMENT
PARTNUM
SHR
GOVBOL
COD
RETURNTOSHIPPER
TRACKING_NUMBER_OR_DOORTAG   Tracking request search type (i.e search by Tracking Number)
TrackStartDate No       Optional: Date to start track request (when providing a date range)
Format: YYYY-MM-DD
TrackEndDate No       Optional: Date to end track request (when providing a date range)
Format: YYYY-MM-DD
DateShipped No       Optional: Date package was shipped (helps to narrow down tracking request)
Format: YYYY-MM-DD
ShipToCountry Yes   US   Country package was shipped to

Tracking/Detail Request - Output
Output Query "trackQuery" (for display with <cfoutput query="trackQuery" > tag after call to custom tag)
Column/Variable Name Always Present Default Value Explanation/Notes
Response Failure Variables
FedexError Yes [0 (Successful transaction), 1 (Error from Fedex based on request), 2 (Hard Error, error with request that could not be handled by Fedex, check attributes passed are valid)]
FedexErrorDesc Yes Description of error received
Success Query named trackQuery (Present if FedexError = 0)
TrackingNum *Yes NO VALUE Fedex tracking number of this package
errorCode *Yes NO VALUE If there is an error with this request the code will be present here (all other columns, except errorDesc, will be empty if this is present)
errorDesc *Yes NO VALUE If there is an error with this request the description of this error will be present here (all other columns, except errorDesc, will be empty if this is present)
duplicateWaybill *Yes NO VALUE If this is a duplicate waybill/tracking number
moreDataFlag *Yes NO VALUE Denotes if more data relating to this package is available
trackingNumberUniqueIdentifier *Yes NO VALUE A unique identifier returned to distinguish this package from another when it is a duplicate waybill
statusCode *Yes NO VALUE Fedex status code
statusDescription *Yes NO VALUE Fedex status description
service *Yes NO VALUE Fedex service level (e.g. Ground, 2nd Day Air, etc)
weight *Yes NO VALUE Gross weight of this specific package
shipmentWeight *Yes NO VALUE Gross weight of shipment of which this package is a part of.
weightUnits *Yes NO VALUE The weight unit of the weight above (e.g. LBS or KGS)
packagingDescription *Yes NO VALUE Description of the packaging
packageSequenceNumber *Yes NO VALUE Sequence number of this package (for multi-package shipments)
packageCount *Yes NO VALUE Total number of packages in shipment
referenceType *Yes NO VALUE Reference type
referenceValue *Yes NO VALUE Reference value
shipperCity *Yes NO VALUE The shipper city package was shipped to
shipperState *Yes NO VALUE The shipper state package was shipped to
shipperPostcode *Yes NO VALUE The shipper zip/postcode package was shipped to
shipperCountry *Yes NO VALUE The shipper country code package was shipped to
originCity *Yes NO VALUE The actual origin city package was shipped to
originState *Yes NO VALUE The actual origin state package was shipped to
originPostcode *Yes NO VALUE The actual origin zip/postcode package was shipped to
originCountry *Yes NO VALUE The actual origin country code package was shipped to
destinationCity *Yes NO VALUE The destination city package was shipped to
destinationState *Yes NO VALUE The destination state package was shipped to
destinationPostcode *Yes NO VALUE The destination zip/postcode package was shipped to
destinationCountry *Yes NO VALUE The destination country code package was shipped to
estimatedPickupDate *Yes NO VALUE Estimated date package was picked up
estimatedPickupTime *Yes NO VALUE Estimated time package was picked up
shipDate *Yes NO VALUE The date the package was shipped
totalTransitDistance *Yes NO VALUE Total days package was in transit (rarely populated)
distanceToDestination *Yes NO VALUE Total distance to destination (rarely populated)
distanceUnits *Yes NO VALUE Units for distance returned above (rarely populated)
estimatedDeliveryDate *Yes NO VALUE The Estimated delivery date based on ship date and service level
estimatedDeliveryTime *Yes NO VALUE The Estimated delivery time based on ship date and service level
deliveredDate *Yes NO VALUE The actual delivery date of the package
deliveredTime *Yes NO VALUE The actual delivery time of the package
deliveredLocationCode *Yes NO VALUE Fedex code for the relative location the package was delivered to
deliveredLocationDescription *Yes NO VALUE Relative location at which package was left, such as Front Desk or Back
Door, etc.
signedForBy *Yes NO VALUE Name that signed for package upon delivery
signatureProofOfDeliveryAvailable *Yes NO VALUE Flag denoting that a Signature Proof of Delivery letter is available for this package (request can be made using the Premium version of this tag)
PODNotificationsAvailable *Yes NO VALUE Flag denoting that a Proof of Delivery notification is available for this package
exceptionNotificationsAvailable *Yes NO VALUE Flag denoting that exception notification is available for this package
*Yes - Denotes that this column/query will be available if FedexError = 0

Query "scanQuery" (1 or more records with following columns) (for display with <cfoutput query="scanQuery"> tag after call to custom tag)
Column/Variable Name Always Present Default Value Explanation/Notes
scanDate *Yes NO VALUE Tracking event scan date
scanTime *Yes NO VALUE Tracking event scan time
scanType *Yes NO VALUE Tracking event type
scanDesc *Yes NO VALUE Tracking event scan event (e.g. NOTICE LEFT)
scanCity *Yes NO VALUE Tracking event scan city
scanState *Yes NO VALUE Tracking event scan state
scanPostcode *Yes NO VALUE Tracking event location zipcode
scanCountry *Yes NO VALUE Tracking event location country code
exceptionCode *Yes NO VALUE If an exception is logged, this will contain exception type
exceptionDesc *Yes NO VALUE If an exception is logged, this will contain exception description