My Funnelwise Microservices Architecture For Mature e-Commerce Retailers

Hey friends,

This blog-post is about my recent project – Microservices Architecture Design and Implementation for High Volume Retail e-Commerce.  I  recently finished this for an e-Commerce Startup in India and hence I thought of blogging about it.  I hope you will like this and actively comment.

Microservices Architecture – Quick Introduction

A ‘Microservices Architecture’ or ‘Microservices’ is a software architecture design practice.  It is not a software, code or framework by itself – rather it is a style of designing complex software that leverages smaller, yet independent software components called ‘Microservices’.

Microservices pattern has found huge relevance in software industry because the latter is going through a transition from an ‘on-premise, fixed capacity’ paradigm to ‘cloud-based, on-demand capacity’ paradigm. A cloud environment allows fine-grained control on computing resources and associated costs.  Another reason of Microservices to have gained popularity is attributable to ever increasing agility in business and associated software development teams.  Teams are working on multiple software components at the same time.  Each component represents a set of business problems which are called concerns in Microservices context.  These components have different levels of efficiency, reliability and delivery times.  Therefore there is a need for a loosely coupled software architecture that is inclusive yet fault tolerant for round-the-clock business continuity.   That’s where Microservices Architecture fits in.

On a very high-level, Microservices architecture is about building Monolith of Monoliths rather than building one Monolith.  Simply said – build smaller software components (Monoliths) that are aligned to specific business concerns; deploy, run and scale such Monoliths independent of each other; and expose a standards based communication protocol (usually RESTful APIs) which can become a universal communication language between multiple Monoliths.  And, if need be, integrate multiple such Monoliths with an Integration Monolith (Integration Fabric) that a) orchestrates the communication between multiple Monoliths; and b) becomes a common user interface with a seamless user experience.  All small Monoliths are henceforth referred to as ‘Microservices’.

A detailed explanation on Microservices is available on the web – Click Here.  I suggest that you refer to this resource in case you wish to deep-dive into theory of Microservices.

e-Commerce (Retail) and Traditional Monolith Approach

e-Commerce software (aka Shopping Cart Software) whether you bought one off-the shelf (such as Magento, Hybris, ATG, InterShop) or developed in-house is a Monolith.  It is one huge software package that lets you build and run landing pages, catalog, shopping cart, checkout, payment and back-office operations.  My client is no different – they were also about to invest in a Monolith until I came into picture.

Here are some key problems in the Monolith approach:

  1. Indiscriminate & Inefficient Linear Scaling – You deploy the software on one or more than one server(s) (server instances  or application containers in context of cloud or virtualized environment) depending upon the anticipated load (traffic).  When load goes up, you deploy additional instances of the same software to increase capacity.  By replicating instances of a Monolith you increase capacity in each business concern of the software application whether or not you need the same capacity at each stage.basic-e-commerce-funnelThink about this in context of an Online Conversion Funnel.  The amount of capacity required on top of the funnel (landing pages) is much larger than the capacity required towards the bottom of the funnel (checkout).  A simple math – for every 100 customers on the top of the funnel, there is just 1 customer at the bottom (@ 1% conversion rate).  Therefore indiscriminate replication of Monolith instances leads to a discriminated utilization of resources as one traverses down the funnel.  Towards the end of checkout, you use only 1% of the provisioned capacity wasting 99% capacity which could contribute on top.
  2. Inefficient Software Testing and Slow Release Process – In a Monolith approach, even if the developers make a change in one area (say shopping cart), one has to test the entire application end-to-end to ensure that a change in one area has not impacted any other area.  Since the software code is intertwined set of classes, one cannot take a risk of deploying modified software by merely testing the area touched by developers.  It is highly possible that a change in one area has an impact on a critical area such as checkout or payment.  Therefore each release means a time-consuming regression of entire test suite before a release is certified as production ready.  This is an inefficient testing and release process.
  3. Inability To Be 100% Agile – These days multiple development teams work on separate areas of a Monolith in parallel.  Despite proactive project management and impediment management, it is very frequently seen that multiple teams are not able to release their code for production at the same time.  Therefore all teams cannot follow a common release cycle.  Hence, in case of a Monolith application development, if any team misses a release date, they have to duck out their code from the release candidate, let others go ahead and wait for the next release cycle for inclusion.  What if the team whose code was not ready on release date is ready for release the next day?  Would the QA team allow an exception and permit another release or hot-fix on basis of a partial testing? Probably never if people are accountable!  This is a clear loss of opportunity for business here.
  4. One Fault Breaks The Entire Cart – In a Monolith application, the chances of a fault to break the entire funnel are very high because the code within a Monolith is either tightly coupled with other pieces of code or has an indirect impact on working of other classes by breaking away from the contracts.  An exception in shopping cart or shipping option can break the entire funnel much easily.
  5. Blame Games – If the application bombs in production, it usually triggers a nasty blame game in the DevOps which is settled by a comprehensive root-cause-analysis by a leader.  I and my client didn’t want to encourage this culture.  A Monolith approach was not suitable to us for this reason as well.

My Funnelwise Microservices Architecture For e-Commerce Retail

As part of the engagement, I served several options to my client.  The illustration below represents a very high-level Microservices architecture that finally won the election in first round of the pitch.  Subsequent designs are much detailed and complex which obviously are out of scope of this post.  The design below is missing some other key components like Search Microservice which were added in subsequent versions.

The diagram will tend to intimidate you a bit initially but don’t be.  I have described thought process in short so that you may appreciate the beauty of this masterpiece.

Funnel e-Commerce

Since a Monolith application architecture was not suitable for our client, I delivered the above illustrated Microservices Architecture on basis of these design principals.

  1. Identification of Concerns (Functional Boundaries) – To effectively build Microservices, one needs to divide Monoliths by business concerns.  In this case I rotated the Conversion Funnel by 90 degrees CCW and each stage of the funnel became a clear cut business concern which I could serve by an independent Monolith.  Concern 1 to Concern 7 in illustration above were the top seven concerns for my client for an effective implementation of an e-Commerce Retail system in the web.  We had to excel in all seven areas to be a successful online retailer.
  2. Concern 1 – Our biggest concern was to be able to handle millions of concurrent visitors on the landing pages (Home Page, Special Promotional Pages, Micro-Sites).  Therefore we built a CMS Microservice on top of a NoSQL Document Data Store (Artifact H).  This Microservice is exposed to the consumer by an independent web-app (just the presentation MVC) which has as in-built web-caching and talks to CMS Microservice through a RESTful HTTP interface.  This Microservice scales up/down the most during the day and it’s scaling is completely independent of how other Microservices scale.
  3. Concern 2 – Our second biggest concern was to be able to show product catalog in an efficient manner.  The maximum allowed response time (not first byte response) at the server was 2 seconds during peak load.  Therefore we built a Catalog Microservice (Artifact I) in pretty much the similar way as CMS Microservice but with a different data domain model.  Rest details are same as Concern 1.  The Catalog Microservice also leverages Personalization Microservice (Artifact P) and other common Microservices for Session persistence (Art. N), Analytics (Art. S) etc.
  4. Concern 3 – 7 –  As is evident from the illustration above, we kept adding a Microservice corresponding to each business concern in funnel till the end.  However each Microservice from Concern 1-7 are unique in the way they are implemented on technology front at core.  Some use NoSQL databases and others use SQL databases.  Some Microservices have BigData implementations such as Hadoop and others use Machine Learning libraries.  The Analytics Microservices has Apache Kafka Pipeline to ingest thick streams of application logs and event data generated with customer interactions.
  5. Key Pointers
    •  I enforced use of RESTful APIs in almost all the Microservices for a unified messaging protocol.  Use of RESTful APIs made development easier and contracts were relatively flexible as compared to SOAP or alternate mechanisms.
    • Each Microservice is deployed on specifically optimized containers for optimal performance and durability.  Therefore the run-time parameters of each Microservice were different according to nature of corresponding concern or transaction.
    • Each Microservice scales independent of others.  They focus on their own performance rather than worrying about others.
    • Each Web Facade (Web App) hands over customer to next Facade in a seamless manner.  The preferred data interchange approach between Facades is traditional HTTP(S) POST.

