KFC Australia has revealed plans to fit its stores and the assets in them, like coolrooms, cookers and bins, with internet of things (IoT) sensors as part of an ongoing effort to become more data driven.
Group information services manager Dean Jones told Snowflake’s data cloud summit 2020 that the IoT project would start “down the track”, building on a three-year effort aimed at improving KFC’s use of data.
Jones said KFC planned to fit temperature sensors to stores, coolrooms and cookers. It would also deploy garbage bin sensors and other devices to capture data in its store network.
“Our data scientists are really keen to get their hands on all this information,” Jones said.
“It’s also going to be able to be used for our ad hoc analysis, operational reporting and the integration back in of trigger alerts to our stores and to our restaurant general managers to let them know that your garbage bin hasn’t been emptied in the last four hours or things like that.
“There’s a lot of opportunities there [from having] a lot more data coming down the line.”
KFC, which is owned by Yum! Brands, has around 683 restaurants in Australia, comprising 50 that are directly owned and the remainder which are franchised.
The company has 34,000 staff Australia-wide, a mix of those directly employed and those employed through the franchisees, and serves over two million customers a week.
Jones said the IoT data would be pooled in a cloud-based data warehouse from Snowflake that the company stood up and uses as its data lake.
A new lake
The Snowflake data lake is progressively taking the place of an on-premises SQL Server-based data warehouse and Azure-based virtual machines used to share data with external users.
Jones said KFC started running data projects on the SQL Server data warehouse in 2012 and had built out its use cases since then.
“We’d acquired 130 different data sources that we’d pulled through either from flat files or from different business apps,” he said.
“We were running about 6000 different loads over a week, we pushed that through and we created 120 odd models.
“So we were running this all on one very big SQL Server, which surprised me that it managed to do all that.”
The company ingested and processed data through the morning and then ran about 5000 different reports needed by franchisees and corporate staff on that data from “a certain point in the morning onwards”.
“We needed to remove all the data processing and just allow the business to run their reports, so if anything slipped and we pushed our loads back too far into the day, our customers would be complaining that they weren’t able to run their reports for the business users,” Jones said.
Additionally, the data warehouse became “an integration solution” for KFC, whereby data was ingested and then pushed into other enterprise systems, such as the company’s workforce management platform.
The company hit a performance and capacity “roadblock” in 2018 when the business asked for more granular reports by channel: delivery, mobile app, web ordering, drive-thru and in-store.
“We knew that we were going to have to go back through and do a massive reprocessing of a lot of data to get these metrics generated and pushed out to the stores and the business every day,” Jones said.
“We needed to reprocess about 7 billion records from our sales history, but we needed to do that in the periods we had for processing so as not to impact everyone else’s reporting, while trying to make sure the data would be available within a reasonable amount of time.”
Early efforts saw SQL queries fail to execute. “We basically didn’t have enough hours on the server to process the data for it to be used [in this way] without us hitting some sort of wall,” Jones said.
Proving out use cases
That changed around the beginning of 2019 with KFC Australia starting a proof-of-concept of Snowflake, a cloud-based data lake.
“We thought we’d just do a proof-of-concept with the one issue we had that we knew we couldn’t resolve in our current environment,” Jones said.
“We didn’t really have any budget for a project of scale so it needed to be a cheap solution that was manageable and wasn’t going to give us an ongoing cost that we couldn’t pay for.
“This piece of work we were looking around sales [channel data] was the perfect opportunity.
“We had the data sitting in an AWS Redshift database, which was our replication of our transactional database that we use for storing the sales data in, and we started going about the process of pulling that data out and pushing it into Snowflake so we could see if we could get the metrics that the business were after – if we could generate those KPIs.”
Jones said it took seven minutes for KFC to load all the required data into Snowflake and then 20 minutes to run the queries across sales channel data.
KFC then put a PowerBI frontend to Snowflake to allow some internal users to “just start querying the database”, extracting data and answers they’d previously depended on others to supply them with.
The proof-of-concept was further expanded to marketing use cases, with similar results.
“They started to see some of the value as we started to give them the ability to see channel data and see transactions at that level, and compare year-on-year and day-on-day sales down at those granular levels,” Jones said.
The marketing team coined the term ‘datalicious’ to describe the project, branding that has since stuck for KFC’s entire data-driven effort.
“That’s not something I would think of but it sort of sticks and it’s how we’ve started to reference the whole way that KFC is starting to think about data and how we’re incorporating data into more and more areas,” Jones said.
Shifting to prod
As data processing shifted off the SQL Server, it freed up capacity to run existing reporting jobs.
KFC was also able to set up secure data sharing on Snowflake, replacing the way it previously shared data by manually copying and pasting it into Azure VMs, which external teams then accessed.
“We’d been sending data out to different Azure VMs to share with a whole lot of different organisations that we needed to pass data through to, so marketing agencies, data scientists, suppliers and franchisees,” Jones said.
“This was painful in that you were basically copying data out into these different databases and then those users would be able to access it from there – there was a lot of duplication, and pushing data to the cloud from on-prem.
“With Snowflake, once we set up the first share and we saw the benefits of that, we very quickly tried to switch all those SQL VMs off and just move everybody onto that Snowflake share configuration.
“We now have not just franchisees but the global Yum! team who we’ve given a share to, and it just make things so much easier because they’re all looking at the same data.
“When it’s loaded into Snowflake, it’s there for everybody.”
With more use cases emerging, KFC was able to grow the team looking after its data warehouse from one staffer to three.
It has since moved forward on additional use cases: combining data from its customer data platform mParticle with other sources to better understand, segment and engage its digital customer base; and migrating more of its older reports to run off Snowflake instead.
“We’re moving all of our reporting to point directly at Snowflake and migrating it from our on-premises SQL server which means reports are lightning fast for the business,” Jones said.
“We’re actually at a point where the business is starting to come to us and get a taste for the ‘datalicious’ data, and they’re actually driving us further to get more and more data and get that back to them.
“They’re also coming to us with budgets, which is also great. Now we just need to manage the backlog and we’re more constrained by our resources than anything else.”