In order to provide a useful application, the most important Shopify models to understand are the Customer (that will become the recipient of the messages) and the Product (that will be the main content we want to inform a customer about).

I need to know which fields I can map, in order to fill the nofifications required fields. There might be missing fields, or fields that might be related to other entities.

I also need to explore use cases, and how to gather data and events to identify how the sendrules api can be leverages to achieve that, and what are the missing features that prevents to implement those use cases.

Customer sensitive data

First of all, we have to take into account the privacy requirements (and concerns) of working with customer information that belong to the merchants (the direct textashop customers).

For that there is a page in shopify documentation about the three levels of requirements when dealing with that kind of information. In my case, as I am interested in email and phone number to send notifications, I go directly to Level 3.

Thinking about some use cases

Initially I want to work with this basic use cases:

  • Notify users when there is some product back in stock
  • Notify users when there is a price drop or an special offer
  • Notify users about shipment updates

Apps for customer accounts

One of the best features of sendrules is that it provides a way to let users select how they want to receive notifications.

There will be still a step in the middle, that will be the textashop backend that needs to decide, which notifications are available for customization. A merchant might want to decide that cart recovery notification will always be sent through an SMS, and that does not want to expose the selection to the end customer.

One cool thing in shopify is that there is a way to add UI extensions for customer accounts, It looks like there are the “old” or classic customer accounts that do not support that kind of extensions, but the interesting part is the decission of the kind of customer accounts is made by the merchant:

You can choose which version of customer accounts to use in your online store.

and there is an easy way to switch from old to new customer accounts

The option for those accounts would be to have a “safe” defaults based on their acceptance of receiving marketing emails or not.

For the new ones we can provide a fine grained selection of notification preferences.

The interesting part is that those customer ui extension will be available during December, so in some way it feels like I could be a piooner if I am able to finish the app in .. a month !?

Subscribe to changes

All the above sounds great, but to provide some real value we might want to provide a set of rules that automatically send notifications. So I took a look at the kind of events that might be interesting.

In shopify, apps can get subscribed to events in shopify : there is a long list of topics that an app can be notified about: Shopify Webhooks Documentation

Some interesting topics

  • customers_marketing_consent/update: this is one of the most interesting ones as we might want to update data in sendrules to avoid sending certain types of notifications to the affected customer.
  • discounts/create: we could create notifications based on a product that a customer added to a wishlist.
  • domains/create: it looks like the domain includes localization: country, locale, and alternate_locales
  • fulfillment_events/create: to notify a custmer about his orders ? there are also orders/create and orders/fulfilled events, so that would need further investigation.
  • inventory_items/create: to notify a user that has expressed some interest in products in a certain category ? However, there is also a product_listings/add that might be covering that case, because a product might be created but not published on the web. Oh! and there is also products/create !
  • locales/create / /update : to check if we have localized all the templates for the added locale. And closesly related with that is the markets/create that allows to serve idfferent countries / regions.
  • segments/create : yep! this looks like a very nice feature, and something that could be also implemented in sendrules (but for now we might just send a list of users to send the notification to as a payload in sendrules)
  • variants/in_stock: when a variant becomes on stock, something a customer might want to know.

Other interesting things …

Localization

I looks like localization can be extracted from the market , and we might want to identify to what market a customer belongs.

B2B: shops that sell to other shops

While browsing and reading documentation I found interesting stuff, that might be worth taking a look in the future for some ideas:

  • B2B on Shopify could be interesting to target a different profile: we might want to integrate a CRM for businesses that sell to other businesses.