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) Event > type attribute signup
  • 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. Event > type attribute login
  • Presence: the event is triggered after a user's device is detected for the first time in a Location. Event > type attribute presence
  • Enter a Zone: this event is triggered when the user enters one of the Location zones (Virtual or Polygons) configured in the webhook options Event > type attribute space
  • Dwell: this event is triggered when the user dwell a specific amount of time (configurable in the options) in a Location Event > type attribute dwell
  • 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.) Event > type attribute leave
  • Geo Events: this webhook is triggered whenever a mobile user enters or exist 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. The possible values for the event > type attributes are:
    • geo-arriving
    • geo-dwell
    • geo-leave
  • Email verification: triggered when the user verifies his email by clicking the verification link sent via email Event > type attribute verification.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) Event > type attribute verification.phone
  • Promo Page CTA: triggered when a user clicks the call to action (CTA) button in the promo page published in the Access Journey Event > type attribute promopageaction
  • Marketing Events: this webhook is triggered when a marketing-related evnet happens. For example when the user responds to a survey published in the Access Journey, or the user receives messages, open them or clicks links on them ( messages configured by the Campaign tool), or when user clicks the call to action (CTA) button in the promo page published in the Access Journey. The possible values for the event > type attributes are:
    • answer_survey
    • prx_send_email,prx_send_sms
    • prx_open_email
    • prx_click_email,prx_click_sms
    • promo_cta

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
{
"hotspot": {
"id": "4fd9ca2340f699e2611d05f8b92772ff"
},
"contact": {
"birthday": null,
"country": "US",
"firstname": "Ivan",
"personalid": null,
"gender": "male",
"created": "2021-02-22T15:58:38Z",
"customFields": [],
"optin": [{
"date": "2021-02-22T15:58:38.000Z",
"name": "termsOfUse",
"accepted": true,
"id": 0,
"type": "LEGACY",
"version": "default"
},
{
"date": "2021-02-22T15:58:38.000Z",
"name": "privacy",
"accepted": true,
"id": 0,
"type": "LEGACY",
"version": "default"
},
{
"date": "2021-02-22T15:58:38.000Z",
"name": "mktgCommunications",
"accepted": true,
"id": 0,
"type": "LEGACY",
"version": "default"
}
],
"language": "en",
"type": "guest",
"civilStatus": null,
"lastname": "Muccini",
"marketing": true,
"phone": "+14156234284",
"provider": "passthrough",
"ageVerification": null,
"online": true,
"id": "9c1cd25890ce9c3e439f8653ce26a1ab",
"metrics": {
"visitCount": 2
},
"email": "[email protected]",
"extraFields": {
"extIds": {
"prop2": "p2-9ad7.62d4",
"prop1": "sf_484c",
"id": "657ff9a9-62d4-484c-9ad7-fadc28605c30"
}
},
"username": "9F04472C"
},
"organization": {
"id": "52f09416a85fe315019cf3d93cc90a20"
},
"location": {
"country": "IT",
"address": "Pisa",
"extId": "4234324234",
"id": "ff80808160b03d96016a26aaefdb74e6",
"tags": []
},
"event": {
"type": "geo-leave",
"nonce ": "bdf5e45deac3cdb8d1bbd5368390cdb ",
"dwellTime": null,
"timestamp": 1614009527
},
"geofence": {
"metadata": [{
"value": "casa",
"key": "tipo"
}],
"name": "Emi_House",
"geometry": {
"coordinates": [
10.517113,
43.676046
],
"type": "Circle",
"radius": 100
},
"id": "Emi_House",
"extId": "casa",
"tags": [
"Emilia",
"casa"
]
}
}
Export as PDF
Copy link
On this page
Events
Configuration