PRODUCT ARCHITECTURE CHALLENGES: HOW TO DEAL WITH THEM AND BE READY TO SCALE UP

5 MIN READ, FEB 26, 2020
Building a SaaS B2B product for the traditional brick-and-mortar retail industry is a huge challenge. Building it with global scale in mind from the very beginning, seems insane. Alex Petrov (Co-founder and CTO at Mercaux) shares his story of how early investments in the product turned into one of the company’s biggest competitive advantages. Alex stresses that you must think about scale when making the first iterations of your product and, from his experience, scale-readiness probably costs less than you might think. These insights were shared during his insightful talk on the BUILD stage at EMERGE 2019.
Alex leads Mercaux's technology and product development teams. He has over 10 years experience as a software developer and architect. Before co-founding Mercaux, he led projects on data storage and processing systems at Yandex. With this experience under his belt, he has much to say on the subject.
Alex Petrov at Emerge 2019
Alex Petrov at EMERGE 2019

Context. Omnichannel Retail

When we think about retail, we usually think of two separate retail environments — offline and online. Sometimes retail companies themselves have two different departments — brick-and-mortar (traditional offline retail) and eCommerce channels. If these departments have separate legal entities, they can even fight against each other for revenue attribution. But in terms of revenue the split is not 50/50. In some verticals like fashion for instance, it looks more like 80/20, where 80% of all transactions are still happening offline in-store.
Offline and online retail
'Offline and online retail' from Alex's presentation
This ratio hasn't been changing significantly over the last couple of years while customers' expectations are changing dramatically. As consumers, we've quickly got used to getting all the necessary information in a couple of taps on our mobile devices and, as a result, we expect better and faster service offline too. Modern retailers know that and invest more and more in order to bridge this gap between the offline and online worlds. Their approach is changing towards unified retail, or omnichannel retail, because for a modern shopper there is no difference — you can try something on in-store and make your purchase at a later date online. Or vice versa — browse online and build your basket and then go to the shop to try it on and complete the purchase. All this requires technologies in store connecting both worlds together.

About Mercaux

Mercaux brings the benefits of digital into retail stores to enhance the customer experience, improve store efficiency and increase sales. They do this by equipping Sales Associates and stores with the digital tools they need to serve and sell smarter, across the entire customer journey.

They partner with retailers at every stage of digital transformation, from improving staff productivity and personalisation by leveraging existing data and content, through to a fully integrated end-to-end platform with their existing technologies. The solutions are operated by Sales Associates using a tablet-based app or self-served by customers using touch screen kiosks and managed by a HQ Platform.

Their core solutions such as Sales Assist, Omnichannel and Clienteling equip staff with instant access to product information, company-wide inventory, digital content, customers' profiles and wish lists, through to mobile checkout capabilities. Additional add-ons such as AI-driven Styling Suggestions, Store Communications and Advanced Analytics elevate stores towards a fully integrated digital ecosystem.
Mercaux In-store Technology Platform
'Mercaux in-store technology platform' from Alex's presentation
When clients like Nike, French Connection and Benetton adopt digital tools in their stores, they see an increase in conversion, loyalty and units per transaction (UPT). On average they experience a sales uplift of 8% and 5x ROI.

The company has expanded globally and currently its solutions used in more than 30 countries. The platform has helped assist over 300,000 purchases a month in 2019. Mercaux has 4 offices with headquarters in London and a team of more than 50 people.
Geography of Mercaux
'Geography of Mercaux' from Alex's presentation
In more technical terms, Mercaux is a B2B SaaS Multi-Tenant Modular Platform. And each word here stands for a reason:

B2B means selling to businesses;
SaaS means selling as a service;
Multi-tenant means that all the clients are kept within the same infrastructure in the backend. Multi-tenancy saves a lot of money on support and updates;
Modular means that the functionality of the product can be adjusted to meet the needs of potential clients;
Platform means that solutions from other companies can be integrated into the platform.

5 Product Architecture Challenges

