Punchh

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

  • Access to your Punchh Dashboard.
  • Access to your Punchh APIs.

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

Screenshot_2022-02-21_at_10.48.46_PM.png

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:
    Create contact
    {
          "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)']}}"
          }
    }

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.Screen_Shot_2022-02-22_at_11.12.42_AM.png

You can go ahead and Publish the campaign.

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?