The Warehouse Group: Building Customer Loyalty and Combating Fraud


  • 3B+
    Customer transactions indexed
  • 2,000%
    decrease in query response time

Seamless customer experience

Customers can now easily return goods with or without a receipt, resulting in a great experience and positive feedback.

Reduced risk of fraud

Team members can validate returns are genuine and combat fraud.

Optimised performance during peak periods

Elasticsearch Service allows for optimal performance and seamless scalability even during the retail industry’s busiest time of year.

Developer-led results

The success of the developer-led project has led to the use of the Elastic Stack in other areas of the business also.

Company Overview

The Warehouse was founded in 1982 with the purpose of challenging traditional retail models, as well as bringing bargains to New Zealanders for general merchandise like homeware, electronics, and apparel. By being an early adopter of new technology and staying ahead of the curve with modern retailing systems, The Warehouse has been an innovator in low cost delivery and sustained competitive prices.

The retailer has expanded and diversified over the years with brands including Warehouse Stationery, Torpedo7, and Noel Leeming. Collectively, these stores are known as The Warehouse Group and are an established part of the everyday lives of Kiwis, with around 2m visitors to over 250 stores every week.

Powering the Search to Combat Fraud

The Warehouse had a returns policy which included a 12-month money back guarantee and allowed customers to return items without a receipt, if the employee handling the return could ascertain that it was a legitimate purchase. This policy had helped The Warehouse earn customer loyalty, but it did expose the retailer to the potential for fraud due to how returns were handled. How does a customer get away with returning the same item multiple times and, more importantly, how do you stop them? This was the dilemma faced by The Warehouse. A better way to validate that returns were genuine was therefore needed, and the search for a solution led to Elasticsearch.

Implemented in a matter of months, Elasticsearch now enables employees using 1,500 point of sale (POS) devices and 200 service desk computers across The Warehouse’s 93+ stores to search through years of transactional data. This allows team members to quickly find and validate transactions and refund customers exactly what they paid. The streamlined process is a win for everyone and has effectively combatted the potential for fraud.

The Warehouse’s Journey with Elastic

A new challenge for the IT team

Since 2012, The Warehouse had tried traditional ways of validating returns and each store had their own process. This included searching through physical and electronic transaction records using details like the last four digits of credit cards. However, searching these records could take 15 minutes and employees could only search through data from their own store. With an eye on always providing the best customer experience, The Warehouse knew they needed a more innovative approach. Trevor Jones, Lead Developer for The Warehouse Group's in-store systems and applications, took on the challenge.

The team wanted to make it possible for store employees to carry out more detailed searches across all transactional data. They had previously developed a product search application, where they had used Apache Solr. It was a small, localised solution used to search across store servers, but it made IT appreciate the responsiveness of a Lucene based approach. But with this new project, they knew they needed a solution that would easily scale to meet the data demands that would come along with indexing all data from each receipt across every store.

“To reduce the friction involved in returns, we needed a solution that was extremely fast and could search across billions of lines of data. All roads led to Elasticsearch and the fact it was open source allowed us to get started right away. We spun up a cluster, confirmed it could do everything we needed it to, and at that point the project was nearly done,” said Trevor.

Streamlined and validated returns

Customers enjoy shopping for deals at their local The Warehouse, and they know that The Warehouse has an excellent returns policy. The challenge was, the way returns were handled did not encourage people to return items with a receipt, and this impacted customer satisfaction due to the extended amount of time processing a return took. There was also the issue of a small number of customers who were returning items that they never purchased at The Warehouse to begin with - at least not in the quantities they were claiming. These customers would buy or steal these items elsewhere and then attempt to return them multiple times at The Warehouse’s different locations. This was a fraud opportunity that The Warehouse wanted to close.

The Warehouse needed to put an end to return fraud, without inconveniencing customers, and that’s exactly what Elasticsearch has allowed them to do. The solution works by allowing employees to search through transactional data to validate whether an item has been purchased, and not yet been returned.

For example, if a customer comes in to return a toaster (with or without their original receipt), an employee can easily search for the toaster, along with any items purchased alongside it. They can then narrow down the results by date and location until they find the right one. Finally, they can pull up the receipt to see the price paid for the toaster and confirm that it has not been returned already. This entire process takes just seconds thanks to the speed of Elasticsearch and its search-as-you-type autocompletion.

One customer wrote to The Warehouse to thank them for the great customer service they received when returning a Mother’s Day gift. The mother already had the item and wasn’t sure she’d be able to return it after her son lost the receipt. She wrote, “When I asked if this was possible they said yes just tell us the date of purchase and we can track it and replace it with something else or give you a credit. So I did and bought something that cost more, a win for both parties. Great customer service...thank you."

High-stakes rollout

