Trace Id is missing
September 28, 2017

UPS paves the way for better service with faster development and artificial intelligence

The age of artificial intelligence (AI) is upon us. UPS, a long-time IT innovator, is already laying the groundwork to improve customer service with intelligent applications that deliver relevant, seamless experiences to its customers on virtually any device. To accomplish this goal and increase the efficiency of IT staff, UPS recently completed two transformative projects. One initiative—a faster, consolidated version of the UPS Mobile app—has improved customer experience and nearly halves the amount of code, compared with the previous platform-specific versions. Developers quickly brought the app to market using Visual Studio Tools for Xamarin. The second initiative improves service levels via a chatbot called UPS Bot, which runs on the Microsoft Bot Framework and Azure. Customers can engage UPS Bot in text-based and voice-based conversations to get the information they need about shipments, rates, and UPS locations. 

United Parcel Service UPS

Every day, UPS delivers more than 19 million packages in more than 220 countries and territories. To help ensure the best possible customer experience, UPS also invests more than $1 billion every year in innovative technologies that help streamline operational efficiency and give customers more insight and control over their shipments. For the past few years, UPS customers have been able to answer many of their own questions—such as pricing or when a shipment will arrive—using the UPS Mobile app on their tablets and smartphones. Recently, UPS dramatically increased developers’ productivity by rewriting its platform-specific mobile app using Visual Studio Tools for Xamarin. To give customers another way to interact with UPS, the company also created the UPS Bot, powered by the Microsoft Bot Framework and Azure.

Different device platforms meant double the work

UPS manages more than 192 million customer-tracking requests each day, many with its UPS Mobile app. To ensure that customers get the information they need regardless of their device type, the company’s developers had to write and maintain multiple versions of UPS Mobile, including an Android version in Java and an iOS version in Objective-C. This disparity meant twice the work for UPS’s mobile developers—in both initial development and ongoing maintenance. Plus, the repeated effort resulted in multistage app updates, so customers using different types of devices didn’t always have access to the latest features at the same time.

Ted Damianos, Senior Application Development Manager in Internet Systems at UPS, says, “Historically, mobile app development has been a fragmented process, and we’ve all hoped for tooling that we could use to avoid that fracture between code bases. Because of the extra work it took to push new features across multiple device platforms, we were falling behind in our development schedule. A few years ago, several tools started to show some real promise for consolidating our code base. Among them was Visual Studio Tools for Xamarin.” 

Sharing code for faster time-to-market

To test the viability of migrating its two platform-specific app versions to one language and development platform, UPS engineers held a bake off. Visual Studio Tools for Xamarin was the only platform mature enough to support the consolidation of UPS’ mission-critical application, allowing developers to share one C# code base across platforms and deliver fully native apps to its customers. “Compared with the other tools we’ve looked at, we have a higher rate of code reuse with Xamarin,” says Damianos. “It also provides better integration with devices’ native services, including their unique hardware and capabilities. This is important, because even though we can write a lot of shared code, we still need to write some device-specific code. Mobile device platforms manage things—like notifications, taking input from sensors, and managing contacts—in different ways.”

In addition, by adopting Visual Studio Tools for Xamarin, the mobile development team could write the app in C# using Microsoft Visual Studio and the .NET Framework, which are all technologies that other UPS development teams use. Plus, it’s easy to find developers with these skillsets, because C# and .NET are used extensively by global organizations.  

Making the leap and rebuilding 130,000 lines of code

Although Visual Studio Tools for Xamarin provided a pathway for consolidating code and reducing complexity, UPS still weighed the decision of migrating its highly reliable mission-critical app to a different environment and language. Damianos explains, “UPS Mobile had more than 130,000 lines of code, written over more than four years. Trying to replicate that amount of functionality in a completely new mobile development platform would be a phenomenal undertaking. Our new application would need to support everything that the old versions did from day one, plus additional features, with the same performance and reliability.”

