Rules in Shopify
My research on business rules awareness in Salesforce, Outlook and other well-known products in this series of LinkedIn posts reaches an audience beyond the business rules community. For ‘The Game of Rules’ I had the same target audience in mind. Everyday professionals that deal with rules on a day-to-day basis because of the regulations and protocols in their work environments.
Sales professionals, accountants, medical experts, brokers, traffic engineers – they all have to deal with rules.
The game is used as training material, in workshops and tutorials, to explain reasoning strategies commonly employed by rule engines (see BBC 2015).
I looked for a quick way to enable my audience to order the Game of Rules online. By doing so, I learned about the commercial of the shelf products (COTS) for e-commerce. Actually I had my webshop for the Game of Rules up and running in less than 30 minutes.
The product I used was Shopify – a product for everyone who has something to sell, including organizations that ship thousands all over the world. An e-commerce process is based on rules. What does the product Shopify offer in terms of flexibility and business rules?
Setting up your online store entails simply creating an account, entering the title and price of your product(s) and then you are done. Just follow the Shopify rules and enter the required data (price and title) to set up a webstore.
It’s that simple. Additional details such as a picture, the weight of the product for shipping, description and characteristics are optional. Search results may be influenced by adding tags, collections and product-variants.
The price of a product… Is it a rule? Or is it data?
Well, you can argue both positions but it does not change the end result: to get the product legally, the customer is obliged to pay the price. Shopify supports compliance with this rule by offering integrated payment services.
Setting up discounts brings us into the more rule-ish part of this e-commerce product. You can setup an unlimited amount of discount codes that have a fair number of predefined and adjustable conditions. For example a discount may:
- be valid during a certain period of time;
- be used for a limited number of times;
- be an amount, percentage or free shipping;
- be used for a certain product or collection;
- be used for an order of a minimum amount;
- be used by customers that made an order in the past (returning customers), are from a specific country, indicated to accept commercial mailings or are listed as prospect.
At first sight this list covers most situations. Fan’s of the ‘keep it simple’ strategy will be convinced. Consider a simple staffle discount (i.e. 10 items – 10%, 30 items – 15% etc.) or a ‘buy three get one for free’ strategy. The result: many discount codes for each product that need updating with every price change.
I am sure those discount rules result in a maintenance nightmare.
The FraudFilter app offers a rule editor. The rules send a warning or block an order and consist of a list of criteria. All criteria must be met for the rule to execute the action. It’s flexible because all available data may be used in the rule criteria. An example: you can setup a rule that sends you a warning when a customer that orders the second time from the Netherlands for a total of more than 1000 euros. You will get an overview of the number of orders that are affected by the rule and you can easily navigate to the affected orders.
Well done – and as you can see in the screenshot – no programming skills required; just some common sense. The question is: what could be improved from a ‘business rules’ perspective?
Discounts are typically rules with homogenous conditions and a limited number of results. Shopify offers simple predefinied conditions and actions. Perfect for a compact overview. Use of decision tables will provide a better overview on which discounts apply to what products and situations.
Some discount rules will be difficult to implement given the limitation in the kinds of conditions available to determine a discount. Even after improving the overview, some discount conditions cannot be expressed. Should I criticize Shopify and tell them to extend the rule language? I recommend that Shopify listens carefully to their clients, what do they need? Extending the language makes it more flexible but … it will also become more complex, which would diminish the Shopify’s succesfactors: it’s usability and simplicity.
The last thing you want is to give them enough rope to hang themselves.
The way rules are expressed to detect fraud may also be used for campaigns and advertisements. There are many more places where you can setup rules to create notifications for the shop owner or end-user. Once you do that it becomes important to provide more analytics on completeness of the ruleset.
Next in this series is about rules to personalize and optimize your everyday use of a PDA (iphone, Samsung, Nokia, etc.) using the IFTTT apps.