Notifications & Webhooks Overview

Created by chris.joinson@airangel.com, Modified on Mon, 12 Jun, 2023 at 10:50 AM by irvin.aldridge@airangel.com

TABLE OF CONTENTS

Introduction

Notifications (Alerts) can be set up to trigger emails or webhooks when certain criteria, defined by the system user, are met by networks users/guests. Notifications can be set up to trigger based on the following criteria:

  • Marketing Hits
  • Revenue
  • Account Whereabout (Location)
  • Location Density
  • Unique Devices
  • Guest Data
  • Login Attempt
  • Guest Data Post
  • Custom Guest Data Post


Navigate via Settings / Notifications


Webhooks


Webhooks are essentially a push notification that can push data out of the Airangel platform in real time. They are useful if there is a third party system (e.g. a CRM system) that needs data from the Guest WiFi network pushed into it.


JSON Webhook

You can configure a webhook notification with JSON content by using the "Custom Guest Data Post" option and "Webhook" checkbox. This will send an HTTP POST with the content you want.



Set the Content-Type to application/json and then fill in your own JSON content. Use the normal replacement tags like {username}, {Mail}, {MAC} etc and create the JSON structure you want. Make sure you put the quotes around your tags if the value will be a string. Example would be:

{"email": "{Mail}", "mac": "{MAC}"}

Example Webhook

Social Login Data with Facebook


https://webhook.service/newlogin?site=SITEID&user=1394576374171799%40facebook&mac=00-11-22-33-44-55-66&locale=en_GB&gender=male&mail=anton%40airangel.com&firstname=john&lastname=van%20damme&fb_url=https%3A%2F%2Fwww.facebook.com%2Fapp_scoped_user_id%2F1394576374171799%2F


Broken down this is:


  • '''https://webhook.service/newlogin?''' => the configured server where the webhook is sent
  • site=SITEID => configured site id (initially this is statically added to the webhook URL)
  • user=1394576374171799%40facebook => the username (facebook unique id) + @facebook (this would change as per social provider e.g. 1234@twitter for twitther auth)
  • mac=00-11-22-33-44-55-66 => MAC address of the client
  • locale=en_GB => The locale returned by facebook
  • gender=male => Gender returned by facebook
  • mail=john%40airangel.com => email address returned by facebook
  • firstname=john => firstname returned by facebook
  • lastname=van%20damme => last name returned by facebook
  • fb_url=https%3A%2F%2Fwww.facebook.com%2Fapp_scoped_user_id%2F1394576374999999%2F => URL to the facebook profile

The request is sent as a GET request with urlencoded values according to RFC 1738 (raw url encode)


Example Device Info Webhook

This example text used with a "Login attempt" type of webhook would send a webhook useful for Chromecast/Apple TV association:


https://service-host/login?site=MySite&mac={MAC}&room={room}&login={status}


This will post to the remote service with the room and MAC and the login status.


ParameterUsage
siteSite code, configured statically per site for your reference
macMAC address of the device for logging in
roomRoom number associated with the PMS login.
loginLogin status - 0 = fail, 1 = success. Discard 0 values at the remove service


Cendyn Webhook


You can use a webhook to send real-time guest registration data to Cendyn CRM. Guest data is managed on the login form, if it is collected it will be sent to a CRM by Webhook. 


You will need the following information from Cendyn which you will send to Airangel support:

  1. App Url: for example https://xxxxx.cendynhub.com/AirAngel_xxxxx_Prod/
  2. App id
  3. Private key
  4. Public key


Support will create a new Webhook Notification, Type Guest Data Post, similar to this:

https://whook-uk1.airangel.net/api/cendyn-webhook?property=12345&propertyCode=HOTELA   



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article