Key Positive Impacts Of Microservices Architecture

My client calls themselves an e-Commerce Technology Company rather than a pure-play e-Commerce Retailer.  Here is a list of key impacts which were noticed by my client.

  1. Highly Efficient Scaling and Cost Optimization – With each Microservice scaling to demand according to the area of concern in funnel that they belong to, the number of instance replication at each layer (concern) is different at any time.  On top of the funnel (landing pages) we operate at about 16 containers during peak hours.  On bottom of funnel we operate at about 3 containers at all times (we need just 1 but we keep 2 extra instances on for High Availability reasons).  All-together we run about 42 containers during peak hours on which we can get up-to a transaction rate (test conditions) of about 3,400 transactions per minute (Not yet felt a need to test beyond this).  If we were on a single Monolith, we would have been running close to 200 instances for the same amount of capacity.
  2. Independent QA and Rollout Of Each Microservice – My client has split its team into groups of 6 each.  Each group owns two Microservices.  (The team size and number of Microservices owned will vary on each client’s circumstances).  Each time is capable of developing, testing and rolling out their respective Microservice.  Therefore if there is a change in Shopping Cart, only one Microservice is tested and rolled out independent of others.  The time take for regression testing in each Microservice is very less.  The number of releases has increased substantially.  Each team releases at their own schedule.
  3. From Partial To 100% Agility –  The development process is 100% Agile now.  Each team is responsible for their own set of Microservices.  There are fewer inter-dependencies because web-service contracts rarely change.  No team is a showstopper for other teams.  They can roll out independently and faster.  They work on separate code repositories and unique technology stacks.  They are working in same premises right now but they may develop & release from distributed locations if need be.
  4. One Fault Is Less Susceptible To Break Entire Funnel – Each Microservice is an independently developed and tested product.  They adhere to strict standards and communication contracts.  They do not overlap or depend on code outside their realm.  Therefore a fault in one Microservice never induces a fault in other Microservice.  The aggregation layer on top aka Funnel (or Monolith of Monoliths) call each Microservice in a loosely coupled manner.  The chances of funnel breakdown are considerably less because several Microservices are non-essential for end-to-end funnel performance.  In an event of breakdown of non-essential Microservices, the funnel continues to work.
  5. No Blame Games – The teams are small and self capable.  They are responsible for ensuring that their Microservices work as per set norms.  There are fewer cases of blame games due to a clear demarcation of application boundaries.

So, you can hopefully appreciate by now as to how Microservices Architecture can change the entire ball-game of a routine e-Commerce (Retail) play.  Yes, it makes technology complex and wide-spread but then there is always a trade-off.  One loose some to gain some 🙂

About Myself

I am an entrepreneurial-spirited technologist who has managed multitude of business complexities by strategical implementation of technology in a career spanning over 20 years. I have worked in reputed online, software consulting, and startups in leadership positions.  A major portion of my career has been spent in e-Commerce industry.  I have worked in almost all departments of an e-Commerce enterprise.   I am also curator of a ‘best practice based’ high-performance hybrid marketplace technology which I give out to e-Commerce startups as a ready launchpad.

You can check my profile on LinkedIn : https://in.linkedin.com/in/akhildelhi

I hope you linked this blog post and the topic.  Please feel free to comment, ask questions and connect with me.

My IoT Success Story – Material Handling Equipments

Hey friends,

fl322This blog post is a story of a successful IoT implementation I recently concluded for one of my prestigious clients.  I hope you will find it worth reading.  As always, please feel free to ask questions, comments or give feedback.

PS: For sake of confidentiality, I have modified some strategic information and avoided naming my client.

Internet of Things (IoT) – Quick Introduction

The expression ‘Internet of Things’ or IoT represents a networked world of things around us.  These things could be cars, microwaves, bicycles, mobile phones, suitcases or anything else which have the capability to connect with other objects using some sort of connectivity (network).  When things connect to form a network, they acquire capability to talk to each other about their status, thus leading to an ‘Internet of Things’.  Now close your eyes for a second and think about it deeper – if one is able to connect virtually any thing around us with a network, imagine how the world be?  Once these devices start talking to each other, the environment (comprising of these objects) around us will tend to be more autonomous and sensible.  Our involvement in managing these things will go down because they will talk to each other and start behaving in an expected manner automatically.

The concept of IoT has opened a whole new world of opportunity for technologists, businessmen, manufacturers and designers to collaborate and design an IoT enabled world around their customers.  Car manufacturers are designing ‘connected cars’ to make driving hassle-free, safer and enjoyable.  Consumer Durable manufacturers are embedding ‘IoT’ sensors and network capabilities to microwaves and air-conditioners to help them adapt to user preferences.

My Client – Brief Context and Problem Statement

My client is about 40 years old medium sized enterprise.   They are market leader in Material Handling Equipment Industry in India.  They started as a supplier of Material Handling Equipments (MHE) (Forklifts, Access Platforms, Tow Trucks etc.) four decades ago.  A decade ago, they diversified into renting out the equipment to their big customers in warehousing, manufacturing or logistics industry on ‘wet-lease’ – comprising of the equipment, maintenance plan and a driver to operate the machine.  They started off a rental pilot with just 4 machines in 2005; today they boast of an active fleet of over 1,400 machines scattered over hundreds of warehouses and factories across India on short to long term contracts.

A large fleet comprising of large variety of equipment types rented out on a variety of rental terms brought implicit complexities for my client.  Some of the key problems they faced were:

  • Could not keep a track of inventory which was always on the move
  • Could not keep an accurate record of operating hours
  • Could not keep a tab on authorized use of equipment
  • Could not capture equipment breakdown and proactively resolve them
  • Could not invoice the client on time due to manual time-logging
  • Could not substantiate invoice due to lack of a credible time-logging mechanism and up-time monitoring

How I Resolved The Problem With IoT Implementation – Solution

I started off with a comprehensive review of the problems my client was facing.  During my client interactions, I learnt that the majority of Material Handling Equipment such as Forklifts, Tow Trucks, Access Work Platforms etc. are controlled by digital electronics.  A digital controller sits at the heart of these machines – it is capable of driving the machine as well as reporting back the health of various components of the machine in a format that computers can interpret to automate subsequent actions.  After further study of the controllers and associated low level programming, I designed the first IoT architecture for my client.  Below is a high-level overview – the original application and network architecture is much detailed and beyond the scope of this post.  This will give you a reasonable idea of my approach.

IoT Rental (1)

The first step was to connect all the forklifts and other kinds of equipment running around in various cities to a centralized monitoring and logging application in public cloud (say AWS).  I achieved this by fixing a 3G enabled Tablet PC on each machine (they draw continuous power from battery of the equipment so need not take them out for recharging) and installing an custom built Android app on them.  The result of this step is an eco-system of over 1,400 machines visible to me from a single dashboard in cloud where each equipment is known by a host-name (IP is dynamic, name is static) for example ‘equimentnumber.theirclient.toyota.myclient.com’.  The naming convention follows a strategy so that one could make out the type of equipment, location and client from the host-name itself.  If any machine drops out or joins in the network, my client gets an alert leading to a defined action as per Standard Operating Procedure (SOP) set in advance by the client.  If a machine moves between locations, it automatically re-registers itself with a new host-name as per convention.

The second step was to make my ‘things’ (the forklifts etc.) intelligent – so that they may report their status, health and faults to the central system and obey remote operating instructions fed into central system from the client headquarters.  For this I hooked into the in-built digital controller system of the machine and plugged it with the tablets I fixed on top of the machines – see a high level illustration below.

Forklift Internal