However, in the long run, UPS would realize dramatic time and cost savings by rewriting UPS Mobile. “Being able to develop a vast amount of Xamarin code, most of it only once, that serves multiple platforms is a great efficiency benefit for years to come,” explains Michele Ivy, Director of Customer Technology in Internet Systems at UPS. “But the business and technology groups had to agree that we’d slow down developers’ efficiency in the short term, so we could significantly increase it in the long term by making that migration leap to one mobile app development platform.”

Partnering with experts to train platform-specific dev teams

UPS decided to have its existing mobile app developers rewrite all versions of UPS Mobile with Visual Studio Tools for Xamarin, even though they were unfamiliar with the tools and C#. “Bringing in new people and teaching them about UPS Mobile from a functional and platform-specific perspective is a daunting task,” says Damianos. “Training our Java and Objective-C developers in Xamarin was the fastest time-to-market approach.”

One reason behind the steep learning curve was that UPS started its project before Microsoft acquired Xamarin. And as an emerging technology, there were few experts who could help. Scott Hildebrand, Applications Development Manager at UPS, says, “We were literally ahead of the market, so we initially had to train ourselves. Later, when Microsoft acquired Xamarin, we engaged Microsoft Services and Xamarin Client Services. At that point, we were working on hardening our product. Working with consultants was critical in helping us deploy a Xamarin-based app that runs on several thousand different device models across two form factors—and is as stable, or more stable, than our legacy versions.”

Accelerating the efficiency of a distributed international team

To boost efficiency, the UPS Mobile app development team, who work across three US states and India, use Visual Studio and Microsoft Team Foundation Server (TFS), along with Visual Studio Tools for Xamarin. Damianos says, “Early on, it wasn’t clear whether Xamarin Studio or Visual Studio (on Windows) provided better tooling. In time, it became clear that Visual Studio Tools for Xamarin is the better way for us to access the Xamarin platform. We can take advantage of its features to help developer productivity including sharing code and managing platform-specific capabilities in a very organized way with Team Foundation Server.”

New features across devices in weeks or days—versus months

Eight months after its migration decision, UPS released the new version of UPS Mobile and retired its standalone Java and Objective-C versions. Damianos says, “It may have taken us a little longer to get to where we are than we wanted, but we’re there now. And today, we’re in a better position to deliver value for the business and contain costs. With Visual Studio Tools for Xamarin, we can add a new feature across all devices in weeks or days. In the past, it would take us months to achieve feature parity.”

Paving the way for a new form of customer interaction with AI

As mobile app developers were wrapping up their work on the new apps, a different UPS development team decided to embark on an AI project. It complements UPS Mobile, particularly the app’s My Choice functionality, which customers use to customize the delivery process for their packages and to see when they’ll arrive. Kumar Athreya, Senior Applications Development Manager of Shipping Systems at UPS, says, “We first learned about the Bot Framework when Microsoft unveiled the technology at its 2016 Build conference. Using a bot to engage with customers was a fascinating idea, and we wanted to be early adopters.” 

The engineers’ vision was to create a bot—or a robotic service representative—that customers could engage using text or voice commands via social media channels, mobile devices, and emerging virtual assistants, like Amazon’s Alexa. They also envisioned integrating the bot with My Choice to give customers another avenue for accessing their customized service settings. 

Boosting development efficiency with one shared platform

Because the Bot Framework was the only available bot-specific development platform, UPS couldn’t hold a bake off to compare it with other tools. However, building its bot on the Microsoft platform made strategic sense, because developers could use C#, Visual Studio, and TFS—the same tools used for creating UPS Mobile. “My team is already familiar with Visual Studio and C#,” says Athreya. “And like other groups at UPS, we also use TFS for defect management, source control, and agile project management. Another tool we really like in the Bot Framework, though, is the emulator. With it, we can test our bot’s functionality and channels to make sure they work before we release anything into production.”

In addition, like Visual Studio Tools for Xamarin, the Bot Framework is designed to reduce redundant efforts and increase productivity. Katie Duffy, Application Architect at UPS, says, “With the Bot Framework, we can build once and deploy to multiple channels by making just a few configuration changes.”  