Juan Herbst, the Development Manager at The Warehouse, having used Elastic previously, knew the benefits that it offered. Taking the lead, he provided proof-of-concepts, and onboarded the team to its use and benefits in solving the teams ‘validating receipts’ use case. After successfully spinning up the test case for Elasticsearch, he moved the deployment to the cloud — self-hosting it initially on AWS - and began working with the team to plan for the broader rollout across all The Warehouse’s stores. This was released to all stores in late 2018.

“We had confidence the Elastic solution worked, but we didn’t know what would happen when everyone began to use it at once. Given we were rolling this out just before Christmas, we wanted the assurance of an Elastic subscription and be able to lean on them for support,” said Trevor. “We also wanted someone to handle the operations while we focused on development which is why we signed on to Elasticsearch Service.”

Lightning fast search and scalability

The Warehouse's 1,500 Point of Sale (POS) devices, and 200 service desk computers, all needed the ability to be able to provide this validating receipts functionality. The rollout involved taking 3 billion transactions worth of data out of the historic database, normalising it all into a common JSON document model, and feeding it into an Elasticsearch index. At the same time, existing POS devices were set up to convert all new and future transaction data into JSON and feed it directly into Elasticsearch.

With the 3 Terabytes of data easily and instantly searchable using applications directly on the POS devices and service desk computers, response time for search requests averaged 20 - 30 milliseconds, which was an amazing start, especially considering the 15 minutes it took in the past to handle returns. However, as the Christmas season approached, The Warehouse saw their normal holiday shopping rush meaning that more and more data was fed into Elasticsearch, and while the system could sustain the additional load, the team started seeing their query responses creeping up to 8 - 10 seconds.

Once this issue was highlighted, Juan worked with the support and product experts at Elastic and diagnosed that the cluster was not optimised for the amount of data being sent to it during the Christmas season. Additional resources were required and, due to The Warehouse being subscribed to the Elasticsearch Service, this was easily provisioned once the ideal configuration had been agreed upon.

One of the reasons we went with the Elasticsearch Service was to have that flexibility to scale. With the press of a few buttons, we went from an under-performing system to one that delivered receipt lookups at lightning speeds.

– Juan Herbst, Development Manager | The Warehouse.

With their cluster now optimised for their current and future data load, The Warehouse easily added transactions from their webstore into Elasticsearch, making the returns process seamless regardless of whether a customer made their purchase online or in-store. Other than that small optimisation and the addition of the new source of data, Trevor says they haven’t had to touch the solution since it went live.

What we’ve built basically runs itself and if we do need to scale, Elasticsearch Service makes it as easy as getting water out of a tap. It's just not something we have to worry about.

– Trevor Jones, Lead Developer | The Warehouse

Expanding to new use cases

Their mobile team have since used Elasticsearch to add the ability for a customer to be able to scan and save their receipts, from within their existing mobile app. This has significantly reduced the dependence on paper receipts, whilst also improving the customer experience. This also helps The Warehouse identify purchasing habits in order to provide more relevant promotions to its customers. Customers can also tap onto the receipt in the app and be directed to The Warehouse online store to purchase “more of the same” when they like a particular product. There are plans in the future to allow customers to scan the app on their phone at check-out so that the receipt is linked to their online account. Using Elastic, the solution will be even faster than printing the receipt.

Other use cases are in the works, including one which would leverage Kibana to analyse the efficiency of transactions based on data from POS devices.

With Juan and Trevor both being advocates for Elastic within the company, they are helping drive its use across the business as teams deliver new and more innovative ways of providing better customer experiences, and higher levels of customer satisfaction.

There are people all over the business who have seen the success we’ve had with returns validation and they want to know how Elastic can support other applications. The quality of training offered by Elastic has been great, and given me an in-depth understanding of how the Elastic Stack works so I can identify how it can be used to support these applications or solve different problems in the future.

– Trevor Jones, Lead Developer | The Warehouse

The end of fraudulent returns

Beyond the technical wins and new use cases delivered over the last six months, The Warehouse has experienced measurable successes in reducing instances of fraud. It has achieved additional savings by ensuring customers are refunded exactly what they are owed. Moreover, the returns process is noticeably faster and easier for customers and employees.

“In the past we would need to ask customers a dozen questions or leave them standing at the register for 15 minutes while we tried to go and track down a receipt. That friction is gone and so is the risk of fraudulent returns. It simply can’t happen like it did before,” said Trevor.

The Warehouse Group’s Clusters

  • Clusters
    2 production clusters
  • Nodes
  • Hosting Environment
    Elastic Cloud
  • Documents
    2.7 billion
  • Total Data Size
    3 TB
  • Daily Ingest Rate
    150K (up to 200 per second)
  • Indexes
  • Query Rate
    45 per second
  • Replicas