When United Parcel Service Inc.  Chief Executive David Abney bought his first book from Amazon.com Inc. about 15 years ago, e-commerce seemed no more complicated than ordering from a catalog. "Pretty basic," he says.
Online sales have mushroomed since then into a huge business for the package-delivery company—and a big problem.
Because of the ubiquity of free shipping, fierce competition from other delivery services and Amazon's power to drive down shipping costs as it gets even more enormous, UPS's average revenue on each Internet-related package it handles is dropping.
Even though net income last year was the highest ever at UPS, profit margins on deliveries in the U.S. have been flat for three years, a sign that online sales aren't helping the bottom line as much as they used to. UPS also has lost market share in e-commerce shipments. According to shipment-tracking software developer ShipMatrix Inc., UPS delivers about 42% of e-commerce goods, down from the company's estimate of 55% in 1999.
New UPS CEO David Abney. Associated Press
The numbers add up to one of the biggest challenges in the company's 108-year history. Under Mr. Abney, a 59-year-old UPS lifer who took over as CEO on Sept. 1, the company is trying to squeeze costs out of its sprawling delivery network and drum up more revenue. UPS is under more pressure than FedEx Corp. and the U.S. Postal Service because UPS is the biggest e-commerce carrier and its two rivals dived into the business later with narrower strategies.
In the most extensive interview since UPS announced his promotion in June, Mr. Abney said the rise of e-commerce "has challenged some of our traditional ways of doing business," changing how the Atlanta company dispatches drivers, loads trucks and earns money.
From now on, he says, UPS must slash its costs on e-commerce shipments at a faster rate than the continuing decline in average revenue. Next year, UPS will start charging by the size of ground shipments rather than weight alone, effectively raising prices.
"We are the world's leading transportation company, and we absolutely are going to advance our position," Mr. Abney predicts.
Some investors and analysts aren't so sure. They say the trends that are hurting UPS have been growing for too long and might be too strong to reverse. The company's shares stumbled in July, partly on concerns about its e-commerce strategy. Since an initial public offering in 1999 that was then the largest in U.S. history, UPS's stock price has nearly doubled, outperforming the Dow Jones Industrial Average but trailing FedEx's gain of more than 200%.
The competition isn't just FedEx anymore. Google Inc. is teaming up with retailers like Target Corp. to offer same-day delivery in Manhattan, Los Angeles and San Francisco. EBay Inc. picks up orders at stores and delivers them the same day or next day. Ride-sharing service Uber Technologies Inc. is experimenting in Washington, D.C., with same-day deliveries of about 100 items, including batteries, shaving gel and gum.
Even the U.S. Postal Service is getting more aggressive, slashing prices to attract big e-commerce companies in time for the holidays. The post office is testing grocery deliveries for Amazon in San Francisco and delivers other Amazon shipments on Sundays in more than 20 metropolitan areas.
The biggest new threat of all could come from Amazon itself, which recently began making some deliveries to consumers in San Francisco, Los Angeles, New York and elsewhere. Amazon has said it expects the burgeoning delivery network to eventually "revolutionize how shipments are delivered to millions of customers."
"Longer term, can these guys make any money on e-commerce?" asks David Vernon, a transportation analyst at research and brokerage firm Sanford C. Bernstein, about UPS. Growth in revenue per shipment has slowed dramatically in the past two years from nearly 2% on average annually over the previous decade.
UPS executives aren't panicking about the problems. E-commerce in the U.S. still generated more than $11 billion in revenue for UPS in 2013, Mr. Vernon estimates, or about 21% of the company's overall revenue of $55.44 billion. UPS got even more revenue from its international operations.
"If you're leading, you can't be anything better than No. 1, but you can increase your lead," says Mr. Abney, who embodies the can-do spirit woven into the company's culture for decades. Born in Mississippi, he started his UPS career as a part-time loader while a student at Delta State University.
Then he drove a UPS truck in Pascagoula, Miss., and began a slow but steady climb through the company's promote-from-within management ranks. Mr. Abney was jarred by what he remembers as his first foreign job assignment: a move to New Jersey in 1988. Looking back, he says he is glad UPS took "me out of my comfort zone at times."
According to the U.S. Census Bureau, e-commerce sales totaled $283 billion in the year ended June 30—up from $138 billion five years ago and $64 billion a decade ago. In the second quarter, an estimated 5.9% of all retail sales in the U.S. came from e-commerce, compared with 3.6% in 2009 and 1.9% in 2004.
Without UPS, there would be no e-commerce boom as we know it today. In the late 1990s, UPS was the only company with enough geographic reach, brown trucks, engineering skill and technological know-how to connect up-and-coming Internet merchants to businesses and consumers across the U.S.
In 1998, as much as 85% of e-commerce purchases were shipped between businesses. Many package-delivery executives expected the trend to last. They thought UPS would get another boost from consumers willing to pay extra for speedy overnight deliveries of Internet purchases.
But along came Amazon, which helped convince a generation of Americans to buy even humdrum household items like diapers and toiler paper online rather than at the store. Over the past decade, the consequences have gradually pecked away at UPS's control.
On residential UPS routes, as much as one-third of all deliveries are Amazon shipments, drivers say.Associated Press
UPS drivers who used to drop off several heavy packages a day at one retailer now make several stops scattered across a neighborhood, delivering one lightweight package per household. The shift requires more fuel and more time, increasing the cost to deliver each package.
Last Christmas season, nearly 60% of all U.S. deliveries by UPS were e-commerce packages to consumers, compared with about 40% for all of 2012. UPS hasn't disclosed what percentage of peak-season deliveries in 2012 were online purchases.
What changed? Free shipping.
In 2000, Amazon introduced free shipping on orders of more than $100. Other retailers followed. "Free shipping was basically a gimmick to gain market share," says Rick Jones, a former UPS executive who now is president and chief executive of regional package-delivery company Lone Star Holdings LLC.
The gimmick was widely expected to fade away. Instead, Amazon introduced in 2005 its Amazon Prime unlimited shipping membership, with free two-day delivery of all orders for an annual fee of $79.
Alan Gershenhorn, UPS's chief commercial officer, says online retailers figured out that shoppers would rather go to the mall than pay an extra $5 in delivery costs for the same item online. So free shipping took off.
Last year, Amazon had sales of $74.45 billion, nearly quadruple the Seattle company's 2008 sales of $19.17 billion. At UPS, though, revenue in the U.S. package-delivery business rose just 9% to $34.07 billion in the same period.
UPS had net income of $4.37 billion last year, compared with $274 million at Amazon. Yet Amazon's growth gives it muscle to drive a hard bargain with delivery providers. Five former UPS or FedEx executives say they are aware of pricing negotiations where Amazon used its leverage to pit the two companies against each other—and drive down prices.
Last winter, FedEx's volume of packages from Amazon suddenly declined by an annual rate of 50 to 60 million, analysts estimate. FedEx has said its no-frills Smartpost delivery service suffered an 8% volume decline because of "changes in shipping patterns from one large customer," without confirming that Amazon is the customer.
UPS gained at least some of the shipments, but the extra packages went to the company's Surepost operation, where rates are far lower than the traditional UPS ground-delivery network.
Amazon's overall shipping-related spending last year was equal to 9% of its total sales, down from 15% in 1999, securities filings show.
In 2013, UPS delivered about 182 million Amazon packages, or 30% of the total, with the rest divided among the Postal Service, FedEx and other carriers, Sanford C. Bernstein analysts estimate.
UPS's haul includes much of Amazon's two-day-delivery Prime business. Drivers on residential routes say as much as one-third of their truck can be filled with Amazon packages on any given day.
"If they're making 5%, I'd be amazed," a former senior FedEx executive says about UPS's profit margin on Amazon Prime shipments. UPS and Amazon declined to comment.
UPS raises prices an average of 3% to 5% a year, but big customers like Amazon often negotiate around the published rates, which primarily affect small businesses and consumers. Home deliveries are hit with fuel and residential surcharges.
The pricing pressure is likely to get worse as everything from do-it-yourself supply-chain planning to order-it-now delivery and same-day courier services at the touch of a smartphone invade UPS's territory.
In UPS's hometown, a 6-month-old service called Kanga enables users of the company's app to place a bid for a car or pickup truck to "move anything, anywhere, anytime." "Kanga can step in for the last mile," says the company's co-founder and CEO, Everett Steele.
Mr. Abney, who was UPS's chief operating officer for seven years before succeedingScott Davis as CEO, says the e-commerce challenges are "the opportunity of this generation of UPS-ers." The company is tackling the problems much as it always has: with lots of analysis, planning and technology.
For example, when UPS was overwhelmed just before Christmas by a pileup of online shipments at its massive sorting facility near Louisville International Airport in Kentucky, including hundreds of trailers filled with Amazon orders, Mr. Abney convened a cross-section of top executives.
The mess was an especially embarrassing and costly reminder of UPS's struggles to deal with the boom in online shopping and free shipping.

    At the meeting, executives invoked the "constructive dissatisfaction" mantra of UPS founder James E. Casey. He started the firm as a bicycle-messenger service in 1907 and relentlessly pressed employees to improve themselves and the company. "There was a hard sense of urgency," Mr. Abney says of the meeting.
    One of the first decisions was to increase spending on new technology and extra manpower by 21% to $2.5 billion in 2014. If the spending pays off this peak season, it also could help UPS charge more for holiday shipments in the future, analysts say.
    Other efforts aimed at boosting revenue and cutting costs include a pricing change in January that will encourage UPS customers to use boxes that fit the items being shipped, freeing up space in trucks for additional deliveries, or else pay extra. More packages will be sorted at higher speeds.
    UPS also is counting on major savings from a route-optimization system called Orion. It analyzes millions of pieces of data to predict the most efficient way to deliver and pick up packages along each driver's route. Every mile cut will save the company $50 million a year, with nearly half of UPS's delivery routes in the U.S. using Orion by 2015.
    More than 10 million customers have signed up for My Choice, a service that alerts them the day before a home delivery is set to arrive, provides an estimated delivery time and lets customers tell the driver where to leave the package. For $5 per package or $40 a year, customers can change a delivery address or pick a new delivery date.
    Anytime UPS can avoid missed deliveries, that is "real meaningful dollars for us," Mr. Abney says. In the second quarter, UPS's average cost to deliver each package in the U.S. slipped 1.7% from a year earlier, but revenue fell 2%.