Engage as point follower
In this integration Treazure (Cow Hill's Loyalty CRM) is the master of points and vouchers, allowing customers to buy items with points, create vouchers directly on the fly and also have different type of points-buckets. This means that Treazure decides what the points are, and Engage will act as point follower. Read more about point follower here.
When Engage is acting as point follower for Treazure, there are the three cases to consider:
1. Syncing the point balance from Treazure (hourly update)
Since Treazure is the point master, point changes may occur that Engage does not know about. So Engage has to constantly sync its point balances to the values in Treazure. This is done on a schedule. Every hour, the current point balance for every contact is fetched from Treazure and sent to an specific API endpoint in Engage.
For this to work, point follower functionality must be enabled in Engage. Enabling this creates a connection between Engage and Treazure through Engage's iPaaS, a middleware used for point syncing. It pulls the point balances from Treazure and updates them in Engage using the endpoints below.
Endpoint in Treazure: https://[[client]].posengine.[[environment]].cloud/api/v1.0/LoyaltyVault/Balances/Get Body: { "mutatedFrom": "[[todays date - 2 hours]]", "mutatedTo": "[[todays date + 2 hours]]", "loyaltyPointDefinitionId": "[[loyaltyId]]" } Response: href https://[[client]].posengine.[[environment]].cloud[[href]]/result
Endpoint in Engage: https://[[client]].voyado.com/api/v2/point-accounts/balances
2. Adding points in Treazure through Engage
When Engage is point follower, points added manually in the Engage UI or through Engage automations are not added directly. A request is instead sent to Treazure, using the following webhook provided by Treazure. For this to work, you need to activate Engage's webhook functionality.
Endpoint in Treazure: https://[[client]].posengine.[[environment]].cloud/api/v1.0/LoyaltyVault/Account/[[contactId]]/Transaction
Here, [client] and [environment] depend on your setup, and [contactId] is the GUID for the specific contact.
The webhook returns the new point balance for that specific contact when is then set directly in Engage.
Caution
When doing a remote points adjustment like this, you can add a description in the Engage UI. The Treazure API, however, limits the length of this description to 100 characters. Anything longer will cause an error and the update will not be accepted. So be sure to keep your description under 100 characters.
3. Fetching points history from Treazure
As well as fetching the point balances, Engage can fetch the total point history for a contact. This is useful, for example, for displaying the total points history on the contact card in the Engage UI.
Since only the point balance is updated by the hourly sync, a webhook needs to be configured in Engage to fetch the full points history. This is done by your Voyado team in the Rewards module in the Engage back-end. The webhook looks like this:
Endpoint in Treazure: https://[[client]].posengine.[[environment]].cloud/api/v1.0/LoyaltyVault/Account/[[contactId]]/LoyaltyPrograms/[[loyaltyId]]/History
It's also possible to migrate points from Treazure to Engage through the point migration service. This is useful for customers who have a existing loyalty program in Treazure and want to go live with Engage as point follower. See how this is done here.