in reply to Discussion on Tracking Orders

It is very possible. However, you need to study the web sites of the various carriers in order to understand how you should pass them data in order to retrieve the shipment information.

Carrier tracking numbers have a different structure depending on the carrier, so you can quite easily parse them and understand the carrier they belong to.

There's however a caveat: some carriers might want tracking number to be passed via POST and not GET, and some might even check the referrer when a tracking request is issued. If this is the case with one of the carriers you use, you can't provide a direct link to you customers. Instead, you'll have to fetch yourself the information from the carrier's web site (using LWP for instance); then, you can parse the resulting page and display the shipment information on your web page.

For FedEx you might also want to take a look at modules such as Business::FedEx.

Hope this helps!

Michele.

Replies are listed 'Best First'.
Re: Re: Discussion on Tracking Orders
by b310 (Scribe) on Jun 03, 2003 at 14:42 UTC
    I'm currently assessing the number of carriers being used. I'm also contacting the two I know for sure.

    Once I determine how the data should be passed to each carrier, how would my tracking number link know which carrier belongs to that tracking number?

      You have a couple of choices.

      You can, as per phydeauxarff suggestion, modify your database so that, when entering tracking numbers, you also specify the carrier which they belong to. For instance, when you enter a code such as GE732387457WW (invented) you assign it manually to TNT.

      As an alternative, you can just enter the tracking numbers and have your software determine which carrier they belong to. Just to stay with TNT, you know that a number which satisfies the regex:

      /^GE\d{9}WW$/

      is theirs. You can do the same for other carriers. If you choose this way, remeber that some carriers (i.e. UPS) have more that one format for their tracking numbers.

      Michele.