The retail landscape is going through an unprecedented upheaval. Many retail chains closed their brick-and-mortar stores last year, and more chains have announced closures for this year — Gap, Victoria’s Secret, Tesla, Abercrombie & Fitch, Gymboree, Payless ShoeSource, J.C. Penney… the list seems unending. This trend is only the tip of the iceberg, and what is hidden beneath are the technological forces unleashing changes in consumer shopping behavior in unforeseen ways. This will ultimately reconfigure the retail landscape — stores will be only a part of the overall continuum of networked entities existing in offline, online, and mobile environments.

The accelerating closure of physical stores should not come as a surprise to many, especially to consumers. Driven by the convenience of online shopping, early adopters of online commerce started engaging in what is known as “multichannel” shopping — buying products through online stores as well as in physical stores depending on the type of product, such as buying cameras in online stores but clothing in offline stores. As the online channel matured, many consumers bought things only online, while consumers with limited or no internet access shopped entirely offline. Some shopped in both environments.

Over time, e-commerce stores, such as Amazon, provided a platform through which hundreds of other sellers set up their online shops. Social media sites became ubiquitous. Consumers started discussing online what they had purchased, sharing pictures of what they liked, reviewing different products, and making videos of their “hauls” — all leading to strong online word-of-mouth. Along came smartphones and mobile shopping, providing connectivity and retail access to consumers wherever, whenever.

All these technological advances have led to “omnichannel” shopping — for example, moving seamlessly from the mobile channel to the online and offline channels. Many consumers start searching for products using their mobile devices, switch to computers, and shop online. They may start on a social media site but ultimately make their purchases through one of the large e-commerce platforms after reading online reviews of the products they are interested in. Physical stores may not even appear in this “customer journey” as consumers search, consider, evaluate, and purchase products entirely in the mobile and online space.

Many physical retail chains underestimated the impact of the online environment early on. It is true that only a small segment of consumers shopped online in the earlier era of online shopping, and physical retailers could ignore that segment. But as the segment burgeoned to a larger online customer base following the emergence of Amazon and the like, retailers had to catch up. Many set up online stores, rather hesitantly and awkwardly, not fully embracing the online environment, as they worried these outlets might cannibalize the sales at their physical stores. In the multichannel era, they could survive, but in the omni-channel era, there is no hiding space.

An Amazon Go employee stocks shelves using a mobile device at the Amazon Go store in Seattle, Washington, Jan. 22, 2018. Stephen Brashear/Getty Images

In our research on multidevice shopping, we found that many consumers start their searches on their mobile devices, transitioning to online stores and/or physical stores as the product category demands. They switch devices often during the customer journey and completely ignore retailers without a clear mobile presence. In the omnichannel world, every touch in the customer journey creates an opportunity for a purchase through any one of the channels — mobile, online, or physical store. Any channel can benefit from these opportunities, but physical stores lose out if their corresponding mobile and online presence is not significant.

As the customer journey goes online and mobile, the traffic at physical stores suffers. Even the customers who do visit a store use their mobile devices to practice “showrooming” — checking out a product in the store and ordering the product online at Amazon or another online outlet. Physical stores allow consumers to evaluate the “touch and feel” of products but do not allow them to consult reviews and recommendations from other consumers with one touch as they can in the online or mobile world.

In-store shoppers also can’t enjoy the social aspects of shopping, such as getting comments from their friends on social media. Since consumers complete more and more of the upper-funnel tasks within the customer journey in the mobile and online environments, standalone physical stores do not have a chance to get consumers in the door. With dwindling interest, traffic, and sales, it’s no wonder physical stores have been closing shop in droves.

So, how can retailers stave off the physical retail store apocalypse? First, it is important to realize that the physical store is only one stop or touch on the customer journey. In the omnichannel world, physical stores support online and mobile, and online and mobile support physical stores, so retailers need to take advantage of the synergy the multiple channels provide. Sales can come from any channel, not just from stores. Retailers need to build a strong presence in the online and mobile environment, with content-rich websites and mobile apps.

Customers expect retailers’ visual merchandising — image and video content on an online product page — to be of high quality, and it needs to complement the physical stores. Consumers expect to order products online and pick them up at stores, as well as return online purchases in store. They expect prices to be the same across channels but the shopping experiences to be different and complementary. If these channels serve as substitutes for each other, consumers will just choose one channel to visit.

Second, stores can no longer have a “transactional” attitude. It is all about building customer relationships in the omnichannel world — identifying the best customers and providing value to them across all touchpoints. Customers’ data, privacy, and trust all play important roles as companies foster these relationships and provide personalized service. Third, customer engagement across each and every touchpoint is critical to keeping customers on retailers’ websites, apps, and stores as they move through the customer journey. Understanding what experiences will lead to such engagement in the context of the retail product category is key as retailers design their offerings.

Fourth, the role of social media — and engaging customers in social media — is more important than ever before. This engagement could be in the form of making it easy for customers to share recommendations and reviews with others, providing customer service through this medium, or actively managing word-of-mouth through these channels.

Finally, retail stores must embrace technology to meet customers’ expectations: fast, frictionless service, auto-checkout without lines, payment with smartphones, and shopping without constraints, to name a few. It is important that retailers not make their stores the weak link in the chain of channels, as this reduces the value of all of the channels.

For retailers who were slow to embrace online and mobile channels, it may be too late to implement some of these strategies. They’ll continue to close their stores. As traffic moves to the online and mobile space, there is no need for so many retail outlets and many of them need to close. Some retailers may be able to add channels and improve their outlooks. What does the future hold for retail stores? Will they disappear altogether as customers move to online and mobile? Quite the contrary!

The retail store will remain an important part of the omnichannel experience. Many online retailers are establishing physical stores — Warby Parker, Casper Mattress, and Amazon, for example. The physical store will remain alive and well. They just may not have the traffic of their heyday, when they were the only game in town. The future of retail does not depend on any one component. Online, mobile, and physical stores provide synergistic value. Retailers who understand this will thrive, while others will wither away.

(P.K. Kannan is the Dean’s Chair in marketing science in the Robert H. Smith School of Business at the University of Maryland and a leading industry expert in marketing data, analytics, and consumer behavior.)