November 20, 2018

Boosting Black Friday Sales with AI

Key Challenges

   Create automated emails and a dashboard allowing leadership to analyze real-time sales and promotion data.
   Combine multiple database platforms into a single information portal.
   Implement access allowing only authorized personnel to view the sales data.

Black Friday Sales Created Unprecedented Data Volume

Our client, a business strategist in charge of his company’s brick-and-mortar and online stores, needed help with sales reporting. His company wanted to coordinate promotional campaigns with near real-time sales performance during the busy Thanksgiving shopping season. In 2016, we helped our client automate retail reporting. We delivered retail reports every fifteen minutes. Now, our client needed to automate the sales reporting of all the stores. We needed to deliver real-time sales reports incorporating data 100 times larger than the previous year. With two months until Black Friday, we hurriedly began work.

Figure 1: Standard reporting vs the Black Friday challenge

Our Approach

Each retail division had a different reporting system. The brick-and-mortar stores used custom on-premise databases. Due to the volume of the data, though, we knew we could not process and report data at scale using the on-premise solutions. We needed a suite of Azure technologies, but Azure technologies presented different problems. At the time, Azure Analytic Services was not out of preview. Many of the features we needed lacked documentation. To learn more about Azure Analytic Services, we conducted a series of proof of concepts over a period of three weeks. We then vetted our assumptions, communicated the results with our client, and determined our final architecture design. At the time, no one had hosted a project of this scale within Azure services before.

We began implementation immediately after conducting our proof of concepts. We initially struggled to receive data at the rate we needed. We received real-time sales reports from retailers and online stores but lacked reports from two specialized business divisions. “A lot of my time was spent reaching out to folks who managed the data,” our project lead observed. “Once their teams saw the initial version of the build, they were willing to grant us access to the transactional data.” We committed to observing agile methodologies throughout the project. Because we submitted deliverables immediately, we won the trust of both specialized business divisions in the span of a few short weeks.

We finished development and basic testing two weeks before Thanksgiving. We continued running end-to-end tests improving our implementation until the Wednesday before the holiday. We knew we needed to deliver a successful project: “The weekend before Thanksgiving, the entire team and I worked very hard. I don’t know how much sleep I got those five days, but I can tell you this: I was awake most nights,” our project lead said with a laugh. Prior to the delivery, the team simulated the data reporting load of the Thanksgiving shopping season.

Figure 2: Our Black Friday reporting architecture

Our sales reporting implementation encountered no problems the first three days of the holiday. But on the fourth day, a minor setback arose. Because we were pulling the data in near real time, we were creating thousands of files. We were creating roughly fifty files every thirty seconds. The data reporting job started running slower and slower. Initially, the slow reporting job was not a problem. But when the job duration exceeded 25 minutes, our engineering team stepped in. The data reporting job could not exceed 30 minutes. If the job exceeded 30 minutes, the job would disrupt the next data reporting cycle.

Our team first implemented a quick fix that compiled the files as they came in. The quick fix solved the setback for a day. The next day, the team reached a permanent solution; files were defragged and only then compiled.

Improved Sales Reporting Without a Hitch

Our work resulted in a tremendous success for our client. Despite the technical challenges, end users were not affected. Each of the 125 email reports were sent on time. Our client made five promotional decisions based on our reporting. Each decision resulted in improved revenue. Our reports were widely used. The dashboard displaying the sales reporting data ranked 100 out of 75,000 dashboards used.