Post eFulfilment - www.post.com.au


ReportsOrdersCatalogueUsersHelp
  Instructions

Software

Data Requirements

Activating the DRC

Accessing the DRC

Getting Results

Using COLDFUSION VERSION 4…

 

Delivery Rate Calculator

INSTRUCTIONS FOR POST eDELIVER DELIVERY RATE CALCULATOR

The following instructions have been developed to enable you to access the functionality of the Post eDeliver Delivery Rate Calculator (DRC) directly from your merchant Website.

The DRC is available to merchants who would like to offer online estimation of delivery charges to their customers.

By undertaking some simple programming, your Website can access the DRC, which is resident on the Australia Post Website, and return estimated delivery charges to your Website.

Once these steps have been completed, you can readily provide your customers with the estimated delivery charges of items they wish to purchase from your website.

Please note - basic programming experience is required to carry out the steps required.

back to top

 

 

SOFTWARE REQUIREMENTS FOR ACTIVATING THE DRC

The DRC can be activated by programs that can perform HTTP* requests.

These include:

  • PHP Version 3**
  • PHP Version 4
  • Cold Fusion 4

*HTTP is short for Hyper Text Transfer Protocol, the underlying protocol used by the World Wide Web. HTTP defines how messages are formatted and transmitted, and what actions Web Servers and browsers should take in response to various commands (www.itdictionary.com).

** PHP refers to a Hypertext Preprocessors, server-side, HTML embedded scripting language used to create dynamic Web pages.(www.itdictionary.com).

 

back to top

 

 

DATA REQUIREMENTS FOR DELIVERY RATE CALCULATOR (DRC)

The Australia Post DRC tool requires a minimum set of data to be passed to it so that it can estimate the delivery charges for the items a customer wants to purchase. These are:

Data entity Entity description Data value provided by Variable type
Pickup_Postcode Postcode of the pick-up address (e.g. 3015). This is defaulted to the postcode where you warehouse your goods. string: 4 chars
Destination_Postcode Postcode of the delivery destination (e.g. 3015). This is entered by your customer. string: 4 chars
Country The country of delivery destination designated by two alpha characters. For example, AU stands for Australia. You have to program the list of country/countries you deliver to into your Website. string: 2 chars
Weight The weight of the parcel or item measured in grams (g). Depending on the item(s) selected by your customer, the weight of the item(s) will be sourced from your product database. integer
Service_Type The Australia Post delivery service type (Types of service available include "Standard", "Express", "Air", "Sea", and "Economy") You have to program the types of delivery service (as shown on left) you are providing into your Web page. Alternatively, if you only provide one type of service, you could set this as the default. 'STANDARD', 'EXPRESS','AIR', 'SEA', 'ECONOMY'
Length The length of the item or parcel in millimetres (mm). Depending on the item(s) selected by your customer, the length of the item(s) will be sourced from your product database. integer
Width The width of the item or parcel in millimetres (mm). Depending on the item(s) selected by your customer, the width of the item(s) will be sourced from your product database. integer
Height The height of the item or parcel in millimetres (mm). Depending on the item(s) selected by your customer, the height of the item(s) will be sourced from your product database. integer
Quantity This is the quantity of items for which the customer is estimating the delivery charges. Entered by customers. integer

 

Example

Funky CDs is a business that sells CDs on the Internet and would like to display the estimated delivery/shipping costs it charges customers that buy CDs from its website.

In order to offer this capability to its Internet customers, Funky CDs' developer/programmer will need to add code to its website so that it builds the required string of name/value pairs that are required to estimate the delivery charges. That string will then need to be passed to the Post eDeliver Delivery Rate Calculator so that the delivery charge can be estimated from the parameters that have been provided. For the most part, these values will come from Funky CDs product database.

In the case of Funky CDs, the following string of name/value pairs may be built:
$qs .= 'Height=150&' This value is provided by Funky CDs and is sourced from its product database depending on which product the customer has placed in the shopping cart.
$qs .= 'Length=150&' This value is provided by Funky CDs and is sourced from its product database depending on which product the customer has placed in the shopping cart.
$qs .= 'Width=15&' This value is provided by Funky CDs and is sourced from its product database depending on which product the customer has placed in the shopping cart.
$qs .= 'Weight=150&' This value is provided by Funky CDs and is sourced from its product database depending on which product the customer has placed in the shopping cart.
$qs .= 'Pickup_Postcode=3000&' This value is provided by Funky CDs. As Funky CDs has only one warehouse in Melbourne, this can be hard-wired to 3000
$qs .= 'Destination_Postcode='.$customer_postcode.'&' This is provided by the Funky CDs customer.
$qs .= 'Country=AU&' This is provided by the Funky CDs customer OR, if Funky CDs delivers only to Australia, can be hard-wired to AU (for Australia).
$qs .= 'Service_Type=STANDARD&' This value is dependent on the Australia Post delivery options that Funky CDs offers to its customers. Can be hardwired if only one delivery option is offered.
$qs .= 'Quantity='.$customer_quantity This is provided by Funky CDs, depending on how many identical parcels, corresponding to the above height, length, width, weight and destination parameters an estimated delivery charge is required for.

back to top

 

 

ACTIVATING THE DRC USING PHP 3 OR 4

If you use PHP scripting Version 3 OR 4, build the following code:

$myfile=file('http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode='.$var_pickup.'
&Destination_Postcode='.$var_destination.'&Country='.$var_country.'&Weight='.
$var_weight.'&Service_Type='.$var_service.'&Length='$var_length.'&Width='.
$var_width.'&Height='.$var_height.'&Quantity='.$var_quantity);

(Note: The box in grey should be built into one line)

Example

The PHP codes may look like the following:

$qs .= 'Height='.$HTTP_POST_VARS["Height"].'&';
$qs .= 'Length='.$HTTP_POST_VARS["Length"].'&';
$qs .= 'Width='.$HTTP_POST_VARS["Width"].'&';
$qs .= 'Weight='.$HTTP_POST_VARS["Weight"].'&';
$qs .= 'Pickup_Postcode='.$HTTP_POST_VARS["Pickup_Postcode"].'&';
$qs .= 'Destination_Postcode='.$HTTP_POST_VARS["Destination_Postcode"].'&';
$qs .= 'Country='.$HTTP_POST_VARS["Country"].'&';
$qs .= 'Service_Type='.$HTTP_POST_VARS["Service_Type"].'&';
$qs .= 'Quantity='.$HTTP_POST_VARS["Quantity"]; .

back to top

 

 

ACCESSING THE RATE CALCULATOR ON AUSTRALIA POST EDELIVER WEBSITE

Post the following values to:

http://drc.edeliver.com.au/ratecalc.asp

Programs needs to perform an http request on this page with the following values

Pickup_Postcode=<string: 4 chars>
Destination_Postcode=<string: 4 chars>
Country=<string: 2 chars>
Weight=<integer>
Service_Type=<'STANDARD','EXPRESS','AIR','SEA','ECONOMY'>
Length=<integer>
Width=<integer>
Height=<integer>
Quantity=<integer>

 

back to top

 

GETTING THE RESULTS

When you execute the $myfile=file('http://drc.edeliver.com.au/ratecalc.asp?'.$qs); the results returned are placed into an array called $myfile. The name/value pairs of the results are returned on separate lines, so what you end up with is an array with three elements, which would look like:

charge=2.50
days=1
err_msg=OK

The last component contains error messages to inform customers they have made errors when entering the data (e.g. Invalid weight). Displaying the error helps to prompt customers to re-enter required information.

Displaying the results on your website

Depending on your Web page design, it is up to you how to display the results of the delivery charge estimation to your customers. You will be able to select what information you want displayed in a format you prefer.

You can use PHP's split ( ) function to retrieve the values returned.

Example

$x = split('=',$myfile[0])

This splits the first line into items separated by the '=' sign, resulting in an array called $x with values:

$x[0] = "charge" and $x[1] = 2.74

echo "The charge is $".$x[1];

Similarly, you are able to split on the next two lines ( $myfile[1] and $myfile[2] )

back to top

 

IF YOU ARE USING COLDFUSION VERSION 4…

If you use ColdFusion Version 4, apply the following codes in ColdFusion 4.

<CFHTTP URL="http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=#var_pickup
#&Destination_Postcode=#var_destination#&Country=#var_country#&Weight=
#var_weight#&Service_Type=#var_service#&Length=#var_length#&Width=#var_width#
&Height=#var_height#&Quantity=#var_quantity#" METHOD=GET RESOLVEURL=YES>

(Note: The box in grey should be built into one line)

Example

To retrieve the results from the Delivery Rate Calculator, apply the following codes in one single line:

<CFHTTP URL="http://drc.edeliver.com.au/ratecalc.asp?Item_ID=#i#&
Height=#item_h#&Length=#item_d#&Width=#item_w#&Weight=#weight#&
Pickup_PostCode=3000&Destination_PostCode=#postcode#&Country=AU&
Service_Type=Standard&Quantity=#skqty#" METHOD=GET RESOLVEURL=YES>
<cfset rateParam=CFHTTP.FileContent>
</CFHTTP>

Displaying the results on your website

Depending on your Web page design, it is up to you how to display the results of the delivery charge estimation to your customers. You will be able to select what information you want displayed in a format you prefer.

To show the delivery charge, number of days of delivery and error messages (this is to prompt your customers if an incorrect entry is made) on your Web site on separate lines, you can apply the following codes:

<CFSET startAt=FindNoCase("=", rateParam,1) + 1>
<CFSET endAt=FindNoCase(chr(13), rateParam,1) - startAt>
<CFSET charge=val(mid(rateParam, startAt, endAt))>
<CFSET rateParam=removechars(rateParam, 1, startAt + endAt + 1)>

<CFSET startAt=FindNoCase("=", rateParam,1) + 1>
<CFSET endAt=FindNoCase(chr(13), rateParam,1) - startAt>
<CFSET days=mid(rateParam, startAt, endAt)>
<CFSET rateParam=removechars(rateParam, 1, startAt + endAt + 1)>

<CFSET startAt=FindNoCase("=", rateParam,1) + 1>
<CFSET endAt=FindNoCase(chr(13), rateParam,1) - startAt>
<CFSET errStr=mid(rateParam, startAt, endAt)>
<CFSET rateParam=removechars(rateParam, 1, startAt + endAt + 1)>

back to top

 









© Copyright 2000 Australian Postal Corporation. All rights reserved.
You may not use or access the Australia Post website without prior acceptance of
Australia Post's Terms and Conditions and Privacy Statement. Use of this website constitutes your
acknowledgement that you have read the Terms and Conditions and Privacy Statement.
Read Terms and Conditions and Privacy Statement