As you can see from the illustration above, I connected the Tablet (that I installed on each machine) with the in-built equipment digital controller through a custom built digital interface and media and protocol converter.  The controller is further connected to the access control (key, on/off switches), motor (forward/backward, up/down), sensors (brake fail, low battery, electronics failure, safety hazard), power steering, dashboard (speed, battery indicator, etc) and other traction parts (hydraulics, stoppers etc).  Once this activity was completed, I got virtually 100% control over the functioning of the machine through an app installed on the tablet.  I must admit that a lot of effort went into the build of the digital interface cum media converter.

The third step was to wire up the entire jigsaw with a software.  As part of step 1 and 2, I achieved a real-time database of the entire fleet, capability to pull data from any equipment and push commands into it remotely.  In step 3 I developed few software components to accomplish and end-2-end IoT Automation vision I set out for my client.

  1. A web-based management application hosted in the public cloud for my client:
    • to manage the fleet – add/remove/modify/relocate inventory
    • configure rental plans
    • create usage restrictions for drivers as per rental plan
    • to monitor health of equipment and proactively manage faults by timely repairs
    • to invoice their clients based on real-time usage report captured from equipment
    • to monitor performance of their rental business (various graphs, dashboards, reports etc.)
  2. A REST API endpoint in cloud
    • For equipment to push and pull data in cloud
    • For other applications at client side to communicate with the IoT Fleet system
  3. A Big-Data Based Monitoring and Logging Framework
    • For capturing large streams of equipment data coming from diverse sources
    • For building real-time analytics and business intelligence
    • For archiving critical equipment data for future re-use
  4. A CRM module for client
    • To monitor their use of rental equipment
    • To download their invoices
    • To pay rental fee online
    • To manage fleet – order more, remove/cancel, relocate, re-optimize

The Business Impact

During entire implementation, I kept an eye out on any opportunity that could have positive business impact for my client.  When I started over a year ago on this project, both I and my client did not have 100% visibility of final solution.  However both of us had faith in each other and we shared a common vision which lead us to a successful (rather exemplary) IoT implementation.  Here are some of the impacts:

  1. Entire billing is automated today – zero time is spent now on collection of data from drivers or punching of manual log sheets.  This has:
    • saved substantial human resource costs for my client
    • made their invoicing automated
    • improved their cash-flows due to timely invoicing and collection
  2. Maintaining a 1,400 equipment fleet is not easy.  Today my client does it automatically.  They are talking about scaling inventory to 5,000 equipments in next 3 years.
    • Majority of faults are automatically created in fleet maintenance software
    • Client fixes fault even before the users notice them
    • Client is able to preempt and plan ahead for replacement parts
    • Each equipment has an associated fault log and maintenance log
  3. Fleet is heavily optimized.  Today my client buys less equipment (lower CAPEX) thanks to maximum utilization of existing fleet.
    • They are able to view idle equipment and relocate it to needy clients
    • They know which equipment type gives maximum ROI, hence invest in high performing assets only
    • They know the output of a machine which in-turn helps them to buy more capable machines in future
  4. My client has built a relationship of trust with their clients.
    • Their clients trust the invoices because they know it is computer driven
    • There are fewer disputes related to invoicing
    • Clients get higher equipment availability due to proactive maintenance
    • Our client is able to generate incremental business from existing clients.

As you can understand, IoT implementations can be complex but very interesting.  If you belong to technology fraternity – take a plunge now – it’s worthwhile to acquire some domain knowledge of IoT.  If you own a business or influence a business, this case study could potentially inspire you to take up an IoT implementation at your end.  People like myself are readily available to help you with an end-2-end implementation strategy.

About Myself

I am an entrepreneurial-spirited technologist who has managed multitude of business complexities by strategical implementation of technology in a career spanning over 20 years. I have worked in reputed online, software consulting, and startups in leadership positions.  A major portion of my career has been spent in e-Commerce industry.  I have worked in almost all departments of an e-Commerce enterprise.   I am also curator of a ‘best practice based’ high-performance hybrid marketplace technology which I give out to e-Commerce startups as a ready launchpad.

You can check my profile on LinkedIn : https://in.linkedin.com/in/akhildelhi

I will love to connect with you.

Your comments on this post are heartily welcome.

 

Magento – Love You, Love You Not – Untold Saga Of 8 Years EMA

magento-logoHey friends, this post is about my experiences with Magento – the world’s most popular open-source e-Commerce platform since OsCommerce (a very popular Open Source e-Commerce platform of 1990s and early 2000s)

I receive several queries from my professional network asking for my views on Magento.  The queries are usually related to usability, adaptability, performance and scalability of Magento in various application contexts.  So I have finally thought of penning my views down to avoid repetition as well as share my knowledge with a larger community.

Why are my views on Magento important?

Lot of people seek my views on Magento despite of the fact that there are millions of interesting articles about Magento already floating in WWW.  Why are my views important?  Because I am the first adopter of Magento in India – yes the first one!

Magento debuted for general public in March 31, 2008.  But the majority of development of first release was done in 2007.  Varien, the founding company of Magento (ex OsCommerce guys) released their first beta on August 31, 2007.  I, around the same time in 2007, was scouting for a reliable alternative to OsCommerce (another very popular open-source e-Commerce project) that I had been working for about 6 years already.  My intentions were to launch my own e-Commerce startup in India (RateTag.com); and I already knew that OsCommerce was not the right choice (it lacked Object Oriented programming style of PHP5 and there were several gaps in functionality which I would have to bridge by way of 3rd party modules or my own work) for the next 10 years.  During this search, I discovered Magento – they were at 0.9 beta version then.  I was simply floored by the amazing functionalities these guys had built in the beta version itself.  It was very easy for founders of Magento to create it because they had great lessons learn during their time in OsCommerce; that’s why instead of forking OsCommerce, they decided to do new project completely ground-up.  I immediately downloaded the beta version, ignored the beta warning saying it’s not production ready yet, and launched my e-Commerce play RateTag.com on 30th September 2007 (one month after the beta release).  That’s how I became the first adopter of Magento in India.

Since my adoption of the beta version, I continued to upgrade my local copy of software with each subsequent version irrespective of whether it was a major or a minor release – It did not matter to me – I had a craving for all the features they used to add or optimize with each release.   In-fact, I upgraded so frequently, that I had to write a script that used to poll their SVN repository daily for a new commit and upgrade my local copy automatically.   Therefore I have had a fare share of my personal highs and lows (successes and failures) tightly coupled with the amazing history of Magento.  I almost had an extra-marital affair (EMA) with Magento because I was spending more time with it than my lovely caring wife.

I am just one of thousands who use(d) Magento.  However divide the user base by two for a moment.  First half will represent those gray haired folks (or already bald like me) who migrated their old online business from OsCommerce or other PHP based carts to Magento and the second half will represent those black or golden haired folks (or blondes) who used Magento as part of their first e-Commerce venture.  I am lucky that I am part of both these halves; and hence my experience with Magento is quite unique.

Therefore I consider myself reasonably competent to comment on Magento – my views should help a Magento user (existing/potential) take a right decision.

