Shopify merchants who use headless solutions can easily enable and install CashBack on their stores. Below we outline the steps for such a merchant to go live with a percentage-based CashBack product.
For a product overview about how CashBack works at a product level, see this Loom:
https://www.loom.com/share/d6c24cdf85754be2b7f52eeedb2d9d4d
Installs the Fondue Shopify app.
Setup a URL-based CashBack promotion from the Fondue app (see instructions here). This will automatically create an associated CashBack product in the merchant’s Shopify.
For the remainder of this document, consider that the merchant set up a 20% CashBack promotion. In this case, Fondue would create a “20% Cash Back” product for the merchant. Like any Shopify product, this would be associated with a unique ProductID and VariantID.
In order to identify which shoppers should be given CashBack, Fondue often utilizes a UTM-based approach. Shoppers with CashBack arrive at the website with a UTM of ?cashback=[code]
which could have been the result of clicking on a link from an email or SMS. For these shoppers, the merchant want to put the appropriate CashBack into their cart.
Here is sample code for how a Shopify merchant can get the CashBack code from the URL params. Obviously, the precise usability of this code will depend on the headless merchant technical environment.
The scripts below assume:
The UTM is ?cashback=cashback20
The associated CashBack Shopify variant ID is 123456789
See script using Ajax with fetch
method (client code)
See script using Store Front API (server code)