During his talk, Alex shared five examples of product architecture challenges and revealed secrets on how to turn them into competitive advantages based on Mercaux’s success story.

1. Restrictions shape architecture

It's not a secret that restrictions shape product architecture and requires a lot of investment. Alex gave an example of such a restriction and the solution that became one of the company's main competitive advantages.

Wi-Fi in traditional retail stores is terrible, and this is for many reasons — landlords of shopping malls do not have an incentive to provide customers with wide bandwidth and good Wi-Fi connection, it's expensive to cover huge shop floors with a consistent signal etc. But as a salesperson, if you stay in front of a customer and your tool is loading data slowly, what would you do? Most likely you'd set the device aside and switch back to the old-school way of selling. Being able to provide information instantly is critical for adoption of high-tech solutions in stores. In order to resolve this issue, you have to have an on-device local database. The easiest way to implement it is to build any kind of synchronization mechanism of the databases between backend and frontend.
On-device data storage
'On-device data storage' from Alex's presentation
However, simple out-of-the box database synchronization won’t work. Mercaux is a multi-tenant platform, and data should be split between tenants. Moreover, it should depend on geography, language, user roles, permissions etc. So the Mercaux team invested into developing a Sync Manager — a system that knows all the aspects of data splitting and synchronizes only relevant datasets.

• This solution fetches all the data in the background and downloads data required for a particular device;
• It synchronizes changes from the last time it was updated, so it does not require wide bandwidth.

Sync Manager helped to save a lot of money in terms of web traffic and investment into infrastructure in stores. The incremental synchronization algorithm itself is quite complicated but when you need to download the whole database from scratch (for example right after you installed the app for the first time) incremental downloading can take ages, so in addition to that, Mercaux developed a mechanism allowing building databases in the backend and delivering the whole package for a specific role, user and geography into the app. They launched the same Sync Manager code in the cloud on Mac servers and build databases packages on a daily basis. The device’s Sync Manager can download a package and then start incremental updates from that point going forward.

As a result of this local storage, the data is always freshly available, and the app never freezes (even if Wi-Fi gets slow or non-consistent in the store). Consequently, salespeople trust Mercaux and don’t hesitate to use it in front of customers.
On-device data storage in the cloud
'On-device data storage in the cloud' from Alex's presentation
Long story short, it was a huge investment, but it clearly shows that you can always turn restrictions into your product strengths. These restrictions can help you developing something that becomes a competitive advantage in the end.

2. Global scale with 'local' budgets

While developing a core of your product, always have scale in mind. Alex presented two examples from Mercaux's own experience.

Targeting global brands means a multi-language environment. When it comes to language, in order to scale with your clients, you need to be able to add new languages easily.

Platform terms might require renaming. Mercaux started as a tool for fashion, so styling bundles were called 'looks' or 'outfits', but now the company also works in other segments, for example with the largest duty-free retailer in the world. And when you sell bundles of alcohol you cannot call them 'outfits', you should name them 'cocktails'. So even the same button in English should be unique for different clients.
It sounds obvious, but sometimes at the beginning people forget about it. Let’s say you have a simple object in your database with object ID, title and description. It’s a bad idea to store texts in object tables. You need to have an additional related table containing text ID, the text itself and a language ID. Mercaux also added client-specific translations, application-specific translations and pluralization. This simple structure saves hundreds of hours of redevelopment and data migration when you realize your database is not flexible enough.
Working with texts
'Working with texts' from Alex's presentation
Further down the road, Mercaux developed a management UI to set up translation conditions and import/export API’s for translation agencies. Now Mercaux’s solution can launch new language within two weeks (including translation). It means that when they want to launch a new country with their clients, they don’t have to do anything in the backend, they can just export data directly to the translating agency. When the text is ready, they upload it into the API and all the apps receive new language as part of the synchronization mechanism in real-time. Easy!
Global scale decisions are not always expensive. You need to think about global scale from the very beginning in order to avoid silly and costly mistakes.

3. Don’t reinvent the wheel… but sometimes it’s worth building your own