Magento – Why I Love You?

  1. It’s Versatile – Magento is a well thought e-Commerce product overloaded with functionalities (aka features).  The manufacturer ships this vehicle fully loaded so you rarely need an accessory.  This has been a culture and they have always maintained it well.  Each version creates curiosity and strong craving to upgrade immediately.
  2. It’s Well Networked – The Magento community is a hypermart in its own right of e-Commerce accessories and tools.  In this community you can find solutions to virtually any kind of feature you may need or problem you may face.   The Magento community is enormous and global.  You will find here people from all over the world contributing their plugins and snippets to make life easier for others.  This is a big reason why Magento is such a huge hit – entire world adopted it very fast.
  3. It’s Accommodating – Almost every opensource project has a challenge in accommodating an extra-large community.  Magento has been very successful in this because of its modular design.  Almost every solution contributed by community comes in form of a plug-in that you can simply deploy from a web based admin interface or shell command.
  4. It’s Validated – Magento has already proven it’s worth in some highly coveted e-Commerce ventures.  Several well know global brands use it for their online stores or catalogs.  So there are ample case studies to wow and get inspired from.
  5. It’s Growing – Magento has been growing and it’s not slowing down anywhere.  They recently released Version 2.0 which is a major overhaul of the platform from 1.x versions.  They way Version 2.0 looks, it shows a road-map of another 10 years for the company.
  6. It’s Easy To Modify – Magento has been written in PHP using Zend PHP Framework.  It uses Object Oriented Programming paradigm in PHP.  PHP has been traditionally an easy language to learn; combine ease with Zend F/W and OOPS, your life as a Magento coder is much easy.  Moreover you can quickly code and refresh your browser to see the results without having to go through the pain of compilation and packaging.
  7.  It’s Easy To Extend – OOPS and Modularity of Magento platforms makes it every easy to extend/override existing functionality or write new ones by simply using ‘copy-paste-rename-mod’ strategy on existing modules using latter as a template or blueprint for similar activity.
  8. There Are No Credible Open-Source Alternatives – Honestly there are no alternatives as beautiful and awesome (assets-wise) as Magento.  I have worked on OpenCart, PrestaShop, OsCommerce, OfBiz, X-Cart, Zen Cart, Drupal, VirtueMart (Joomla Plugin) – no one is even close to Magento in terms of features, modularity or size of community.  No other opensource e-Commerce project as on date, to my best knowledge, can boast of a road-map that could potentially cross Magento’s road-map in next 5 to 10 years.
  9. It’s 100% Free – The community (opensource) edition of Magento has been 100% free for use.  They have always given full access to the community version and whatever features they have in the community version, they are all accessible from single installation.  And whatever features are there in the OSS Magento (plus contributions from community) are generally sufficient to launch an e-Commerce play with very little investment in coding.  I have tried other e-Commerce OSS products; while they easily lure you from their bold marketing punch lines, however once you spend some time playing with them, you realize that they have locked key features you can’t go live without.
  10. It’s Very Web 2.0 – Magento uses lot of Ajax and Fancy stuff on front-end.  It uses Prototype library for java-scripting.  One can also use Jquery along with it in compatibility mode.  Then it has a very well written templating framework which can be tweaked to render almost any kind of UI without having to touch to core application service classes. Therefore you will find that almost all Magento driven sites are quite stylish (very Web 2.0)