Building a chatbot in a few weeks

Engineers immediately started working on a prototype. To learn how to use the Bot Framework and the Microsoft Language Understanding Intelligent Service (LUIS), they referred to online documentation and videos. In particular, the team needed LUIS because it gives UPS Bot the ability to recognize requests—or utterances—such as tracking a package. After recognizing a request, UPS Bot automatically takes the appropriate steps—or intents—to fulfill them. LUIS’ built-in machine-learning capabilities mean that the more customers interact with the bot, the better it can map utterances to intents. “Within five weeks, we had developed a chatbot prototype with the Microsoft Bot Framework,” says Athreya. “We presented it to various levels of management. Our Chief Information and Engineering Officer loved it and asked that we get a version into production in just two months so it would be ready by the start of our peak season in November 2016, and that’s just what we did.”

Saving time and money with Azure

To accelerate time-to-market, UPS selected platform-as-a-service (PaaS) offerings in Microsoft Azure to build the bot. “In the past, it could take weeks or even months to provision new hardware, particularly before peak shipping season,” explains Duffy. “But with the cloud, we could instantly get the infrastructure we needed. Azure was the logical choice for us, given how it’s already integrated with the Bot Framework, and we could also take advantage of services for free telemetry monitoring. Plus, with platform as a service, our infrastructure will automatically scale up and out, globally, to accommodate any increase in future volumes—and we don’t have to over-provision.”

What powers the UPS bot?

Today, UPS Bot runs on the following Azure services:

  • Application Insights, for collecting and analyzing data about customers’ interactions with the bot, including response times and metrics about CPU, memory, and storage usage. UPS also configures automated alerts, so support personnel receive email notifications about any issues with the bot.
  • Blob storage, for retaining log files to help the UPS team identify user intents and utterances and get insight into how customers use the bot.
  • Storage Service Encryption (SSE) for Data at Rest, so data in blobs is protected from unauthorized access.

Starting out with the basics

Because its chatbot is a completely new kind of IT solution, UPS built the first release to recognize a limited number of utterances in just one language, English. That way, engineers could gauge customer interest and identify what capabilities are most interesting to customers. Today, anyone can access UPS Bot from Facebook Messenger and Skype. “People can track shipments, determine shipping costs within the US, and find UPS locations with our bot,” says Duffy. “It answers some basic trivia about UPS, such as who our founder is, and it will also give you UPS’s stock price.” When a person asks a question about a UPS location via Skype and Facebook, UPS Bot uses the Bing Maps API for Enterprise to respond with a map of relevant store sites.

Three months to transform an idea into a bot that’s had 200,000 conversations

UPS released its chatbot to the public a little more than three months after it became an idea. It’s been eight months since the initial release and, already, UPS Bot has had more than 200,000 conversations with UPS customers. To identify and prioritize new features for the bot, developers and business teams are analyzing which channels customers use to access UPS Bot. They are also monitoring usage trends, common customer requests (or utterances), and how well the bot responds. “Conversation as a platform is the future, so it’s great that we’re already offering it to our customers using the Bot Framework and Azure,” says Duffy. “Even though we’re just getting started with our bot, we believe we are the first in the shipping industry to offer this type of technology on social media, which is significant for us. In addition, the ability to write code once and have that code execute across multiple platforms and digital channels is a tremendous gain in efficiency for our developers. This is critical for us to continue innovating global package delivery services with technologies like UPS Mobile and UPS Bot.”

Explore and learn more about the Visual Studio Tools for Xamarin and the Bot Framework.

“Today, we’re in a better position to deliver value for the business and contain costs. With Visual Studio Tools for Xamarin, we can add a new feature across all devices in weeks or days. In the past, it would take us months to achieve feature parity.”

Ted Damianos, Senior Application Development Manager, Internet Systems, UPS

Take the next step

Fuel innovation with Microsoft

Talk to an expert about custom solutions

Let us help you create customized solutions and achieve your unique business goals.

Drive results with proven solutions

Achieve more with the products and solutions that helped our customers reach their goals.

Follow Microsoft