At first glance, you might think that the e-commerce revolution would be a big threat to Macy's (NYSE:M). After all, department stores are "so 20th century"! While (NASDAQ:AMZN) hasn't entirely figured out fashion yet, it is definitely working on disrupting the fashion business that is the cornerstone of department stores.

Yet Macy's has quietly found ways to make the e-commerce revolution work in its favor. Macy's stopped reporting online sales separately this year, but in 2012 online sales grew by an astounding 41%! (That's significantly faster than Amazon's growth.) Furthermore, Macy's foray into e-commerce is even boosting its brick-and-mortar sales. This reinvention of the Macy's business model is one of the biggest retail turnaround stories of the last decade.

The "omnichannel" sales strategy
Among retailers, Macy's has been the most vocal proponent of an "omnichannel" strategy in recent years. That simply means that Macy's tries to align its in-store and online product assortments in order to complement one another.

This may not seem like much, but at J.C. Penney (OTC:JCPN.Q), the in-store and online product assortments were curated separately until recently, allowing few if any synergies between the two halves of the business. That's been one major element in J.C. Penney's recent struggles.

The omnichannel strategy has two main purposes. First, Macy's wants to give customers who see something online an opportunity to look at it in-person at their local Macy's store before buying. Second, Macy's wants to have additional sizes and colors available online for items in the stores. That way, if a customer cannot find the right size or color, it will be easy to order the proper item from the website.

The omnichannel strategy's success is the main reason that Macy's no longer reports online sales. The blurring of the lines between online and in-store made the distinction less meaningful. For example, one customer might come into a store to buy something but then order the item in a different color from her smartphone (while still in the store). Another might see an item online but then come into the store to buy it. Macy's goal is to allow customers to seamlessly move between the two channels.

The store as distribution center
An even more interesting initiative for Macy's is its decision to fulfill some online orders from its stores. While it might seem more efficient to centralize this fulfillment in dedicated warehouses (as Amazon does), there are some surprising benefits to in-store fulfillment.

Most notably, by using stores as mini-distribution centers, Macy's can put more inventory in the stores than it could otherwise justify. This allows Macy's to have better fashion assortments, especially in smaller stores, which drives in-store sales. The excess inventory that can't be sold in the store is then available to fulfill online orders. Macy's strong online performance is thus giving the brick-and-mortar business a leg up.

Foolish bottom line
Whereas J.C. Penney has been crushed by a series of management missteps and a failure to embrace an "omnichannel" selling strategy, Macy's has made the most of the e-commerce revolution. By closely aligning inventory in stores with online inventory, Macy's can make the two parts of its business work together.

This has helped to insulate Macy's business from the "Amazon" threat: even allowing Macy's to grow its online sales more rapidly than Amazon in recent years. Most important, by embracing e-commerce rather than viewing it just as a threat, Macy's may have given its traditional brick-and-mortar business a new lease on life.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.