Rehook

Introduction

Rehook is a powerful and dedicated user-incentivization solution that enables businesses to reward and engage users without dependency on tech.

MoEngage <> Rehook

With the MoEngage and Rehook integration, you can forward users and events from MoEngage to Rehook. You can use this to trigger custom rule-based promotions on Rehook when an event is captured from MoEngage or add new users to your Rehook dashboard when MoEngage identifies a new user in your app or website. You can also display your customer's reward progress in MoEngage Campaigns using our Content APIs.

Integration

library_add_check

Prerequisites

Forward events on MoEngage to Rehook

With MoEngage's Connector Campaigns, you can forward your events to Rehook when they perform any action on your app or website.

To create a connector campaign on MoEngage, 

  1. Navigate to Create Campaign >> Connectors >> Custom and choose the delivery type most suitable to your needs. For this example, we will select "Event Triggered" and select the event as "Purchased".
  2. On step 2 of the campaign:

Call the Rehook API

To send your event to Heap, use the POST method and configure the payload.

  • Select the method as POST
  • Headers
    • Authorization: Use an online tool to create your basic auth with your API Key as a username and your Secret Key as a password:

      In the above example, the value of this header would be Basic dG9rZW46c2VjcmV0
    • Content-Type: application/json
    • accept: application/json
  • Add the endpoint as Webhook URL: https://api.rehook.ai/events/invoke
  • Body:
    Type @ to personalize your payload.
    JSON
    {
        "event_name": "Purchase",
        "source_id": "{{UserAttribute['Email (Standard)']}}",
        "metadata": {
            "item_names": "{{EventAttribute['Item Names']}}",
            "value": "{{EventAttribute['Value']}}"
        }
    }

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.

Forward users on MoEngage to Rehook

To forward MoEngage users to Rehook, or update their properties on Rehook, set up a MoEngage Connector Campaign as shown above and use the Rehook's Create or Update API to create or update users inside Rehook.

Display customer reward progress in MoEngage Campaigns

Using MoEngage's Content APIs, you can dynamically pull customers' reward progress inside MoEngage campaigns for a more personalized experience.

Step 1: Set up a MoEngage Content API

info

Information

We've revamped our dashboard settings UI. Content API is now available in Settings -> Advanced Settings -> Content API in the revamped UI. For more information, refer to Summary of Changes - Settings UI Revamp.

  1. Revamped UI Old UI

    Navigate to Settings -> Advanced Settings -> Content API. Click + Add content API at the top right corner of the Content API screen.

    ContentAPI_Navogation.png

  2. Add your Rehook API to the endpoint URL. Depending on your use case, the endpoint will change. 

    To display your customers' reward progress, use Rehook's Get Reward Progress API.

    While setting up your content API, insert the following URL:

    https://api.rehook.ai/campaigns/reward-progress/{{UserAttribute['Customer ID']}}

    Under Headers, add the following:

    1. Authorization: Use an online tool to create your basic auth with your API Key as a username and your Secret Key as a password:


    2. In the above example, the value of this header would be Basic dG9rZW46c2VjcmV0
    3. Content-Type: application/json
  3. Click on "Save" and then "Done" once you see a successful response.
  4. Note - You can also test your APIs. To test your APIs, from the Content API's action menu, click on "Test". You can your API response and validate it. 

Step 2: Display your customers' reward progress inside MoEngage campaigns

To use this API in your MoEngage campaigns,

  1. On step 2 on your campaign creation, enter @. 
  2. In the pop up, you can select the Rehook Content API configured in Step 1.
  3. You can use MoEngage Templating Language to parse through the API response and use the content in your campaigns.
  4. You can click on the Preview tab to view your campaign in real-time personalization:
  5. Once you are satisfied with the results, you can publish your campaign.

Previous

Next

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

How can we improve this article?