Locations

Updated on · 4 min read

There are two ways you can add Parcelpoint locations to your checkout or returns page:

  1. Location Widget
  2. Location File Feed (CSV) (Not available for Pickup Address)

The location widget is the fastest and easiest way to display the Parcelpoint locations on your website, allowing customers to search and select their preferred location at checkout or on the returns page.

The widget can easily be customised (via CSS) to align to your website look and feel.

Example of the widget on desktop
Example of the widget on mobile

For the widget to function correctly, you must obtain a Google Maps API Key. Parcelpoint can not provide any Google API Keys.

Adding the script

To get started, include the following script tag on your checkout or returns page just before the </body>:

Production
<script type="text/javascript" src="https://widget.parcelpoint.com.au/widget/v3.1/stores"></script>

Staging
<script type="text/javascript" src="https://widget.staging.parcelpoint.com.au/widget/v3.1/stores"></script>
Parcelpoint widget script

Displaying the widget

Next, create a HTML element in the part of the page you want to display the widget:

<div id="parcelpoint-widget"></div>
Example HTML element

When your ready to initialise the widget, call parcelpoint.Store.init :

parcelpoint.Store.init({
    apiKey: "your-parcelpoint-api-key",
    initialAddress: '105 Kippax Street, Surry Hills, NSW 2010',
    targetDiv: "parcelpoint-widget",
    storeType: "full",
    initialView: "map",
    selectFirstStore: true,
    yourLocationMarker: true,
    features: ["CCF"],
    googleAPIKey: "your-google-api-key"
});
parcelpoint.Store.display();
Parameter Type Required Description
apiKey String Yes To get an apiKey you can email us to request one
initialAddress String Yes The address you want the widget to select when loaded
targetDiv String Yes The id of the parent element the widget will render inside
initialView String Yes The default view type on load. Th view types are "map" and "list"
selectFirstStore String Yes If true the nearest store to the initialAddress will be selected by default
yourLocationMarker String Yes If true a pin will be dropped at the user's location on the map
features Array Yes Display stores that accept a particular Parcelpoint service. See Features table below.
googleAPIKey String Yes Your Google API Key used to display the map on the widget.

Features

Not all locations offer all of Parcelpoint's services, and therefore need to be filtered out when offering to these services to customers. Below are a list of parameters you can use within the initialisation code to filter these locations.

Product Parameter
Pickup Address Leave blank
Pickup Freight CCF
Returns RETURNS

Location File Feed (CSV)

Alternatively you can create your own Parcelpoint widget using the Parcelpoint design guidelines. However this File Feed is not available for Pickup Address services. Request Access

Every day, Parcelpoint will upload a CSV file to a specified SFTP/FTP containing a list of all Parcelpoint agents, their opening hours and addresses.

Parameter Required Description
hostname Yes The hostname of the SFTP to upload too. This can be in the form of an IP address or URL. eg. 192.168.0.293 or sftp.retailer.com
username Yes The username used to connect to the SFTP/FTP
password Yes The password used to connect to the SFTP/FTP (for the username above)
protocol Yes This is required if you have any special protocols as part of your FTP connection
folder Yes The folder that the store feed should be uploaded to (using a relative URL eg. integrations/parcelpoint/agent)
options No SFTP/FTP additional options eg. Passive Mode

The file will be uploaded using the following naming convention in CSV file format:

ParcelPoint_Active_PUDO_List_{retailerName}-YYYYMMDD
Parameter Type Max Char Description
Agent Name string 100 PUDO store name always suffixed with 'ParcelPoint' e.g. Easy Mini-Market ParcelPoint
ID String - Parcelpoint store's identification. This is made up of an Australian Postal Code and a two digit store number ranging from 01 to 99. eg. 2010-22
Street String 100 Parcelpoint store's Street address e.g. Shop 2A, 17-19 Foveaux Street
Suburb String 55 Parcelpoint store's suburb eg. Surry Hills
State String 3 Parcelpoint store's state e.g NSW, VIC, QLD, WA
Postal Code String 4 Parcelpoint store's postal code e.g. 2010
Latitude Number - Parcelpoint store's latitude e.g. -33.8842435
Longitude Number - Parcelpoint store's longitude e.g. 151.206471
Mon Opening Hrs String - Monday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Mon Closing Hrs String - Monday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Tue Opening Hrs String - Tuesday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Tue Closing Hrs String - Tuesday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Wed Opening Hrs String - Wednesday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Wed Closing Hrs String - Wednesday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Thu Opening Hrs String - Thursday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Thu Closing Hrs String - Thursday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Fri Opening Hrs String - Friday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Fri Closing Hrs String - Friday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Sat Opening Hrs String - Saturday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Sat Closing Hrs String - Saturday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day
Sun Opening Hrs String - Sunday opening hour (24 hour format) e.g. 0800 Opens at 8AM; Closed = Closed all day
Sun Closing Hrs String - Sunday closing hour (24 hour format) e.g. 2000 Closes at 8PM; Closed = Closed all day

When a customer selects a Parcelpoint location, the location data (e.g. delivery address for a Pickup order) can be obtained via JavaScript code listening to widget events. This can be used to automatically fill out the checkout form on the customer’s behalf, leading to a better checkout experience.

parcelpoint.Property.onChange(["storeDetails"], function(key, value) {
    let storeId= value['storeId'],
    addressLine1 =  value['storeAddress1'],
    addressLine2 =   value['storeAddress2'],
    city =   value['storeCity'],
    state =   value['storeState'], 
    postcode =  value['storePostCode'];
});