Introduction to UPS Online Tools Joe Johnson – Solution Designer UPS Customer solutions joejohnson@ups.com New England Midrange Users Group (NEMUG) Seekonk, Massachusetts September 16, 2009 Trademarks belong to their respective owners. © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 1 1 Agenda Introduction to UPS Customer Solutions About the presenter The details about each tool How to get the tools How to get help with the tools Programming and XML Questions 2 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 2 Thanks to the New England Midrange Users Group and President Dick Ferrara for inviting the UPS Solution Group to your meeting. 3 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 3 UPS Solution Group Our Mission We help you leverage UPS’s expertise in the areas of engineering, technology, finance, and supply chain design by developing and implementing business solutions that contribute to your global supply chain success. 4 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 4 UPS Solution Group Engineering • Warehouse and Distribution Systems • Package Design and Test Lab Services • Fleet Services Information Technology • Visibility – outbound, inbound and returns • Customized integration • Paperwork reduction and process automation 5 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 5 Tonight's Presenter Joe Johnson • 32 years with UPS • First computer course in 1978 • PC experience since 1985 • Social networking since 1989 via modem, BBS, FIDO, Prodigy, CompuServe, etc. • First batch tracking application 1998 • MS in Internet Engineering in 2001 •http://www.linkedin.com/in/joejohnsonmsie 6 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 6 With Online tools, you can: • Improve Customer Service #1 = WISMO • Add Web Site Functionality • Increase Time on Your Site • Reduce Costs • Empower Buyers • Create your own solution your way 7 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 7 8 UPS Online Tools You Can Use Now • UPS Tracking • UPS Signature Tracking • UPS Rates and Service Selection • UPS Time in Transit • UPS U.S. Address Validation • UPS Shipping • UPS File Download for Quantum View™ • UPS TradeAbility™Web Services 8 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 8 UPS Tracking Tool • Basic HTML Version – Copy HTML code into your Web page to gain the functionality and look of UPS Tracking in local languages. This version is simpler but less flexible. • XML Tool Version – gives you greater flexibility by allowing you to format the tracking data to suit your Web site or application's design and layout – Create new internal applications or integrate Tracking data into your internal applications 9 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 9 UPS Signature Tracking • Proof of Delivery – enables your company to obtain the Proof of Delivery (P.O.D.) of goods often needed to collect on an invoice – Can be used to shorten the time between the sale and the collection of funds – Obtain P.O.D. of your goods with a digital signature and full delivery address in real time • Caviats – Only available for internal use by UPS Customers – Additional registration and license requirements 10 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 10 UPS Rates & Service Selection Tool • Compare Price • Compare Service options • Compare Time in Transit • Dynamically generate a list of shipping services tailored to your customers needs • Create or add UPS rate shopping to internal applications 11 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 11 UPS Time in Transit Tool • provide consistent, up-to-date shipping information based on the origin and destination addresses and the date the shipment is needed. • Plan and manage inventory levels by controlling when your company receives merchandise • Synchronize the arrival of multiple packages with different points of origin • Information includes the scheduled delivery date and time as well as the number of days in transit • Requires smaller request messages and produces faster and smaller response than Rates and Service Tool 12 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 12 UPS U.S. Address Validation Tool • Ensure that customer-entered shipping addresses for the United States are correct at the time of order . • More effectively check a customer's address, or provide suggested alternatives if an error is discovered • Improve customer service by assisting shoppers when they place orders. • When placing their online order, double-check their address for possible errors • This tool requires user interaction to maximize it’s benefits 13 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 13 UPS Shipping Tool • Build your own fully functional customized shipping solution • Provides feedback about rates, time in transit, available services and address validity prior to creating a label and manifesting the shipment. • Allows you to build shipping into your own custom workflow applications CAVIATS: • Minimum daily pickup of 50 packages • Limited to internal use; not for public website • Requires special registration and license process (Premium Tool) 14 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 14 UPS File Download for Quantum View™ • Automatically retrieve Quantum View files and import them directly into your back-end systems • Quantum View is a Web-based service that provides shipment manifest information, status updates and event alerts for your inbound and outbound packages • See the UPS packages sent by multiple vendors to receiving locations across your organization • Create your own schedule for downloading files, up to every hour 15 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 15 UPS TradeAbility™ Web Services • Estimate the landed cost of international shipments, including applicable duties, fees, taxes, and transportation costs • Single source to search for restricted trading parties or embargoed countries • Verify compliance of your import shipments with country-specific trade regulations, procedures, tariffs, laws, and administrative rulings • Proactively identify U.S. government export licensing requirements and exceptions. Caveat: • Only for UPS customers to facilitate their orders or internal processes 16 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 16 For more information on UPS OnLine Tools 1. Browse to UPS.COM http://www.ups.com 2. Find the Search box in the upper left corner of the page 3. Type “online tools” where it says search and click on the right facing arrow 17 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 17 How do I get my hands on the documentation? Part 1: 1. Find out your companies six digit shipper number and the zip code that number is registered under. The zip code you use when you reach the Provide Additional Information screen must match these numbers. 2. Navigate to myups.com http://www.myups.com 3. Download and read a copy of the UPS Technology Agreement General Terms and Conditions and End User Rights document http://www.ups.com/media/en/UTA_with_EUR.pdf 4. Create a myups.com account in your name 5. You will now look in the upper left hand menu for the link that says “Get Tools” and click on it or type “Get Tools” into the search box in the upper right corner of any page. 18 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 18 I’ve have the docs how do I begin testing? 1. It is assumed that you have created your own ups.com account, registered for the tools and completed the Additional Information Form. If you are having problems doing this please ask the person responsible for shipping to contact UPS and let his contact know you need help getting the OnLine Tools documentation. 2. You should read the Get UPS OnLine Tools Page then select any Standard or Premium tools you are interested in. You can’t see this page until you register for the tools. 3. Premium Tools will require you to talk to a UPS representative that will inquire about how you intend to use the tool to be sure it is appropriate for your purpose. Standard Tools documentation will be available for download immediately. 4. Read the documentation 5. Download an Access Key. Instructions for testing are in the documents 19 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 19 UPS OnLine Tools Basics – How are they consumed? 1 20 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 20 UPS OnLine Tools Basics – How are they consumed? 2 21 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 21 UPS OnLine Tools Basics – How are they consumed? 3 22 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 22 UPS OnLine Tools Basics – How are they consumed? 4 23 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 23 I need help. How do I reach support? No Phone support is available until you complete testing in the Customer Integration Environment. Prior to that e-mail support is initiated via a web form 24 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 24 More about the Customer Integration Environment (CIE) • The URL is in the documentation • This site is the test site. It is an exact match to the production environment; however it does not initiate actual UPS Business services and transactions • If you use the production URL’s you will be charged and you may cause a UPS driver to be dispatched • USE the CIE to avoid this problem • In the CIE you don’t have to be ashamed of your “Hello World” being answerd by a driver. 25 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 25 Keeping UP to Date • UPS will send e-mail notification of new features and updates • It is essential that an accurate e-mail address is maintained for your company • UPS recommends that you complete the secondary contact information when you register for the tools • You should update your profile when your responsibilities for the OnLine Tools shift within your company • In the CIE you don’t have to worry about your “Hello World” being answered by a driver. 26 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 26 UPS OnLine Tools Basics – What Development Tools? Possible Solutions • Toolbox for Java™ & JTOpen http://www-03.ibm.com/systems/i/software/toolbox/ • Develop in Java IDE’s – Google “JAVA IDE” • PHP – for example Zend Studio – IBM can bundle Zend’s PHP stack when it ships new i-series • Perl – See Perl Ports and the C-Pan http://www.cpan.org/ports/#os400 • Open Source – libcurl for communicating; xerces for XML processing 27 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 27 Hypertext Transfer Protocol (HTTP) Important tip; the content Type header must be; application/x-www-form-urlencoded © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 28 28 Secure Sockets Layer 3 (SSL) • All the UPS tools use SSL to protect the information transferred between UPS and our OnLine Tools customers • Because SSL and HTTP are so common most software development tools make using SSL easy • Most often you specify the use of SSL by including an SSL Library and use https in the URL 29 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 29 Visual Basic Code Snippet These samples are simplified and contain no exception handling. Production software should handle all exceptions. First create a reference to MSXML 30 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 30 Java Standard Edition and Enterprise Edition These samples are simplified and contain no exception handling. Production software should handle all exceptions. 31 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 31 Open Source 32 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 32 Extensible Markup Language (XML) • XML messages contain regular text, though that text follows specific rules that XML defines. • XMLdistinguishes different parts of a message with a label known as a tag. Tags like these <book>, <title>, <author>, etc. • A tag can indicate the start of information if it begins with an angle bracket (<), and a tag can indicate the end of information if it begins with an angle bracket and a slash (</). • A beginning tag, ending tag, and the information between the two make up an element. • Elements can be contained within other elements. For example: <book> <title>Easy Programming Methods</title> <author>Ben Casey</author> </book> © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 33 33 Good XML learning Sources • World Wide Web Consortium - http://www.w3.org/XML/ • XML tutorials – Quality and style vary look at a few • General beginners stuff •http://www.w3schools.com/xml/default.asp • http://www.tizag.com/xmlTutorial/ • IBM - http://www.ibm.com/developerworks/xml/ • AS/400 & XML – Google Search http://www.google.com/search?q=XML+Tutorials+as%2f400 34 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 34 Creating XML in Code VB6 Visual Studio Create processing instruction and add a child node using DOMDocument object <?xml version=“1.0” encoding=“UTF-8 ?> 35 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 35 Creating XML in Code VB6 Visual Studio 2 <?xml version=“1.0” encoding=“UTF-8 ?> <book> <author> <firstname>Stephan</firstname> <lastname>Thomas</lastname> </author> </book> 36 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 36 Creating XML in Code Java with JDom Credit to codejava.org link JDOM website http://www.jdom.org/ Import org.jdom.Document import org.jdom.Element; import org.jdom.output.XMLOutputter; import java.io.FileWriter; import java.io.IOException; public class JDomCreatingXml { public static void main(String[] args) { <?xml version=“1.0” encoding=“UTF-8 ?> <book> <author> <firstname>Stephan</firstname> <lastname>Thomas</lastname> </author> </book> Document document = new Document() Element root = new Element("book"); // Creat a child for the root element and set the text Element child = new Element("author"); child.addContent(new Element("firstname").setText("Stephan")); child.addContent(new Element("lastname").setText("Thomas")); // Add the child to the root element and add the root element as // the document content. root.addContent(child); document.setContent(root); } © Copyright United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are } 2009 trademarks of United Parcel Service of America, Inc. All rights reserved. 37 37 Reading XML in Java with JDom link Credit to codejava.org import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import java.io.ByteArrayInputStream; import java.io.IOException; <?xml version=“1.0” encoding=“UTF-8 ?> <book> <author> <firstname>Stephan</firstname> <lastname>Thomas</lastname> </author> </book> public class ReadXmlDocument { public static void main(String[] args) { // Create an instance of SAXBuilder SAXBuilder builder = new SAXBuilder(); // Tell the SAXBuilder to build Document object from the InputStream Document document = builder.build(new ByteArrayInputStream(data.getBytes())); // Get our xml documen root element which equals to the <root> tag Element root = document.getRootElement(); // Get the authors first name String authorFirstName = root.getChild("book") .getChild("author") .getChild("firstname") .getText(); System.out.println(authorFirstName) } } © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 38 38 Documentation Format 39 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 39 Documentation Format Example <AccessRequest xml:lang="en-US"> <AccessLicenseNumber>ACCESSLICENSE#HERE</AccessLicenseNumber> <UserId>typeyours</UserId> <Password>typeyours</Password> </AccessRequest> <?xml version="1.0" encoding="UTF-8"?> <TimeInTransitRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>03431-E1V2B9</CustomerContext> <XpciVersion>1.0002</XpciVersion> </TransactionReference> <RequestAction>TimeInTransit</RequestAction> </Request> <TransitFrom> <AddressArtifactFormat> <PoliticalDivision1>NH</PoliticalDivision1> <PoliticalDivision2>KEENE</PoliticalDivision2> <CountryCode>US</CountryCode> <PostcodePrimaryLow>03431</PostcodePrimaryLow> </AddressArtifactFormat> </TransitFrom> <TransitTo> <AddressArtifactFormat> <PoliticalDivision1>AB</PoliticalDivision1> <PoliticalDivision2>Calgary</PoliticalDivision2> <PostcodePrimaryLow>E1V2B9</PostcodePrimaryLow> <CountryCode>CA</CountryCode> </AddressArtifactFormat> </TransitTo> <ShipmentWeight> <UnitOfMeasurement> <Code>KGS</Code> <Description>Kilograms</Description> </UnitOfMeasurement> <Weight>23</Weight> </ShipmentWeight> <InvoiceLineTotal> <CurrencyCode>USD</CurrencyCode> <MonetaryValue>250.00</MonetaryValue> </InvoiceLineTotal> <PickupDate>20070908</PickupDate> <DocumentsOnlyIndicator/> </TimeInTransitRequest> © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 40 40 Thank You 41 © Copyright 2009 United Parcel Service of America, Inc. UPS, the UPS brand mark and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. 41