Webhooks
You can use webhooks to send Moments from Cloud4Wi to your server, a Google or Firebase Cloud Function, an AWS Lambda Function, or any HTTP endpoint. From there, you can store events in a database, send them to a marketing automation or analytics platform, and more.
You can also directly integrate Moments with your enterprise CDPs or Marketing Automation platforms such as Salesforce Marketing Cloud. Before getting started with webhook, check our Connectors to see if there is already a plug and play integration you can use, or contact our team to request a custom connector.
Cloud4Wi webhooks also allow you to sync in real-time Contacts with your CRM, and push all application events generated by Cloud4Wi marketing tools (such as messages, surveys, offers) to external datasets.

Events

  • Sign-up: the event is triggered after a user sign up from any of the CLoud4Wi acquisition experiences (either registration from the Splash Page, Cloud4Wi Dashboard or Kiosk)
  • Login: the event is triggered after a guest user signs in on a guest Wi-Fi network, both via captive portal, WPA2 Enterprise or Passpoint
  • Presence: the event is triggered after a user's device is detected for the first time in a Location
  • Enter a Zone: this event is triggered when the user enters one of the Location zones (Virtual or Polygons) configured in the webhook options
  • Dwell: this event is triggered when the user dwell a specific amount of time (configurable in the options) in a Location
  • Leave: this event is triggered when the customer leaves a Location. The event is triggered only when the system doesn't receive any signal from the customer for more than a specific period (configurable in the settings of your Cloud4Wi account.)
  • Email verification: triggered when the user verifies his email by clicking the verification link sent via email
  • Phone verification: triggered when the user verifies his phone number using one of the mechanisms provided by the platform (OTP via SMS, link via SMS)
  • Promo Page CTA: triggered when a user clicks the call to action (CTA) button in the promo page published in the Access Journey
Coming soon:
  • Geofence events: this webhook is triggered whenever a mobile user enters or exists from a geofence. If you configured the geofence with a minimum dwell time, the entry event will trigger only if the user is detected with enough confidence in the geofence for the minimum amount of time configured

Configuration

You can manage webhooks on the Cloud4Wi dashboard Developers page under Webhooks. To create a webhook you have to click on the Add button at the top of the page, then enter the required data:
  • Name: name of your webhook, for inventory purposes
  • Moment: the event that triggers the call
  • URL: end-point of the HTTP POST request (for example https://yourdomain.com/myapps/webhook.com), The end-point of the HTTP POST request of the webhook can be http and https; if https the server must be correctly configured in order to support the Server Name Indication (SNI) (https://en.wikipedia.org/wiki/Server_Name_Indication)
  • Headers: you can define any key-value header to include in your request
  • Body: you can choose a list of attributes to send about the event, among a given list (etc. you may want to send first name, last name, email, etc.)
  • Locations: optional, for on-site event you can filter the webhooks that occur only in a specific list of locations
Whenever events are generated, Cloud4Wi will send a POST request containing the configured body to the specified URL. You can also click the Test (magic ward) icon to send test event. To acknowledge receipt of the request, your webhook should return a 2xx status code (e.g., 200 OK, 201 Created, or 202 Accepted).
Sample request
1
{
2
"hotspot": {
3
"id": "4fd9ca2340f699e2611d05f8b92772ff"
4
},
5
"contact": {
6
"birthday": null,
7
"country": "US",
8
"firstname": "Ivan",
9
"personalid": null,
10
"gender": "male",
11
"created": "2021-02-22T15:58:38Z",
12
"customFields": [],
13
"optin": [
14
{
15
"date": "2021-02-22T15:58:38.000Z",
16
"name": "termsOfUse",
17
"accepted": true,
18
"id": 0,
19
"type": "LEGACY",
20
"version": "default"
21
},
22
{
23
"date": "2021-02-22T15:58:38.000Z",
24
"name": "privacy",
25
"accepted": true,
26
"id": 0,
27
"type": "LEGACY",
28
"version": "default"
29
},
30
{
31
"date": "2021-02-22T15:58:38.000Z",
32
"name": "mktgCommunications",
33
"accepted": true,
34
"id": 0,
35
"type": "LEGACY",
36
"version": "default"
37
}
38
],
39
"language": "en",
40
"type": "guest",
41
"civilStatus": null,
42
"lastname": "Muccini",
43
"marketing": true,
44
"phone": "+14156234284",
45
"provider": "passthrough",
46
"ageVerification": null,
47
"online": true,
48
"id": "9c1cd25890ce9c3e439f8653ce26a1ab",
49
"metrics": {
50
"visitCount": 2
51
},
52
"email": "[email protected]",
53
"extraFields": {},
54
"username": "9F04472C"
55
},
56
"organization": {
57
"id": "52f09416a85fe315019cf3d93cc90a20"
58
},
59
"location": {
60
"country": "IT",
61
"address": "Pisa",
62
"extId": "4234324234",
63
"id": "ff80808160b03d96016a26aaefdb74e6",
64
"tags": []
65
},
66
"event": {
67
"type": "login",
68
"nonce": null,
69
"timestamp": 1614009527
70
}
71
}
Copied!
Export as PDF
Copy link