Webhooks Integration - How to enable Webhook Integration in your promotion

What is a webhook?

A webhook is a system used by an application to send information to other applications in real-time. A webhook sends the information at the same time it is registered, which means that it allows you to obtain the information instantly.

In Easypromos, the webhook integration enables you to send registration data from your promotion participants to your own application. In this way, this system allows you to receive the information of the unique users and their participations in real time. You can then use your application to manage and manipulate the data according to your needs.

 

NOTE: The Webhook integration is only available for promotions created with the White Label version of the platform.

 

Below, we outline the benefits of the webhook integration and explain how to configure this feature in your promotions.

 

What can you do with the webhook integration?

The webhooks system enables you to utilize, in real-time, the data of users registered in your promotions. The mostly frequently used features of the webhook integration are:

  • Send the registration details which have been collected from your promotion to an application external to Easypromos. For example, you could link the promotion database to your own CRM system.
  • Gather information from a number of promotions into the same application. For example, feed a microsite with photos and entries from all your contests.

 

Before you begin

Before starting the process you should keep in mind the following:

  • The Webhooks integration is an advanced feature and so a developer or someone with advanced programming knowledge will be needed to implement it.
  • You will also need a server that accepts POST calls, and a way to write a script that performs an action in response.
  • Create a test URL with Request Bin to see how you’ll receive the data.

 

How to set up webhooks

To configure the webhook integration you’ll need to follow these steps:

  

1. Access the Promotion Management Page and click on ‘Integrations’:

webhook_integration_1.jpg

2. Next, click on the ‘Webhooks’ image to enable the integration.

webhook_integration_2.jpg

3. You’ll gain access to the Webhook integration settings page. From here you’ll be able to configure the following three options:

webhook_integration_3.jpg

a) Webhook URL: This is the URL you’d like the data of your promotion participants to be posted to. If you don’t have a callback URL, speak to your developer or ask an expert to set one up.

b) Webhook key (optional): You also have the option of adding a reference to the webhook via this alphanumeric text field. For example: use the promotion ID or another promotion reference as a key in order to identify it more easily. Some uses of Webhook Key are:

  • To classify and distinguish between different promotions. For example, if you have webhook integration enabled in a number of promotions which are running simultaneously, the webhook key allows you to classify them in your application and distinguish them more easily.
  • Utilize the webhook key as a security code to verify that the call is being made by the Easypromos server.

c) Webhook type: You can select which type of webhook to use. There are two options:

  • On register a new user: It returns all user information when registering for the promotion. They are unique users.
  • On register a new participation from a user: It returns the list of all participations of all users. For example, in the case of a puzzle-type promotion with multiple daily entries, the method will return all entries ordered in chronological order.

 

What information is sent?

Our server will send all the information of participants who register in the application to the URL of the webhook following the POST request method. 

Therefore, each time a user completes your promotion’s registration form, Easypromos will send the following information to the URL configured for the webhook:

 

Parameter Description
DATA.JSON

Information registered via the registration form in JSON format. For example:

{"User":{"id":"618148992","name":"Edgard Massot Casademont","first_name":"Edgard","last_name":"Massot Casademont","fbuid":"1425878509","created":"2016-07-20 17:26:31","public_entry":"0","device":"","date":"Jul.20.2016 17:26"},"Recruiter":[]}

 

KEY

This is the name or reference that you’ve configured via the 'Webhook key' field in the webhook integration section of the Easypromos application. 

 

Can I carry out a test to preview how I’ll receive the information?

Yes. You can test the behavior of your webhook before launching your promotion and receiving real registration data from participants. To do this, create a test URL with RequestBin. This will provide you with a preview, enabling you to see the format in which you’ll receive the information. 

To do to this, follow these steps:

 

1. Access RequestBin and create a new Request:

Create_RequestBin.jpg

2. Access the Integrations > Webhooks section of the application. In the field 'Webhook URL' enter the URL that’s just been generated on the RequestBin page. You also have the option of adding a 'Webhook Key' and then, after saving the changes, clicking on the 'Test' button:

webhook_integration_4.jpg

3. In the RequestBin URL you’ll be able to refresh the page in order to see the format of the data that will be sent:

4. If you’d like to see the format of the real data that will be sent, activate the promotion and carry out a real test by participating as a user. Coming back to this page you’ll see that the data.json parameter now includes real data:

 
Can I edit or delete a webhook?

Yes, once you have created the different webhooks, on the integrations / webhooks page, all the webhooks you have created will be displayed. They can be edited and deleted. They will be seen in a list, and with the typology of each of the webhooks (if it is a webhook of unique users or participations).

webhook_integration_5.jpg

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.