Stories

Member discount Rewards for Webflow Online Store: Idea

2020-11-01
Igor Voroshilov

This post will be about my idea of how to set up a reward system for an Ecommerce website built with Webflow and Memberstack.


Why?

The reason I wrote this article is because in Memberstack community Slack someone asked a question about weather it is possible to reward members with points for purchasing with points and then make it work with Webflow discounts.

The idea looked interesting to me,  so I replied to that question in Slack and decided to write about how I see this implementation to be built.


What can be done?

Definitely, you can store data on earned points within Memberstack. Front-end API should be useful for updating the information at the Webflow order confirmation page.

I can think of storing that data just inside an ordinary Member field or member JSON object. Not sure about what is better for now, so will figure that out later.


What cannot be done?

The only way for providing discounts with Webflow Ecommerce is using a coupon feature. However, Ecommerce API currently does not support creating coupons, so you would not be able to automatically create a coupon for a particular member with a particular discount amount equal to his amount of earned points.

So probably it will not work with Webflow.


However…there is a


Hack to do that

You can set coupons with a particular amount of discount and make one or another apply automatically depending on how many points the member has.


So my solution would be to make a discount input field at the checkout page and set display settings to hidden.


Then, I would use some custom code to see how many points a member has and pre-populate the discount code input field (the hidden one) with a particular coupon code.

The condition would look like this:

If {points amount} is equal or greater than 100, but less than 200, then pre populate the field with a coupon for $100
If {points amount} is equal or greater than 200, then pre populate field with a coupon for $200


and so on…


In this case the member would be able to collect points and use them when it is enough for one of the discount options.


Next steps

I would like to try it out and actually build a system like this. So I will be sharing the updates.


P.S. If you have any ideas on how it can be done in a better way, please let me know through twitter.