Old dogs can always learn new tricks, provided they are smart enough and have the right tools. Founded in 1962 — a generation or so before ecommerce giants like Amazon — Walmart has 11,700 stores and 140 million weekly shoppers in 28 countries around the world. Here in the 21st century, Walmart has also become the second largest online retailer.

As such, Walmart is in a unique position to build a bridge between its ecommerce operations and its global network of stores. That means deploying the kind of machine learning that can leverage a strength Walmart has been building for some time: the digital relationship between its customers’ online experience with the experience of shopping in malls.

Speaking at MB 17, Laurent Desegur, vice president of customer experience engineering at WalmartLabs, said that building that relationship depends on a few factors: offering low prices, managing risk, and not only helping shoppers find the products they are looking for, but making that process as convenient as possible.

“We’re essentially creating a bridge where we are enhancing the shopping experience through machine learning,” Desegur said. “This is what we call the digital relationship. We want to make sure there is a seamless experience between what customers do online and what they do in our stores.”

These days, shoppers have several ways to buy. They can shop the old-fashioned way at retail stores. Or they can receive home deliveries through Walmart’s associate deliveries, which uses machine learning to route these deliveries more efficiently. Or they can order online and pick up at the store, avoiding the checkout lines.

Machine learning can help by drawing insights from customer data to improve personalization through recommendations that might anticipate what shoppers may want. It can also speed up the bottleneck that can develop at the checkout lines. “That bottleneck is solution that doesn’t work. You don’t have to be rocket scientist to understand that,” Desegur said. “With the technology that we’re creating today through machine learning, we can create the store of the future.”

Last quarter, Walmart’s ecommerce revenue rose 63 percent year over year, as the company’s online operations, coupled with the purchase of Amazon-rival Jet.com last summer, propelled its digital sales. On the same day Amazon offered to buy Whole Foods Markets, Walmart moved to buy Bonobos, an online men’s fashion retailer, for $310 million. Both transactions showed Walmart is set on making shrewd deals to thrive in digital commerce.