The Apple store at Garden State Plaza in Paramus, N.J.

Apple did it.

Amazon’s close. So is Google-parent Alphabet.

But just how does a company earn a $1 trillion market capitalization? And do any retailers have a chance?

As it made its way to a 13-digit valuation, Apple understood better than most the value of the consumer experience.

In its stores, Apple fused digital and physical retail before “omnichannel” became a buzzword. Apple’s take on shopping, which launched in 2001, turned its stores into experience centers with classes, demonstrations and hands-on customer support in lieu of hard-sell tactics.

And its premier product, the iPhone, is all about ease of use. The company often shied away from much-hyped, but nascent technologies when they didn’t seem ripe enough to deliver on customer expectations and maintain an easy, seamless experience. (Apple has tended to wait for tech like virtual reality to mature and then jump in, for instance it now ensures its devices can handle VR’s demands. It’s also rumored to be developing its own VF headset now).

Sometimes overlooked is the App Store that could be accessed through the iPhone. The smartphone had no native, third-party apps at first and there were no plans for them. But in response to developer demand, Apple issued a software development kit and came up with an app distribution method similar to its iTunes store.

Ten years hence and more than $120 billion in sales later, the App Store has proven itself a powerful player across an array of sectors, including retail. Phones have become consumers’ constant companions, and this elevated status paved the way for social media, mobile commerce and other forces that are still changing the nature of how people connect, shop and live.

Today, the biggest point of differentiation between smartphones isn’t so much about the hardware, but about the software — i.e., the apps and services. The convenience and the consumer experience. Part of that experience does involve hardware, but mostly to push the boundaries of Apple’s software and expand it into new territory.

And that seems to be one of the keys to achieving serious scale — being really, really good at something and then layering more services onto it, building a larger, steadier base.

When Apple’s chief executive officer Tim Cook took the helm in 2011, he had to fill the legendary shoes left by cofounder Steve Jobs. Critics, analysts and other pundits searched for signs that he wasn’t up to the task. Instead, Apple has soared during Cook’s watch, in large part because it’s stayed close to its customers and built on the core, launching new products, like the Apple Watch.

Experts have argued whether Apple is as much a tech company as it is a lifestyle brand. Either way, it’s been a success.

But can it be replicated in retail?

“What will it take for a retailer to reach the billion-dollar benchmark?” mused NPD Group retail analyst Marshal Cohen. “They will need to capitalize on the endless aisle. Assortments so big, bigger than a store can carry and available for delivery within two days that no customer can resist. Success will come to the retailer or brand that does what I call the five E’s: Educate, entertain, elevate, experience, evaluate.

“Just as Apple took service to the next level affording [it] a loyalty beyond any brand, Apple isn’t a brand, it’s a lifestyle — a commitment and a dedication,” Cohen said. “The next big one will need to get that same commitment from consumers.”

For now, all signs point to Amazon, which is hot on Apple’s heels with a market capitalization exceeding $908 billion.

“Amazon won in online because of one-step checkout,” said Activant Capital’s Steve Sarracino. “Product curation came over time. But one-step checkout and two-day shipping really drove the consumer to buy on the Web site.”

Amazon built its empire by positioning itself as a convenience service — like Apple, focusing on the customer experience and making sure to deliver. Now that promise of convenience intrigues analysts watching the company’s race to expand into other sectors, from groceries (where it already owns Whole Foods) to home services to digital media to prescription drugs to more fashion and beauty offerings.

Also in the wings for a $1 trillion valuation is Google’s parent company, Alphabet. But with a market value north of $852 billion, there’s some air between it and Amazon. Also, the Android maker and search giant gets most of its revenues from advertisements (and it’s getting more competition in that arena from Amazon).

But where Apple has the strength of its mobile platform, and Amazon relies on its e-commerce platform and cloud business, Alphabet’s many initiatives traverse those categories and then some. The Android operating system has the largest market share, and it offers a growing array of tech — from phones and wearables to VR, cars, smart speakers, cloud services and others. Including Google Express shopping.

For now, the Google e-commerce hub can’t touch Amazon’s marketplace. But Google’s strategic partnerships with retailers suggest that it has some ambitious goals in the shopping realm. And it could get a lift if devices like Lenovo’s attractive, Google Assistant-enabled Smart Display take off.

Much further behind in the market cap race to $1 trillion are Walmart Inc. ($266 billion) and Target Corp.($44 billion). NPD Group’s Cohen said they could hit the benchmark — eventually.

But Jonathan Keidan of Torch Capital has reservations about the big-box chains.

“You could say that what Walmart is doing with helps put them in the same orbit,” Keidan said, of the discount retailer’s acquisition and appointment of founder Marc Lore to the corporation’s head of e-commerce. “They are now on the right path, but it doesn’t really close the gap.”

Instead Keidan looks further east.

“Everybody else is so far away [from Amazon’s level.] But I see Tencent or Alibaba, especially if you include Tencent’s music and services — all of the corollary businesses that are completely spun out,” Keidan added. “I think to win in that sort of environment, it’s much more than pure-play retail. It’s owning the relationship with the consumer, and it’s owning all their data and being able to touch consumers in many different ways. That’s what Tencent and Alibaba are doing.”

The tactic seems hardwired into the top tech companies’ DNA.

Apple has been pushing its machine learning development, bringing it more into services that aim to make its iOS devices and watches more helpful and fun to use — building a multifaceted relationship with users that grows stronger with each new purchase.

The connections only work, though, because Apple knows its customers very, very well. It knows what they want and, perhaps more importantly, what they don’t want or won’t tolerate. And the company holds that understanding of consumer experience as its most precious asset.

In a recent memo to 120,000 employees, Cook said Apple’s $1 trillion market cap was “not the most important measure” of its success. He pointed to his predecessor’s vision and his focus on products, users and company values:

“Steve founded Apple on the belief that the power of human creativity can solve even the biggest challenges — and that the people who are crazy enough to think they can change the world are the ones who do,” Cook wrote. “In today’s world, our mission is more important than ever. Our products not only create moments of surprise and delight, they empower people all around the globe to enrich their lives and the lives of others.”

If that is Apple’s genuine modus operandi, then it’s the sort of integrity and insight that distinguishes industry titans from everyone else — whether in tech or retail.