Danny O’Malia refers to his true tale of a local grocer battling the corporate mindset as the “olive story.”

His father, longtime grocer Joe O’Malia, operated Indianapolis-area markets in an era when customers knew their butcher’s name and when a store manager would stock items based on the personal tastes of customers.

Three of O’Malia’s shoppers — two women and a private cook — preferred a specific brand of olives.

But in 2000, O’Malia’s eight stores were being sold to Marsh. A corporate representative took inventory and said the low-selling jars of olives would have to be replaced with items of wider appeal.

O’Malia stood his ground, noting that the olives were routinely purchased for three prominent business leaders. Not wanting to sever relationships, the inventory specialist relented, and the olives stayed on the shelf.

“He had orders to get rid of 100 items, and he took that computer back and got rid of 100 other items,” Danny O’Malia recalled. “Did they save money on inventory right away, a little money on labor? They did. But if you tell that cook that they have to buy the olives elsewhere, they will.”

The personal service offered by grocers of the past has shifted as technology plays a bigger role in a shopper’s trip down the aisles. And just as statistical analysis dictates the stocking of shelves, it also determines the fate of entire grocery store chains.

Witness the bankruptcy filing by Marsh. The Indiana-based chain recently closed some of its stores and is seeking a financial partner to keep the remainder open.

A future indication of the changing supermarket landscape came in 1983 when Minnesota-based Cub Foods opened stores in central Indiana. Within a year, A&P, Standard and Preston-Safeway shuttered stores. By 2001, Cub was outpaced by Meijer and Wal-Mart, which built “better mousetraps,” O’Malia said.

O’Malia, known for offering an upscale stock, saw the future.

“We were concerned about the level of competition that was coming, much less what was there,” said O’Malia, who now gives talks on customer service training.

Employee pensions, government regulations, food suppliers being purchased by grocery giants and the prevalence of technology were among factors putting additional pressure on neighborhood grocers. Computers were not only sending customers through checkouts more quickly but were monitoring individual purchases.

The smaller O’Malia’s couldn’t afford to install scanners and computer systems to keep up with the larger chains.

But technology could drive customer loyalty in the future, experts say.

“Amazon is spending to become big in the grocery area. Fifty percent of all U.S. households are Prime members. Amazon wants to be their grocer,” said Richard Feinberg, interim head of the Department of Consumer Science and professor of retail management at Purdue University.

Customers are turning to the convenience of social media. They can order through Walmart on a mobile device and pick up the purchase at any store. And, looking into the future, driverless Smart cars could bring grocery orders to homes.

“Millennials are less loyal to tradition ... and brands ... and do not have the history of shopping at the local Marsh,” Feinberg said.

“Groceries are not going extinct. There are many very, very successful grocery chains that are thriving by becoming more than simply a vending machine for apples and bread,” he added.

Wegmens, Jungle Jim’s International Market and Whole Foods Market offer “worlds of amazement and entertainment.”

Publix still relies on hiring exceptional employees who offer customer service experience. “So it is possible,” Feinberg said.

The personal shopping experience is still important, even with advancing technology, said Greg Ferrara, senior vice president of the National Grocers Association, a coalition of independent supermarkets. Indiana has about 460 independent groceries.

E-commerce is increasing in independent stores with shoppers using online options to pre-order groceries or have them delivered, Ferrara noted. Some grocers are trying to replicate a concierge service for in-store customers.

“The employees are becoming almost personal shoppers for these customers,” Ferrara said. “As the customer orders on a regular basis, they get to know the customers, and they know that Miss Mary always likes to get the 32-ounce can of peeled tomatoes.”

A 2015 study of e-commerce noted that two critical components of home delivery are knowing the product is fresh and the delivery person is trustworthy, he said.

Marsh recognized the value of customer programs, according to documents filed in its bankruptcy case in Delaware federal court. In one filing, Marsh asked to keep its customer programs active during bankruptcy proceedings.