Magento – Why I Love You Not?

  1. It’s Overwhelming – Magento is a behemoth.  It’s a giant e-Commerce product that comes as a single orderable SKU in terms of functionalities.  Therefore there are hundreds of features in it which a typical e-Commerce play will never require.  But you do not have an option to exclude what you don’t need at the time of ordering.  You get a truck when you can manage with a bicycle.  Hence you need equally big a server (or few) and technical resource (or few) to use and maintain it.  I would even dare to estimate that 80% of Magento users never use more than 20% of the features.
  2. It’s Monolithic – In a world of Microservices and Agile Development, Magento is a misfit.  It is a monolithic web application that ships and work as a single tarball of zillions of lines of code.  Therefore it is very difficult to split the code apart, focus on areas of interest (concerns) (think Microservices paradigm as an alternative) and develop or enhance product in an Agile Distributed development environment with hybrid set of internal and external development resources.
  3. It’s Not Cloud Friendly – Magento, they way it is pre-packaged, is not cloud friendly.  A cloud environment (AWS, Azure or Google Cloud) is an elastic pool of virtualized computing infrastructure with several attachments like memory, storage, network etc. (think of host instances running of Xen hypervisor virtualization fabric).  The clouds I just named are public places – they restrict users on each resource available – Memory, CPU, IOPS, INodes, Traffic, Storage – everything is rationed and billable on pay as you go basis.  Therefore, if you simply download a copy of Magento, upload it on a LAMP (Linux Apache MySQL/MariaDB PHP) server/container on one of the cloud compute instances, it will simply not work – I am 100% sure about that.  You will have to seek an expert’s help to optimize your cloud containers (whole cloud configuration in-fact) and configuration of Magento as per the design of your business (your context).  Someone may argue that there are pre-optimized ready to deploy instances of Magento for cloud – I challenge that such readymade instances (think AMIs in AWS) are mere pieces of demo and without a considerable re-configuration/fine-tuning effort by an expert, they are useless for any real-life business use.
  4. It Doesn’t Believe In Sharing – OsCommerce was popular because people could deploy it on small Virtual Private Servers (VPS) which used to cost them $10 or so per month at the web host.   VPS (servers) are virtual instances of host operating systems running on shared hardware.  The administrator of visualization system controls how much compute resources are to be given to each instance.  Pretty much the same way cloud instances work today.  Before VPS became popular, OSCommerce used to run like a wind on shared hosting where the host used to give login access to a particular folder (Doc Root) on a physical server for uploading PHP files.  The site used to run off a virtual host configured in Apache web server using the designated folder of user as DocRoot.   Magento doesn’t believe in all this.  When Magento was adopted in 2008/2009, people assumed that Magento will work on their existing VPS plans or may be a higher one.  They never knew that dedicated servers (notice plural) will be required to run Magento.
  5. It’s Slow – Yes, it (Magento Community Edition) is as slow as a Tortoise.  The Enterprise version is faster but it is very expensive – not everyone can afford it.  Magento’s design through the version 1.X age was never focused on speed.  The company focused on features only.  The net result is that the Magento CE  versions are utterly slow and unsuitable for ‘traffic heavy’ websites.  The Magento EE is faster than CE versions but it is still slower than what is required in today’s competitive world.   There are several reasons why Magento is slow.  I will only touch upon some key pointers for sake of brevity.
    • The community version (1.x series) does not have any in-built caching mechanism to store and deliver frequently used web objects.  The enterprise version (1.x series) uses Zend Framework’s Container Cache services to render frequently accessed web objects – this adds dependency on Zend Containers (extra cost) and is still not the best practice caching implementation.  Version 2.X which is just launched in November 2015 has full-page caching in both Community and Enterprise versions but-but-but this version is bleeding edge and is yet to be market validated.  The migration of 1.X to 2.X is not straightforward click-of-a-button affair.  It is being said in community that industry will stick on to version 1.X for another 2 years.
    • Magento uses SQL Database as its datastore.  Majority of people use MySQL with Magento.  Magento uses Zend ORM framework to talk to SQL database.  The SQL queries of Magento are not tuned for speed and performance from SQL point of view.  This has a direct impact on user experience.  In absence of a well thought database fine-tuning, Magento (CE or EE) will under-perform.
    • Magento web frontends are heavy-weight lifters – there are too many XML layout files and HTML snippets that work together to render each page of Magento.  They are utterly sluggish if you ask them to run.
    • Magento is heavy code everywhere – thousands of intertwined PHP classes, bootstrap, warm-up and chained executions make it an inefficient code in terms of speed of execution.
    • Magento does not leverage threading/parallelism paradigm – every execution of Magento code is a uni-threaded sequential execution of a long chain of PHP classes which further depend on a chain of Zend framework classes to achieve their objectives.  It does not leverage threaded models that are possible with JAVA or .NET type of languages.  This limitations comes from PHP and will stay there for a long time.
  6. It Does Not Upgrade Seamlessly – Of hundred of upgrades I did in my copies of Magento, I am unable to recall a single instance where the upgrade was as simple as a click-of-a-button.  Every time I upgraded, the SQL upgrade commands will fail at one place or another either because they tried to modify database to such an extent that the connection timed out or there was a conflict or a SQL exception.   On top of this if, I was using 3rd party plug-ins, it was 100% guaranteed that an upgrade will bomb.
  7. Sluggish Checkout, Broken Funnel – Magento uses bad SQL language in checkout portions.  This is apparent when multiple customers are on checkout at the same time and are switching between the checkout tabs (login, shipping, payment, preview) etc.  The blocking SQL commands lock SQL tables which makes concurrent checkouts almost impossible.  Due to this checkout part of my funnel always used to give me nightmares.  Whenever I used to pump-in money on bumping up the traffic, my conversions simply did not add-up to the kind of spend I did.
  8. It’s Fuel Guzzler – Magento is a a fuel-guzzler in all ways.  It requires a shop owner to spend exorbitant amount of money on hosting, developers, system administrators and designers.  To be honest SMEs don’t have that kind of budget.  So they must rely on time-sharing consulting services of freelancers which is a pain in itself (freelancers are ad-hoc, moody, generally busy, disappear after some time etc. etc.).  The evolved customers (heavy transaction load) can afford to pay for the resources to manage their Magento deployments but they will never be satisfied with the performance of Magento speed-wise or funnel-wise.
  9. Enterprise Community is Expensive Affair – The Magento Enterprise development community is a different club all-together.  There are very evolved consulting companies of repute and talent who are Magento Certified partners.   So they should be able to sail you through your bad times with Magento – however, the costs are exorbitantly high.  I remember sending RFPs to few Magento partners for a greenfield Magento project for an Enterprise grade user I was working for.  Both of them almost unequivocally set a minimum budget guarantee of USD 1,50,000 before they even opened my RFP PDF file 🙂 .  On top I was looking at spending about USD 30,000 on Magento EE licenses and another USD 1,25,000 on first year of production support.  Worst part was that the Non-Functional Requirement of maximum 10 seconds of page rendering time was not acceptable to any of these vendors at any cost.
  10. Magento changes too frequently – That’s an asset and a liability.  For me it was more a liability than an asset.  With each change came features I could not resist myself to adopt.  And with each release came implicit upgrading and performance issues.  Therefore it was very difficult for me to stick to one major release for at-least a year and tell it to myself that I will not touch my code for next 12 months.
  11. APIs are as sluggish as the web front-end – The Magento APIs (PHP or SOAP Web Services or REST API) are as slow as the web front-end because they use the same services and DAO (Data Access Objects) infrastructure of the code that is used to drive the web side of it.  In my application, I had to aggregate product and inventory feed from multiple suppliers for which integration via PHP API or Web Services was key to success.  When I leverage these APIs, it took ages for an update of even 10,000 products to complete.  The code used to work at a speed of a clock – one product per second sorts.  Hence I had to (and I could manage to) hack my way down to low level SQL queries which did the trick for me.  I am sure Magento will never recommend this (your support will be void in EE version if you tinker with internals of the product) and you may not be able to even manage it.
  12. Mobile App on Magento APIs – Forget it – see reason above – you simply can’t launch a responsive Mobile App if your are not sure of how well your REST APIs will work.
  13. If you are hopeful of doing thousands of orders per day, Magento is not right for you – be it Community Version or Enterprise version.  A contrary view may be that there are so many success stories out there.  My counter argument is that technology has to be nimble, efficient and cost-effective.   Magento is not cost-effective at a scale of thousands of transactions a day.  It will remain an expensive product for many more years.  For people who operate in range of 500 to 2000 orders per day – a heavily optimized Magento deployment may work with a considerable cost overhead on COGS due to at-least one in-house Magento resource.  For people operating in range of 10-500 orders a day, moderately optimized Magento deployment can be sustained with help of a freelance consultant.   In any of the cases I just mentioned, the business owners will continue to heavily doubt the funnel performance of Magento – Web Analytics will show that quite clearly.
  14. Does not leverage Content Delivery Networks (CDN) and Edge Delivery paradigms to the fullest.  It merely uses CDN for offloading delivery of static objects like images, css, js etc.  CDN is a very large discussion area – so I will be concise.  CDNs are used to deliver content to customer faster from nearby servers.  It can be used to deliver both static and dynamic content.  Magento does not integrate seamlessly with any CDN to deliver dynamic content.  It has to be manually modded to reap all benefits of a CDN.
  15. Lacks Search Facility – User driven search is one of the key functionalities required in any online catalog.  If your system does not throw relevant search results, your customers will bounce off and go elsewhere.  Magento Community version never had a robust search technology.  It uses SQL based fulltext search queries (or simple like queries) on an table of indexed keywords.  This is not a true text search engine – rather a cheap substitute.  Therefore one would have to rely on 3rd party Solr/Lucene/Elasticsearch plugin to get true search capabilities.  These external modules are usually paid and they do not leverage full capabilities of modern search engines like Solr and Elasticsearch (think facets, aggregations etc.).  This is a very big drawback in Magento 1.X series.  The Magento 2.X series talks about in-built Solr index in EE.  The community version is still devoid of the true search capabilities.
  16. Extremely Dependent on Indexes – Since Magento uses ORM framework of Zend to talk to SQL databases, lot of queries were optimized over a period of time by adding indexes.  Therefore there are indexes as patch for problems and there are indexes built-in as part of past lessons learnt by the company.  The net result is that a Magento store relies heavily on SQL indexes to work properly.  It does this as a batch which you would typically do at night when there is least amount of load.  In my cases the indexing process went on for hours.  In-fact I remember times when indexing process started at 1 AM and finished around 11 AM during peek load times.  Magento never spent time on an efficient incremental indexing mechanism which could potentially run the whole day rather than recreating whole index as a big batch.  They did some optimizations in the 1.7X version upwards but I had to keep automatic indexing completely off except for a couple of critical ones like stock and price.  There are mods available in community that tweaks indexing process but none of them are reliable.

Why Did I Sustain This EMA for 8 Years?

The only reason I could survive a 8 years EMA with Magento was because:

  1. I was full-time employed with another company and my e-Commerce play on top of Magento was a personal strategic decision of acquiring knowledge of a fast evolving phenomenon.
  2. I happen be a very competent technologist to handle a behemoth like Magento.  Since I am proficient in both development and system administration, I could manage the code in both lab and production environments for my use.  Majority of businessmen can’t do this.
  3. I had high hopes from each subsequent release – since I was not relying upon Magento for my daily bread & butter, I waited for it to mature on its own till the time I needed it fully.   So we got along well with each other for good 8 years.

What Happened After 8 Years EMA?

After 8 years of fruitless affair with Magento darling, we parted our ways.  It was me who said bye bye.  I decided to spin-off my own e-Commerce play with some friends, hence, I needed a true e-Commerce workhorse that Magento wasn’t.  So rather that getting into another EMA, I preferred to help myself.  Today I am a proud owner of a rock-solid e-Commerce platform built ground-up with my knowledge of the e-Commerce business and technology.   However instead of running an e-Commerce play of my own, I have decided to focus on technology and product and let my software be used by e-Commerce startups as a ready launchpad.

About Myself

I am an entrepreneurial-spirited technologist who has managed multitude of business complexities by strategical implementation of technology in a career spanning over 20 years. I have worked in reputed online, software consulting, and startups in leadership positions.  A major portion of my career has been spent in e-Commerce industry.  I have worked in almost all departments of an e-Commerce enterprise.   I am also curator of a ‘best practice based’ high-performance hybrid marketplace technology which I give out to e-Commerce startups as a ready launchpad.

You can check my profile on LinkedIn : https://in.linkedin.com/in/akhildelhi

I will love to connect with you.

Your comments on this post are heartily welcome.

 

Indian e-Commerce – Amdani Addhanni, Kharcha Rupaiya (Salary is half a rupee and expenses are a whole rupee)

