Introduction
Punchh is a loyalty and engagement platform that empowers brands to deliver omnichannel customer loyalty programs both in-store and online.
MoEngage <> Punchh
Using MoEngage and Punchh together, you can capture new users inside MoEngage and send them to Punchh to create personalized loyalty programs for them. You can also display dynamic coupon codes generated on Punchh inside MoEngage Campaigns.
Integration
library_add_check |
Prerequisites
|
Create users in Punchh from MoEngage
To create a connector campaign on MoEngage,
1. Navigate to Create Campaign > Connectors > Custom and choose the delivery type most suitable to your needs
2. On step 2 of the campaign
Call the Punchh Signup API
To create a new user on Punchh, use the POST
method and configure the payload.
- Select the method as POST
- Headers:
-
Accept
:application/json
-
Content-Type
:application/json
-
User-Agent
:{{ UserAttribute['User Agent'] }}
-
punchh-app-device-id
:{{ UserAttribute['GAID'] }}
-
x-pch-digest
:{% set payload = "{\"client\":\"CLIENT\",\"user\":{\"email\":\"{{UserAttribute['Email (Standard)']}}\",\"password\":\"{{UserAttribute['First Name']}}+xyz123\",\"first_name\":\"{{UserAttribute['First Name']}}\",\"last_name\":\"{{UserAttribute['Last Name']}}\",\"terms_and_conditions\":\"true\",\"zip_code\":\"{{UserAttribute['Last Known Pincode']}}\",\"birthday\":\"{{UserAttribute['Birthday']}}\",\"external_source\":\"customer_id\",\"external_source_id\":\"{{UserAttribute['Email (Standard)']}}\"}}" %}{% set base = "/api2/mobile/users" %}{% set sec = base + payload }{% set sig = sec|convertToSHA256NoSalt() %}{{ sig }}
-
- Add the endpoint as Webhook URL:
https://<server_name>.punchh.com
/api2/mobile/users - Body:
{ "client": "CLIENT", "user": { "email": "{{UserAttribute['Email (Standard)']}}", "password": "{{UserAttribute['First Name']}}+xyz123", "first_name": "{{UserAttribute['First Name']}}", "last_name": "{{UserAttribute['Last Name']}}", "terms_and_conditions": "true", "zip_code": "{{UserAttribute['Last Known Pincode']}}", "birthday": "{{UserAttribute['Birthday']}}", "external_source": "customer_id", "external_source_id": "{{UserAttribute['Email (Standard)']}}" } }
- Refer to the Punchh documentation for more information.
Preview your request
At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available in Step 2 of Create Connector Campaign.
You can go ahead and Publish the campaign.