Przegląd Piekarski i Cukierniczy, November 2022
After the pandemic and the burdensome sales restrictions associated with it, online trade in confectionery products and bread became considerably more popular. Online shops even appeared that had never had anything to do with confectionery; their activity consists solely in acting as intermediaries in product sales.
You do not need to own a bakery to sell online; an inexpensive computer and Internet access are enough. What is more, you do not even need a computer: hosting costing only PLN 150 per year is sufficient. There is no need to employ staff, because online sales are handled by automated, intelligent service systems. Running such shops consists mostly in supervising the sales process. Orders placed by customers are sent automatically to manufacturers’ warehouses, from where they are immediately dispatched to the end customers. In some cases, correspondence with the customer is required, and lengthy arrangements are often made. This occurs when selling celebration cakes or cakes for large events such as weddings or First Communion receptions.
Online shops
Online shops do not face problems involving loans, expensive gas, rising raw-material prices or a shortage of qualified employees. The low barrier to entry means that anyone can have such a shop today. On the other hand, the low requirements mean that a great many entities of this kind can appear. A large number of entities entails strong competition. Ultimately, the objective of the market game is always to earn a sufficiently high profit. How can one compete in a perfectly competitive market dominated by small entities operating practically without costs?
A competitive advantage can be obtained in only three areas:
- technological advantage,
- operational excellence,
- customer trust.
It is commonly believed that gaining customers’ trust is extremely difficult for new shops. Online shops therefore seek their opportunity by reducing their own margins. This approach leads nowhere. The margin must be high enough for the company to earn money and develop at an appropriate level of turnover.
Online shops cannot gain very much in the technological area either. Technological advantage means, above all, innovative products, new flavours and aromas. Unfortunately, the confectionery industry is very conservative. Biscuits and cakes whose recipes originated in the nineteenth century—such as cream cake, poppy-seed cake or apple pie—probably sell better than new confectionery “inventions”. A technological advantage can also be sought in organisation and logistics, a better shop website, and perhaps above all in the position on the search-engine page. A good online-shop location is crucial and fulfils exactly the same role as a good confectionery location in the physical world. Unfortunately, building a high position on the so-called Google website rating list must be entrusted to specialist companies. We have no chance of improving anything in this area ourselves. Let us therefore return to areas in which we can achieve something.
Because it is difficult to compete with new recipes in the conservative confectionery industry, while racing competitors by reducing the margin is the best route to closing the shop, we must return to the third route: gaining the customer’s trust.
What is customer trust?
Customer trust is a set of various characteristics thanks to which the customer trusts us. Until now, it was believed that customer trust was built over years. This is partly true, but today everything has accelerated at a dizzying rate. What once took years now comes after months or even weeks. Can customer trust be built over the course of just a few visits to an online shop?
Let us consider what customer trust is. The customer trusts that the shop will carry the things they like. They trust that products of the same quality will always be available there. They believe that the shop knows their needs and is capable of meeting them.
Once, before the arrival of supermarkets and mass sales, customers visited shops where the shopkeeper knew them. Let us recall the atmosphere in Stanisław Wokulski’s shop in Bolesław Prus’s novel The Doll. Every customer was welcomed, goods were praised, prices were negotiated and deep, mutual relationships were established. Recreating that atmosphere today is no longer possible. But is that really so?
A new approach to the online-shop customer
Every era brings different patterns of behaviour. There was the age of itinerant traders and medieval caravans, the age of marketplaces and stalls, and then of shops ruled by sales clerks like Ignacy Rzecki from The Doll. The Industrial Revolution brought warehouses and later supermarkets. We now have the information revolution and the emergence of online shops. Sales were conducted in a specific manner in each of these shops. Every form of selling developed methods for making a profit and gaining customers’ trust.
What is the way to gain a competitive advantage in the online-sales market? The most important feature distinguishing online sales from conventional sales is information about the customer. Unlike in traditional sales, an online customer is not anonymous. The seller knows the customer’s transaction history and preferences, and can trace the customer’s decision and the frequency with which they visited our shop. This capacity for analysis makes it possible to obtain very tangible benefits.
Customer analysis as a source of competitive advantage
In the confectionery industry, a competitive advantage can be obtained mainly by reducing product prices and by building customer trust. The time needed to build customers’ trust is considerably shorter in online sales than in conventional sales. Reducing product prices, in turn, will always lead to a decline in shop profitability unless it is accompanied by an increase in the number of transactions.
How, then, can customer trust be built quickly and shop profitability increased while margins are reduced and sales volume is increased at the same time?
This can be achieved by establishing a relationship with the customer. Online, this does not require a person who, like a nineteenth-century sales clerk, will greet regular customers at the shop entrance. Today, a simple algorithm installed on the website is sufficient.
Human nature
Human beings naturally seek contact. We usually feel good when someone addresses us in a friendly manner and asks about our health and our individual needs and expectations. Everyone knows that emails informing us about promotions or text-message reminders of an approaching car-insurance renewal date are generated automatically. Nevertheless, we usually take them seriously because they conceal a benefit in the form of less expensive products or the avoidance of trouble.
Thanks to information collected by sales systems, it is possible to address the customer by referring to their last visit to the shop. On the basis of history, the buyer can be presented with a proposal prepared especially for them, given a discount or offered a gift.
Unfortunately, such a relationship must be supported by complex calculations. Historical analysis enables us to determine the probability of how long a customer will spend on our shop’s website, what they will buy and in what quantities. More subtle analytical systems are capable of examining the customer’s sensitivity to price changes, reductions or gifts. All of this leads to a significant increase in sales volume.
Case study: a visit to an online shop
Let us present a staged scene of a transaction in an online shop.
I logged in to our account, which I share with my husband. The system welcomed me and jokingly reminded me when I had last visited the shop and what I usually buy. To my astonishment, I noticed that the computer offered me exactly what I wanted. I wanted to buy the cake that we usually purchase every other Saturday, because that is when my mother visits us. The cake was already in my electronic shopping basket. What is more, the system suggested that I buy a small poppy-seed cake. If I decided to buy it, I would receive a 10% discount on the first cake. I do not know how the computer knew, but I had just been thinking about poppy-seed cake. It was impossible for this to be a coincidence. The system additionally suggested dry biscuits that would be a great addition to school breakfasts throughout the week. It prompted this by displaying a picture of a boy going to school. I was offered an additional 5% discount on all the products. As it happens, we have a school-age child, so I also took advantage of this offer on a trial basis. I increasingly enjoy shopping in this shop because I received many discounts and the products were precisely those I had been thinking about.
A visit behind the scenes of the online shop
We will now explain how the offer for the young mother was composed. As we read, the confectionery’s online account was shared with her husband, but on the basis of the speed at which characters were entered, the system detected that this was the same person who usually shopped there. Several variables were used for this purpose, such as the time of day of login, the day of the week of login and the signature of typing speed. The initial analysis is carried out by a system based on a classification model. Dichotomous classification models return a result in the form of YES or NO. This time, the behavioural signature confirmed that we were dealing with the same person as usual.
The system checks what the identified person purchased recently. Another model finds regular behaviours. Above all, the model noticed that certain purchases are made regularly at defined intervals. As we know, regular purchases resulting from residents’ customs and preferences occur quite frequently in a confectionery. To detect such a custom, a multiclass classification model must be used. Twenty typical cakes and more than a dozen other products served as classes. A purchase-probability level is calculated for each class. If the purchase probability for a class (product) exceeds 70%, the system automatically places the product in the electronic shopping basket.
Our customer therefore found her cake in the basket, which was somewhat surprising to her. The system waited for the buyer’s reaction. The proposed cake was not removed from the basket within two minutes, so the system concluded that the proposal had been accepted and suggested another product.
The poppy-seed cake proposed by the system was not accidental. Above all, the buyer had previously been assigned to a particular customer segment on the basis of her earlier choices. The system analysed all purchases made within the selected segment over several years and created a list of several dozen pairs of products. This mechanism is called the Apriori algorithm. Purchases are often made in pairs. When we buy bread, we also buy butter; when purchasing coffee, we often also order a Wuzetka cake. The Apriori algorithm identifies these pairs, assigns a probability to them and creates static lists of several hundred pairs or triples of products.
For initial classification, models such as GaussianNB(), LogisticRegression(), GradientBoostingClassifier(), RandomForestClassifier(), LGBMClassifier(), CatBoostClassifier(), XGBClassifier(), KNeighborsClassifier() or SVC() can be used. The same classification models used for dichotomous classification may be used for multiclass classification. Apriori library import: from mlxtend.frequent_patterns import apriori, association_rules.
During our staged purchase, there was also the element of a 10% price reduction on the first cake. This was not accidental either. The proposed reduction resulted from an analysis of sensitivity to price changes for the particular customer segment and, like Apriori, had been calculated in advance. During the sale, the system used previously prepared calculation results.
Price sensitivity can be calculated using classic statistical tests such as chi-square, or directly by using Pearson’s correlation coefficient.
The discounts in our example were proposed at a level resulting from the sensitivity coefficient of the particular segment to which our customer had been assigned.
Finally, there was the element of purchasing dry biscuits. As we remember, the system assigned the buyer’s identity to a particular segment. This might, however, have been insufficient to send an effective proposal, so the system used another classifier. A year earlier, our young mother had ordered a First Communion cake from the confectionery. The system remembered this and assigned the person the status of a customer with children of early school age. For this segment, the sales department prepared a specific offer intended to increase the customer’s dependence on the shop. Ultimately, despite numerous discounts, the customer purchased considerably more than she had initially intended. This happened because the proposals presented to our customer were not random.
Summary
The intelligent sales system discussed in general terms in the example above was intended to present the technical capabilities currently available to data analysts.
The necessary environment and Python libraries are free and available on the Internet. Building such a system requires more than combining several simple classification models into a single whole. A so-called production system based on cloud solutions must be built. It will ensure autonomous, fault-free operation for many years.
Wojciech Moszczyński — graduate of the Department of Econometrics and Statistics at Nicolaus Copernicus University in Toruń; specialist in econometrics, data science and management accounting. He specialises in the optimisation of production and logistics processes. He conducts research into the development and application of artificial intelligence. For years, he has been involved in popularising econometrics and data science in business.
