BEIJING (Reuters) - As Amazon.com Inc AMZN.O looks to swallow U.S. grocery chain Whole Foods, China's tech giants are already digesting hefty bricks-and-mortar deals, taking the lead in the battle to transform supermarket shopping with big data and better supply chains.

China's Alibaba Group Holding BABA.N and JD.com Inc JD.O have invested heavily in offline retail - bricks-and-mortar stores - in recent years to complement their online offerings.

With their ready-made payment and social media platforms to lure shoppers, Alibaba and JD.com have helped China become the world’s largest online grocery market, far ahead of the United States.

This early lead, cemented by densely populated urban areas and cheap labor, could be key as retailers and tech firms race to boost margins on low-cost consumer goods by reinventing supply chains with big data analytics.

“China is already the largest online grocery market in terms of value in the world so it’s really advanced in terms of scale,” said Nick Miles, London-based head of Asia Pacific for food and grocery industry research body IGD.

Sales made online are set to more than double to around 6.6 percent of China’s broader grocery market by 2020, compared to around 1.4 percent for U.S. sales by then.

Both U.S. and Chinese e-commerce firms are grappling with the challenge of increasing their margins on fast moving consumer goods (FMCG), which include low-margin, high-demand goods with a short shelf-life - a staple of grocery stores.

Alibaba, which has a burgeoning cloud business that competes directly with Amazon, plans to use its trove of consumer data to provide a suite of connected services back to brands whose goods they sell.

Services will include inventory management, smart manufacturing and logistics, aiming to slash waste and margins across the entire supply chain, according to the company’s so-called “New Retail” strategy.

Slideshow ( 8 images )

Likewise, JD.com uses data from a partnership with China’s hugely popular messaging app WeChat, which has over 930 million users, to build data profiles for a range of brands including baby products, cosmetics and soft drinks.

CATCH UP

Alibaba has invested over $9.3 billion in offline retail stores since 2015, including supermarket chain Sanjiang, department store Intime Retail Group and Suning Commerce Group Co Ltd 002024.SZ, one of China's biggest offline retailers.

In May it took an 18 percent stake in Lianhua Supermarket Holdings Co Ltd 0980.HK, part of retailer Bailian Group.

JD.com bought Wal-Mart Stores Inc's WMT.N Chinese online platform Yihaodian for about $1.5 billion in shares in 2016.

U.S. firms are now looking to play catch up - key as bricks-and-mortar stores are hit by a slowdown and online players battle with tight profit margins and high delivery costs.

Amazon launched a $13.7 billion bid for grocery chain Whole Foods Market Inc WFM.N last week, marking its intention to take on Wal-Mart.

Wal-Mart, which got a stake in JD.com in the Yihaodian deal, upped its share in the Chinese firm to 12.1 percent in February, having bought online retailer Jet.com in a $3 billion deal last year.

Slideshow ( 8 images )

It’s a race with a big global impact on the wider market: worries about Amazon’s new clout with the Whole Foods deal wiped more than $35 billion off the combined market value of dozens of U.S. supermarkets, food producers and shopping malls.

The incentive for Chinese tech firms to slash costs and take a bigger bite of the offline market is clear.

Despite being the world’s largest e-commerce market, over 80 percent of transactions are still conducted offline in China.

The country’s e-commerce market grew over 50 percent last year while hypermarket and supermarket sales flatlined, according to consultancy Bain & Company. Online retail growth hasn’t been immune either, with analysts pointing to high delivery costs and tight margins.

“It’s going to very hard for those pure e-commerce players to grow (margins), and for those offline players, it’s going to be very hard to survive and make money,” said Bruno Lannes, Shanghai-based partner at Bain.

“The answer is to combine in an integrated supply chain.”

COMPETITION

China’s firms and their global rivals are increasingly looking to tap into overseas market such as South East Asia and India, the most likely battlegrounds for any stand-off.

However, online-offline tie-ups, even in China, are still at a relatively early stage. Challenges remain with integrating physical store assets to online systems, cutting delivery costs and dealing with fierce competition.

At the Hema seafood market on the east side of Beijing, these challenges - and China’s ambition - are on display. Shoppers peruse fresh fish and clams, but pay with smartphones, scanning QR codes using Alibaba-linked payment platform Alipay as staff in red t-shirts help set up accounts and connect to wifi.

“I don’t think Amazon is competitive in this field... its pages, functions and payments are old fashioned,” said one female shopper in her 20’s with the last name Liu.

“Hema is like Ikea but better... it feels like home.”