TaskCentre’s Web Service Connector Tool can be used to automate calls to any of the collection of web services provided by UPS. These web services enable the automation of a broad range of delivery tasks including package shipment, freight shipment and shipment tracking. More information about the capabilities and usage of these web services, including XML request schema documentation, can be found on the UPS Developer Kit website at https://www.ups.com/upsdeveloperkit. The full list of UPS services currently supported is as follows:
- Package shipment (including voiding)
- Package rating
- Package pickup
- Freight shipment
- Freight rating
- Freight pickup
- Tracking (including signature tracking)
To simplify the configuration of the Web Service Connector Tool for use with these services, we provide ready-made connection files which can be imported straight into the tool. These are located in our Partner Area. To import, simply open the Web Service Connector Tool global configuration dialog and click the Import button.
Locate the desired connection file (with a .tcwx extension) and click Open. You will be presented with a dialog box like the one seen in the screenshot below, into which you should enter the API license access key, username and password supplied to you by UPS. If you do not have these details, you will need to obtain them by first opening an account with UPS at http://www.ups.com/, and then requesting an API license access key at https://www.ups.com/upsdeveloperkit.
All of the UPS web services require authentication credentials to be included with each service request. These are placed within the UPSSecurity node of the XML request schema under the UsernameToken and ServiceAccessToken sub-nodes. The API license access key, username and password that you entered on importing the connection file will be available as constants for the current step in the Task Browser window. These constants can be used as the values for Fixed/Dynamic Data items in the mappings pane, as shown below.
The UPS web services provide a customer integration (testing) environment in addition to the production environment. When you first import one of the web service connections, it will be configured to connect to the testing environment, which is hosted at www.cie.ups.com.
You can confirm this in the connection settings dialog, as shown below. In order to switch to the production environment when your Task is ready to go live, you will need to override the web service URL, replacing the domain part of the URL with onlinetools.ups.com, as shown below.
Handling Encoded Data
Files such as label images are returned from the UPS web services encoded in Base 64 format.
The following article from our knowledge base describes how to decode files returned in this format: VB Script for encoding file contents into Base64 Encoded