We’re a small consulting company, and we have been hired by a Shopify customer to create a solution for offering a discount to members of an organization (e.g. “Acme”). The organization has an API where we can query realtime (REST) to check if a given customer (email address) is a member or not.
I was hoping someone here who knows the Shopify platform/API better than us could offer us some pointers on what is the best and easiest way to do this. From the top of my head, I am thinking that during the checkout phase, we should offer some text saying the “Members of the Acme Organization are elegible to a discount”, and then allowing the customer to enter their email address registered with the organization which needs to be verified live. Is there some internal scripting language where I could code this logic? Or is it possible to use some kind of outbound webhooks to manipulate the purchase? Is it possible to tweak the UI of the store to add a field for getting the users email address? I am sure some of you have done similar solutions before and can tell me what is the right way to solve this All help is appreciated!
While I may not have a solution to offer I can give you some insight:
You cannot at this time manipulate the presentation or functionality of the checkout unless the merchant is a Shopify Plus plan and even then, it’s still a bit restricted. You can consider looking to the cart page however, which is how I often see this kind of thing done. You could use a script tag resource or the assets API to manipulate storefront theme code to place a form field on the cart page, and/or you could detect the currently logged in customer with theme code (again via the assets API).
I hope that’s a bit of a start, curious to see if any other community input comes in.
We’re launching something new in Carter to fix a part of your request, meaning to apply discounts only to customers using specific email addresses.
This is a “Custom Coupon” feature, part of the Coupon Field in Cart app. It will also probably grow and become an app by itself after some time and some feedback from people like you