Starbucks could very well be cashless one day, but technology won't replace its "humanity" in dealing with customers, Executive Chairman Howard Schultz told CNBC on Tuesday.

Schultz, who stepped down as Starbucks CEO earlier this year, said he could see a future where the U.S.-based coffee chain becomes a "cashless retailer."

"That time is nearer than you think," said Schultz, who spoke with "Squawk Box" at the opening of the Starbucks Reserve Roastery in Shanghai.

At the same time, he said, technological advancements won't get in the way of the relationship between customers and the barista. "We're a people company," he said.

"I don't see a day where artificial intelligence or robotics is going to replace the humanity of Starbucks," Schultz added. "The equity of the brand is based on that intimacy between our customers and our people. That's why we invest so much in our people."

Addressing the difficulty of the brick-and-mortar retail environment, Schultz said, "If you don't put your people first, and invest in your people, I don't think you can have that customer experience that customers are going to want to be attracted to and loyal to."

Schultz joined Starbucks in 1982 as director of operations and marketing. He served twice as CEO, a role he turned over to Kevin Johnson in April.

Johnson, who also appeared on CNBC from the Shanghai Roastery on Tuesday, was joined by Starbucks China CEO Belinda Wong. The U.S. coffee giant is opening one store every 15 hours in China, Wong said.