DVD-A204_Aamdani_Atthanni_Kharcha_PupaiyaAmdani Addhanni, Kharcha Rupaiya – remember this Indian saying?  Almost every household in India is familiar with this – your salary is half a rupee and your expenses are whole rupee!  Infact – just found that there was a Bollywood film on this theme featuring our great comedy star Govinda.  The movie goes like this – “Jhoomri and her husband, Bhimsha, move into a new neighbourhood. Their immediate neighbours are three squabbling couples, namely Vijay and Anjali who are newly married; Appu Khote and Vimla, who are married and have 4 children; and Ravi and Meena, who are also married and have one child. With their wages unable to keep up with inflation and high cost of living, unable to pay even rent to the landlord, B.K. Kakkad, the wives decide to seek employment to augment their income, with hilarious results from their spouses, who will go to any extent to keep their wives at home, even if means to bring a dancing girl home to cook and look after the children!!” (Source: IMDB)

The Indian online retail scenario today is a typical “Amdani Addhanni, Kharcha Rupaiya” sequel – and we, the members of e-Commerce fraternity of India, are actors playing Jhoomri, Bhimsha, Vijay, Anjali etc. depending upon our respective circumstances.   Yes, it’s true – our e-Tail incomes (think wages) are insufficient to keep up with the cost of running our business (think household) 🙂  Let’s view this comedy together and understand why our ends are not meeting?

compete.jpgUnhealthy Competition – Indian businessmen are unique characters in this world.  They loose their own opportunity to knock down competition.  And competition behaves the same way back with them :-).  These people won’t earn themselves and won’t let the competition earn too.  The Indian Online Retail space is such.  With price the single most effective USP for everyone, it has become the most effective tool for businessmen to knock competition out.  Net effect – no matter which product or category you curate, it fizzes out rapidly with traction.  I have tracked my categories for over 6 years in India.  I am yet to see a category which has survived more than a couple of months as ‘exclusive’.  The moment someone creates demand, others jump into it and kill it by hefty discounts.  The online marketplaces are the biggest culprits here – they only know how to kill a category.


Costs of Acquiring Customers (CPAs) Are Unrealistic
 – Every shop needs customers and a new shop owners must spend money to acquire them, this is no-brainer.  The tough-call though is who you are buying these customers from?  Answer – Google, Facebook, Twitter or anyone else like them who has first-hand access to potential customers (affiliates, news sites, porn sites etc..).  These baddies know their worth and hence they make you bid for acquiring customers based on a theme or context (keyword).  This is where things are ugly in India – every online shop is in customer acquisition mode (with more opening up on daily basis) and they are all competing with each other on the similar themes or contexts.  Due to this, everyone ends up bidding higher & higher to outbid unknown competitors leading to an unrealistic average cost of acquisition.  My studies show that an average cost of customer acquisition for online retailer could be anywhere between INR 650 (USD 10) to INR 50,000 (USD 730) (I am in my senses!) depending on how well thought your acquisition strategy is, how efficient corresponding marketing campaigns are, how fierce the competition is in the given context of yours and how well funded your competitors are.  Let’s assume a ballpark CPA figure of INR 1,500 for our subsequent analysis.

Indian Customer’s Lifetime Value (CLV or CLTV) Is Either Going South Or Is Indeterminable – Congratulations! you just spent INR 1,500 (CPA) to acquire a customer from your first order.  Did you earn it back (think EBITDA) in first transaction itself?  If you did, you don’t need to read this post further.  Most likely you haven’t – you are one of thousands who are relying on recovery of this investment from Customer’s Lifetime Value (CLV).  A typical Indian Online Customer Lifetime Value ranges between INR 400 (USD 6) to INR 3,000 (USD 43) (used to be higher back in 2010) and this is continuously going down because of continuous market fragmentation and increasing competition.   The CLV numbers I am quoting are industry averages – there is no science behind the figures and hence you cannot clearly determine a target CLV for your business.  In most likelihood, if you are relying on recovering your INR 1,500 CPA from CLV, it’s going to happen in about 30% of the cases only – could be higher if you can deliver the best online shopping experience end-to-end.   But since there are no well defined benchmarks of service levels or customer expectations in Indian e-Tail industry yet, you will have a hard time working and optimizing this index.

Indian customers are tough –  A) there is no sense of loyalty; B) they are price-sensitive; C) they do not mind going through the entire discovery process of shopping to save bucks; D) they are very difficult to satisfy;  E) they are difficult to serve.   On top the same customers are continuously exposed to new brands leading to a faster churn in brand recall.  

There Is A Whole In The Acquisition Bucket (Customer Retention) – Along with acquiring new customers on a daily basis (god knows till when), you are loosing them daily too because there is a hole in your customer bucket (think bad service, poor product quality, poor price, bad packing, unfriendly policies..etc. etc. ).  So you have to spend almost equally in Customer Retention too which in-turn will have a direct impact on your CLV above because theory assumes Customer Retention to be a constant which is practically is not the case.   So if you spent INR 1,500 in CPA and are looking at 100% retention guarantee of customer for next one year (so that you may recover your investment), you are looking at spending another INR 1,000 or so on the same customer in retention only.  You will either pay this off in form of discount coupons, loyalty benefits, re-targeting, exclusive promos, etc.  Therefore your CPA is about INR 2,500 and not INR 1,500 if you are running business on principles of CLV.

Some Musical Entertainment For You “Harry Belafonte – There’s a Hole in the Bucket” – I heard this song in my teens and I can’t stop myself mentioning it here because I see some relevance.

Margins Are Wafer Thin, CPA Recovery Will Probably Never Happen – Look at your average selling price and associated margin.  I meet and interact with several e-Commerce players in market.  The industry average selling price (ASP) is INR 700 (USD 10) and industry average gross margin is 18% (gross absolute contribution margin INR 126 or USD 1.8) in high volume categories (there majority of top line is) and about INR 2,500 (USD 37) with an average gross margin of 25%.   The net margin (again think EBITDA) in majority of the cases is negative so I don’t even feel like quoting it 😦  Therefore if it is about recovering CPA of INR 2,500 (no longer INR 1,500), it never happens for majority of retailers. (Exceptions are there and they are few only).

Customer Recall (I am recalling Govinda’s song – “Tum To Dhokebaaj Ho, Vada Karke Bhool Jate Ho” – You are a cheater, you forget me after promising..) – You need money (in millions & billions) to create a niche for yourself in a huge market like India.  Diverse cultures, languages and consumer behaviour makes life of a marketeer even more difficult in this country.  Therefore you require millions in your pocket to get into customer’s mind and stay there.  That’s where you see Flipkart, Snapdeal and Amazon trying to spend major portion of the investor’s money.  They are not letting anyone else slip into customers’ minds – no matter what it may cost.  I meet lot of investors and business management graduates – I am yet to get a clarity of a scientific way of calculating right ATL budget.

Poor Logistics Infrastructure (Either Own It Or Perish) – Every time there is a shopping season, Airport Authority of India (AAI) puts an embargo on air shipments because the existing flight infrastructure can’t simply cope with the ad-hoc peaks in demand.  Therefore all leading marketplaces have either setup or acquired or pre-bought logistics infrastructure to be able to deliver in reasonable time.  Still they are unable to deliver within 2-3 days.  I remember Flipkart Big Billion Day Sale in October 2015.  The average delivery time being quoted was 15 days even though they have their own logistics company E-Kart.  In such a scenario smaller retailers are no-where in wishlist of 3rd party logistics provider like Bluedart, DTDC, etc.  They want a minimum commitment of business per month of around INR 10,00,000 (USD 15,000) to operate end-2-end logistics of a new e-Commerce company.  That’s a fixed cost or an entry barrier for new players in this market.  Smaller players (think relatively only) can agree on smaller commitment of business but they cannot ensure timely delivery because they either piggy back on established incumbent logistics provider I just quoted in last sentence or use alternative road transport mechanisms which are very slow.  So there is a chicken & egg story here.  Either you commit to a fixed target upfront (minimum billing), or pay premium on logistics fee to survive.   Flipkart, Snapdeal etc. have invested huge money in their logistics wings which is not possible for everyone.