There are tons of existing analytics engines. Nevertheless, Mercaux realized that each of these tools have their own limitations while Mercaux’s clients require extreme flexibility, ability to export data easily. When plugged it into existing ERP dashboards they are unwilling to share sensitive data with third-party analytics providers. Alex made calculations of how heavy the investment in their own analytical engine might be.

Let’s say we have 10,000 stores multiplied by 10 devices working in real-time in each store. That’s 100,000 devices live in stores. For Mercaux, it’s not important how many individual events are generated by each device as events can be grouped into batches. If you make each batch 5-minutes long, you will end up having around 300 API calls a second.
Mercaux's calculations to create their own analytics
'Mercaux's calculations to create their own analytics' from Alex's presentation
Based on that, Mercaux developed a basic writing service with deduplication and fast key-value storage in the backend. On top of these, they also developed the insights engine, which automatically extracts data for analytics dashboards. Being a bespoke development, these dashboards are highly adjustable so not only can metrics be changed, but the way they are aggregated and presented too. In addition to that, the Mercaux team developed an external API for BI systems.
Inside the Mercaux's analytics tool
'Inside the Mercaux's analytics tool' from Alex's presentation
Don’t stick to 'Don't reinvent the wheel' mantra. If you feel something can become a part of your core product, make estimations and invest. In the end, flexibility of your own solution pays off.

4. Perceived personalization costs less than real personalization in the long term

The enterprise world has always been demanding customizable solutions. All big companies expect you to adapt software solutions for their specific needs, but you have to be flexible for unique business processes and challenges in some instances. And of course, white labeling is a must.

There is an interesting example of the cruise ships marketing world. In cruises, they give you a perception of high personalization. But in reality, there is just a conveyor: one day you swim in a pool, another day you play tennis and on a third day you're having dinner and the captain approaches your table to shake your hand. You feel like 'wow, I'm special'. But the truth is that captain approaches tables on a regular basis based on his schedule, every day.

This level of perceived personalization has been achieved at Mercaux by building highly configurable software solutions. Tons and tons of different settings in the app are capable of being changed completely — from the front page down to the main user scenarios. Mercaux wants to provide its clients with the comfort of customizable and adjustable solutions without making real development every single time.
Perceived customatization Mercaux
'Mercaux's perceived customatization' from Alex's presentation

5. Keep your product and data clean and isolate legacy

When you work in an old market, and retail is a very old business, quite often you’re dealing with old school solutions, that were deployed in the 90s. Sometimes data is entered manually into Excel tables and then imported into the CRM or ERP system. No surprises that data quality is quite low and even format is sometimes inconsistent.

The Mercaux team could have developed individual links and plugins for all API’s to connect to each retail system. Instead, the team decided to build an intermediate layer, which they call an integration hub. In a nutshell it’s an ETL system (Extract, Transform, Load). It extracts data in the format of each retail system, transforms and loads it into API in a consistent and unified format. API is not affected by the retail systems and can independently evolve delivering product vision. Thankfully, after every new integration this integration hub evolves and learns new ways and formats to integraste. Now Mercaux is proud to deliver integrations within a couple of weeks rather than six or eight months, which is the standard for enterprise systems integrators.
Integration hub Mercaux
'Mercaux's integration hub' from Alex's presentation
Their own ETL engine has a validation stack, monitoring system to control the data quality and also shows alerts to notify engineers and technical project managers about any issues.
Don’t let legacy systems get into your product. Try to isolate your core product from any potential external disturbance. Modern and flexible software cannot depend and be pulled back by the old school legacy.
This is how Alex concluded his talk on the BUILD stage at EMERGE. The above described solutions for product architecture challenges will not just help you to scale your product to the global market, but also give you the opportunity to save you time and money too.

EMERGE team hopes this article will be useful to you and your team. Stay tuned with our future blogposts!
IRINA ZAITSEVA
Contributing Author, EMERGE
Team coordinator and business analyst in IT. Passionate about salsa dance.
RECOMMENDED POSTS