Marketing software and data analytics platform Punchh — who counts the likes of Pizza Hut, Dairy Queen, and Del Taco amongst its customers — just closed a $20 million Series B round of funding, bringing the company’s total funding to $31 million. This most recent round is led by Sapphire Ventures, with participation from previous investor Cervin Ventures.

The new funds will allow the company to further build out its AI and machine learning components that help a growing number of restaurants power their marketing channels and analyze their data.

The company also announced, alongside the funding news, the release of Punchh Acquire, an all-in-on platform that integrates with a restaurant’s existing channels for customer engagement. That includes anything from email campaigns to text messages to self-serve kiosks and POS systems. While Punchh doesn’t build the actual app for the restaurant, the Acquire product does streamline marketing to all those different channels, while also pulling and analyzing the data afterward.

So, for example, a consumer won’t see anything about Punchh when they open their Coffee Bean & Tea Leaf app. They’ll navigate the coffee chain’s own app experience, probably unaware it’s Punchh’s system offering them a two-for-one deal on lattes or 20 percent off their next purchase.

Punchh promises to make it a lot easier for restaurants to collect data on their customers and tailor their channels and campaigns to meet preferences (everything is opt-in for the consumer).

“We’re trying to bring to brick and mortar the same level of data-driven marketing and customer relationship management software that is really prevalent in the e-commerce realm,” says founder and CEO Shyam Rao.

Those in charge of customer relationships at restaurants use Punchh to track customer behavior — in real time — and adjust digital offers as that behavior changes. A low spender, for example, might receive an up-sell campaign. Meanwhile, a mom stuck at home in Pittsburgh on a rainy winter day might get an offer for soup and tea. It works the other way, too: vegetarians will not get an offer for a Meat Lover’s pizza.

“All we’re trying to do is go back to the time 50 years ago where shops had this personal relationship with every single customer,” says Rao. “We’re trying to go back to that at scale, and the first step is to get to know the customer.”

To do so on such a granular level, Punchh separates customers into three “buckets” and tailors campaigns towards each: Anonymous customers are the ones who simply walk into a restaurant; the Known ones have given an email address or phone number; and the Loyalists dine regularly, have downloaded the restaurant’s app, order through it, and redeem offers on a regular basis. The goal, of course, is to get Anonymous customers to become Known, and Known to become Loyalists.

For many brick-and-mortar brands, restaurants or otherwise, creating this kind of digital counterpart to the main business is such a challenge many don’t even try. Starbucks may have a robust digital strategy, but Starbucks also serves 90 million customers per week. The local pizzeria around the corner presumably does not have the kind of footprint that makes it possible to throw thousands of dollars and people at a mobile strategy. Even larger brands, like, say Pizza Hut, may not have the resources — monetary or otherwise — to invest in a homegrown mobile platform that builds powerful relationships with customers. “Relationships drive revenue,” says Rao. “We help [restaurants] establish these relationships.”

Punchh currently has over 115 customers and 34,000 locations worldwide. With this latest round of funding, as well as the release of Punchh Acquire, the company also plans to branch out into health and beauty brands, as well as convenience stores.