Technology Team Costs Are High – Gone are the days where you could pay a couple of Lacs Rupees to a coder and get your project done.  Today’s technology require experts with deep knowledge and experience to meet challenges posed at you by market dynamics.   Such resources have a cost that runs into several Lacs or even Crores.  Moreover if you were to sustain high demand and spikes in traffic, you need an equally good amount of investment in IT infrastructure be it cloud, on-premise or hybrid.  If you manage to rope in some kick-ass guys, you are looking at quite a bit of fixed cost in technology alone.

Amdani Addhanni, Kharcha Rupaiya – So let’s put all the pieces together and summarize.  The cost of establishing and running an online retail play in India (Kharcha) in current market circumstances is far more than the income (Amdani).  Those who are already into it are busy augmenting their incomes from alternative means of revenue generation.  Life is not easy for them – Amdani is always Addhanni, while Kharcha is Rupaiya.  And those who are still at the shore wanting to take a plunge, this post of mine should be act as bit of a red-herring prospectus.  Wish I could think of some good news too 🙂

How Can Kharcha Be Addhanni, And Amdani Be Rupaiya? – Well if you have invested so much of time in reading my post, it is my duty to also give you some positive advise in case you decide to take a plunge.  🙂

  1. Exclusivity is key – get products that are exclusive – you will be able to command a higher profit and able to sell at a price you deem is appropriate.
  2. Liquidity is important – get products that sell fast at any cost – never land up with any inventory that just does not sell at any cost.
  3. Come out of competition and commodity – don’t sell a product because there is a big market for it.  If there is a big market, there is a big supplier base also.  Identify opportunities where there is a gap between demand and supply.  Offer products which your competitors can’t get as fast as you can.
  4. Build Your Customer Acquisition Strategy Before Your Business – a well thought and well calculated acquisition strategy can prevent you from taking risk and understanding quantum of opportunity.
  5. Get a proficient digital marketing resource – if you invest in a right digital marketing person, your marketing costs could be drastically lower.
  6. Invest in right technology and technologists – it’s a fast evolving game – you need hands-on champs with solid experience in handling volumes and turning around apps at wink of an eye.

So Why Are People Going Crazy About It?  Why Flipkart and Snapdeal putting in so much money when they are making losses?

One of my LinkedIn network friend (Yash Jaiswal) recently drew my attention towards this graphic posted by YourStory.com talking about thousands of crores of losses posted by Flipkart, Snapdeal and PayTM in India.  I could not resist commenting on it and I am happy that my thoughts were resonated in the community.  So I am putting my assessment here.

PS: This is my personal assessment.  No intentions of offending anyone here.  Please feel free to comment and put in your thoughts.

In my view, Flipkart, Snapdeal, PayTM etc. were never intended to be e-Commerce plays by design.  All those inspiring stories told by their founders of solving a problem etc. etc.should be taken with a pinch of salt.  These companies are investors ‘money games’.  These companies may have bootstrapped in garages or hostel rooms of IITs initially with a great thought but they sold off their soul the day they took VCs into it.  Therefore all these losses (INR 372 crores in PayTM, INR 1,340 crores in Snapdeal and INR 2,000 crores in Flipkart) are well thought investment games of seasoned investors, majority of whom hail from the USA (and have survived through or been badly thrashed in historical dot com bubble burst of 2000s).  This time around they are more experienced and in rush – A) to raise the stakes fast enough, B) to raise the valuation and market cap faster; and C) to exit fast enough by way of a blockbuster IPO.   Hence all the money these companies are loosing on account of customer discounts (assume for a while that marketing spends are also part of discounts) now is a well thought short-term loss strategy with a solid recovery plan (almost a windfall) from an IPO in mid-term.  All these losses (actually posted as debt payable to VCs as hefty stakes) will be recovered from retail investors who will lead the IPO from front and buy their shares like crazy.  So effectively what they are distributing as freebies in market today will be taken back with interest and penalty and eventually go back into the pocket of VCs in multiples of their stake ratios.  Something similar has happened in Europe last year where a startup raised 1.1 Billion Euros in IPO out of which 950 Million Euros were consumed immediately to set off VC debts leaving the company with less than 100 Million Euros for sustaining themselves in future.   I will not be surprised if they all go for IPO at the same time because if one of them goes for an IPO first and sets a benchmark of some sort, the subsequent IPOs will not be as blockbuster hit as the first one.

I look forward to your valuable comments and feedback.

Cash-on-Delivery Returns Can Be Zero – It’s Possible

Hey Friends, thanks for paying attention to my blog.  This post is targeted at people in e-Commerce industry.  I hope you will find this interesting.  Please do not hesitate to put in your comments and ideas.  It’s always nice to share knowledge.

Let’s start by understanding the complexity of problem and it’s magnitude.  If its a repetition for you, please feel free to scroll down to the solution I am proposing to make COD returns ~ zero.

Cash-on-Delivery – Indian e-Tailers’ favorite mode of transaction has become probably one of their biggest nightmare too.  Why?  Here are some reasons:

PS: Don’t lock yourself to numbers below.  They are broad estimates only.

  1. The biggest scare of all – COD returns – customers change mind and refuse to take delivery of a COD order.  Approximately 60% online orders are COD orders in India and COD return rate in India is estimated between 40% – 70%  depending upon whether you are a marketplace or a direct e-tailer; who your customers are; how fast you were able process order & reach their doors; and the category of products you deal in (apparel being highest).  So say for worst example sake only – 600 of 1000 orders are COD and out of 600 COD orders, 420 (70%) COD orders are likely to return back in worst case during normal times.
  2. COD Abuse – customers, especially during festive sales/sweepstakes, place multiple orders to lock inventory so that they do not loose out on a deal.   Remember all the nice pairs of shoes you ordered last Diwali but never bought?  Or all those lovely shirts? Estimates suggest that for every one piece of a product that customer desires, it ends up placing 4 COD orders in the same marketplace (impulsively to hook on to deals) and 3 orders on various marketplaces (anxiously to ensure it gets delivery from at-least one of them).  This represents about 85% COD returns during seasonal sale.  So as per our example, 510 (85%) of 600 COD orders will never be paid during seasonal sale.
  3. COD Fakes – nowadays students, hackers and even competitors inject tens to thousands of fake orders into online stores for sake of fun (or whatever else they intend to).  These orders are never paid on delivery.  I have heard cases of thousands of fake orders being injected almost every week into at-least 2 popular marketplaces in India.  When I say heard, I mean from their employees who are known to me professionally or personally. 100% COD returns.  We cannot map this to our example figures – has to be dealt as special case.
  4. Only Cash COD – So far no online store tells a customer during checkout if a card can be accepted on time of delivery.  They can’t because they don’t know if the delivery boy will be carrying a swipe machine or not.  Therefore, even if customer intends to pay, COD order returns for inability to accept card.  Estimates suggest that 30% of COD bounces are due to inability to process card (unavailability of cash).  So during normal times, of 420 orders likely to return, 126 orders will be return for cash-only restriction.
  5. There are other COD issues which have trivial impact individually but collectively add a lot to operational overhead – Roaming People, Parents Not Available, Working People, Gated Communities, Army Cantonments, Open Delivery (pay only after opening the packet) etc.  They represent about 11% of the total COD returns.  So for our example, 46 of 420 orders will return for other reasons.
  6. Marketing Loss – Today online business run on principal of customer acquisition.  Majority of retailers consider first transaction as a customer acquisition.  Therefore all digital marketing efforts are geared to get the first transaction – 60% of which is likely to be COD order.  On an average one acquisition costs INR 1,250 today if everthing other variable is fixed.  For 1000 acquistions, you spend INR 12,50,000 – out of this investment – 40%-70% of 60% (about INR 3,00,00 to INR 5,25,000) is at risk both in terms of revenue generation and customer acquisition.  After 30 days, when dust settles, marketing manager will get a campaign efficiency of about 50% only i.e. if you spend INR 12,50,000 in acquisition, you get only INR ~ 6,25,000 worth with an open COD ordering system.  What a shame 🙂

