Loyalty & Rewards: Custom Platform

  • Updated

If your store is running on a custom-built or unsupported e-commerce platform (any other than Shopify, Woocommerce or Bigcommerce) follow this guide to learn how to integrate Stamped Loyalty & Rewards. 

 

Please note: this guide also applies to Magento customers as we no longer support direct Loyalty installs. Please reach out to support@stamped.io if you have any questions! 


In this guide


Installing Loyalty & Rewards Launcher

The Loyalty & Rewards Launcher is where customers will interact with your rewards. Installation is simple and only requires a script to be added.

Add the below script in the Header:

<script> 
function myInit(){ 
   StampedFn.init({ apiKey: '##publicAPIKey##', storeUrl: '##storeUrl##' });
   StampedFn.on('stamped:init:starting', function(){
   	StampedFn.initRewards({
		customerId: 123456789, // your own internal numeric ID of the customer
		customerEmail: 'johndoh@example.com',
		customerFirstName: 'John',
        	customerLastName: 'Doh',
        	customerTags: '', // your internal customer tags, separate each tag with comma e.g. Wholesale, VIP
        	totalOrders: 0, // numeric indicating customer's total orders placed with your store
        	totalSpent: 0, // numeric indicating customer's total amount spent across all orders
        	isAcceptMarketing: true, // true or false
        	authToken: '' // CustomerId + CustomerEmail (with API Private key as HMAC key)
   	});
   });
}
</script>
<script async onload="myInit()" type="text/javascript" src="https://cdn1.stamped.io/files/widget.min.js"></script>

Note: Replace all variables with your store's and customer's info. ##storeUrl## should be without 'http' or '/'

If the customer hasn't logged in yet, simply call the function with an empty object StampedFn.initRewards({})


Pushing Orders into Stamped

We'll need to know when a new order has been created or fulfilled, so the app can create the orders and reward customers with points for their purchases, and this can be done by pushing order data into Stamped via integration with our API.

Reference: Stamped REST APIs 

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request