So how does it impact an e-tailer selling on it’s own online store or a vendor selling on marketplaces like Flipkart, Snapdeal or Amazon?

  1. Direct e-Tailer ends up paying both onward and return shipping fee for every COD return.  Marketplace Sellers also pay both way shipping now – Earlier Flipkart, Snapdeal etc. used to take a hit on reverse logistics but now they pass on the cost to seller ‘if reason of return is not attributable to customer or marketplace‘ – this is not as black & white as it may sound to be a clause.
  2. Waste of time and money in order processing and product packaging.
  3. Carry a risk of damaging product or loosing it all-together in transit.
  4. Invest millions in inventory that travels across country purposelessly.
  5. For every order, stock at-least 3 times the inventory to be able to capture opportunity and avoid cancellations or be stocked out during peak season.
  6. If you are a marketplace seller, it is highly possible that you get order for same item from same customer at the same time from multiple marketplaces.  That’s a disaster, because you have 1 piece in stock – sold multiple times at the same time.  (Trust me, Unicommerce or any other multi-channel retail system is never real-time)
  7. Process all COD returns, open packets, re-process (and may be repack) and re-stock.
  8. Majority of COD returns circle back in 30-45 days due to clogged courier services.  Therefore by the time product is re-stocked, retailer looses the opportunity of selling it all.

So what is the solution?  How can we make COD returns zero?

Here are few disclaimers so that you do not reject my proposal outright:

  • I am not proposing to stop COD business.  It is a great business model provided it is done rationally in a way that creates win-win for retailer as well as customer.
  • I have been one of the sellers in the marketplaces – so my proposal is based on real experience and pain of a seller.  I know what marketplace sellers go through in ops and how they a treated by marketplaces.
  • I have also been a direct e-tailer, having invested in my own retail startups, brought them to a reasonable scale from whatever my means permitted.  So my proposals are based on real experience.
  • I have implemented and tested my proposal in real life.  It is a validated proposal – trust me – it works.  What you will loose out by trying my idea, is what anyways would never be yours.

Finally, the indecent proposal that can make your COD returns zero:

  • For COD orders, ask for a nominal COD processing fee (most people do that already).  Say INR 30?
  • For COD order, during checkout itself, make it mandatory to pay COD processing fee online.  So say an order is INR 1,000, COD fee is INR 30 – take INR 30 online and collect INR 1,000 on delivery.
  • It’s easy to implement – once customer chooses COD – put relevant messaging and redirect customer to one of the existing payment gateway depending upon choice of payment method.  Your tech can easily put a logic to collect COD processing fee only if COD box is checked.
  • After collecting COD processing fee online, say thanks to customer the usual way.  You don’t need to go through the process of SMS verification, phone verification, link verification, voice-prompt verification or IVRS verification.  Order is confirmed online and can be processed immediately.
  • Fine tune COD processing fee to optimize your conversion with help of analytics and customer feedback.   In one of my ventures, we used to take 10% advance online and 90% on time of delivery.  We rarely received a customer complaint.  In another venture we took only INR 5 as COD processing fee which was non-refundable and paid to charity (you can set it off to Carbon Footprint cause or something else) – our customers appreciated our gesture.  The exact rule, figure and cause will depend on your category, business, exposure and customer profile.
  • In my real-life implementations, the COD processing fee used to be non-refundable unless order was cancelled by seller or marketplace.  You can decide your own policy – it can be refundable too, or may be refundable to wallet?

Expected Impact

Every business decision has an associated risk and opportunity.  My proposal is an experience that I have shared with you.  Below are some risk and opportunities I saw.  I am eager to know your experiences or advanced thoughts.

Downsides, Risks & Mitigation

  1. Your conversion may go down for a short while because customers will bounce off the checkout when they are asked to pay COD processing fee online.  Mitigate it by communicating your COD policy on catalog pages.  Set the expectations in advance so that funnel does not skew too much at the bottom.
  2. Customers who do not have any means of online payment will not be able to order – well think like this – if I have access to Internet and if I know how to order online and I also appreciate the value of convenience, I am 99.9% likely to have at-least one mode of making a payment online.  For rest of 0.1%, the payment providers have launched intuitive ways to pay online like SMS/Mobile payments etc.  Those retailer who think that COD helps those who do not have means to pay online need to do a bit more research – this is a myth.  Those who do not have means to pay online do not value convenience too – so they are less likely to be online shoppers.
  3. Customers do not like to pay online due to security risk – In my view customers associate risk more with value & trust-worthiness of the brand than with the checkout process.  First half (before interval  catalog, price, policy, presentation) of the shopping process is critical – the second half (post interval – checkout, registration, payments) is implicit function of first half.  I have ran checkouts (not payment pages) on unsecure ports (http only) for prolonged periods.  A/B testing have shown trivial impacts on funnel performance for lack of SSL on checkout pages.  If you are a non PCI-DSS merchant, you can live off a 100% unsecure checkout because card data will be captured on payment provider site which is secure.  If you are PCI-DSS merchant and are taking card details on your own site, you are probably not making anything substantial out of this process, but continue doing so, it  is good practice to be secure.
  4. Your campaign ROI will dip in Analytics or advertising dashboards – because you are no longer accepting fake or casual COD orders.  Mitigate this risk by taking management into confidence.  This has to be a well calculated risk with all stakeholders keyed in.  You just eliminated fake numbers from MIS reports.
  5. You may loose some customers – well what worth are those customers who don’t pay on delivery.  I put this in a risk category because there are several companies out there who report only their top-lines – for them this proposal is like a red-herring.  Anyways I leave mitigation of this risk to reader’s wisdom.
  6. You may no longer be the favorite destination for COD customers – measure the quality of customer you loose and retain.  Compare the two and then take a call.

Opportunities and Benefits

  1. Almost zero COD returns.  We got returns only in genuine cases, like customer not available, incomplete address, etc.  We used to resolve majority of them by proactive logistics monitoring without having to reverse the shipment.
  2. Acquisition cost runs parallel to order stream.  You have 100% visibility of how much you are spending and what worth you are getting.
  3. It is the psychological impact of the process which made our customers feel committed to their orders.  COD fee was never found important to most of them.
  4. Our customers found our proposition a win-win.  We had 1 in 10,000 customers call or write to us that he did not like our COD ordering policy.  We won that too by some courtesy and affection.
  5. You retain top end spectrum of clients; reduce calls from non-sense customers; your people will enjoy talking to customers (we called them clients with respect)
  6. Marketing effects are long-term.   Gradually you will realize that the repeat order rate goes up.
  7. If you are a marketplace, your sellers will value you more.  They will put premium inventory into the system.  They will process COD orders at the same priority as Pre-Paid orders.
  8. You will get maximum bang for investment in stocks.
  9. You can play with JIT inventory which you typically do not carry and would never want to get into COD stream for reasons like cost, slow movement etc.
  10. No fake, casual or impulsive orders – it costs money for each order to be punched into system.
  11. Healthy Cashflow – probably the biggest advantage.  With a reduced COD return rate, your payables and receivables will co-ordinate.  You will be a healthy business with a health flow of cash.  Gone will be days where your balance sheet will have more liabilities than assets.  You will be able to pay your marketing partners and suppliers on time.  You will less likely default and stay longer in business.

About Me

I am an entrepreneurial-spirited technologist who has managed multitude of business complexities by strategical implementation of technology in a career spanning over 20 years. I have worked in reputed online, software consulting, and startups in leadership positions.  A major portion of my career has been spent in e-Commerce industry.  I have worked in almost all departments of an e-Commerce enterprise.   I am also curator of a ‘best practice based’ high-performance hybrid marketplace technology which I give out to e-Commerce startups as a ready launchpad.

You can check my profile on LinkedIn : https://in.linkedin.com/in/akhildelhi

I will love to connect with you.