Configuring Webhooks

When you want to 'ask questions' of the system the normal behavior is for the client to 'poll' the server for the required information. Webhooks offer an alternative to polling.

Polling vs. Webhooks

'Polling' is when the kids are in the back of the car and they won't stop asking 'Are we there yet?' (You are the server and they are the clients - the only way for them to get the answer they want is by asking... and asking... and asking, until the answer happens to be 'yes'.)

Using a 'Webhook' means the driver (server) only has to tell the kids (clients) when they've arrived. No matter if you ask a billion times, the answer is only 'yes' once. Webhooks eliminate the need to keep asking.

This is why polling is a very inefficient means to ask questions of a server and why you should seriously consider framing some requests as Webhooks. Webhooks eliminate redundancy by cutting web traffic and reducing server load. Webhooks also ensure that the information is returned as soon as it exists and is not tied to any polling schedule. This is especially useful if you should decide to integrate unblu statistical data into your own real-time analytical models.

The decision as to whether to use a Webhook or not is entirely dependent on how the question you are asking is framed within your 'broader system'. It is quite difficult to think of use cases where polling is technically 'better' than using Webhooks. But it may be that you already have processes in place where 'polled' data is integrated into larger models according to predefined schedules and you want to continue that polling strategy with unblu data.

This section will describe how you can set up a Webhook from within the Agent Desk. See Webhooks Technical Detail for more on best practices and technical considerations.

How it works: The collaboration server functions as a client to a web server that you define. The collaboration server can then connect to that server to handle the requests.

Create a Webhook

Note: You need at least 'Admin' credentials to perform the following steps.

  1. In the Agent Desk select Account > Webhooks then click the New webhook button. A modal window slides in from the right.

    Note: Each new Webhook is set to 'Enabled' by default. This is useful if you ever want to switch off the Webhooks without losing any configuration values.

  2. Fill-in the Name and Description fields then, in the Endpoint URL field, add the URL to your web server (e.g., https://my.endpoint.com/unblu-Webhooks)

    Note: The endpoint is the full destination address to which unblu will send the Webhook events.

  3. Select the checkbox(es) representing the event(s) you want to subscribe to. (In order to find out what each check box represents simply hover over the information icon.)

    For example, you may want to select the session-lifecycle event in order to receive information each time a new session is created or an existing session is terminated. The services you can subscribe to are self-explanatory; for example, adding or deleting users, teams, domains or names areas.

  4. When you have selected all the services you wish to subscribe to you may want to (optionally) add a 'secret key' in the Secret key text box. See Secret Key for more details on this added security measure.

  5. When you are done configuring the Webhook click Save.

    Now you can see the Webhook, and the events you have subscribed to, listed in Account > Webhooks.

    In order to test if the Webhook works:

  6. Click the downwards-pointing chevron then, from the list, select Send ping event. A dialog box asks you to confirm.

  7. Click OK. You will see a notification telling you that the server has been pinged.

    In order to see the log:

  8. Again, click the downwards-pointing chevron then, from the list, select Open delivery log

    Using this log you can check whether the ping was successful or not. And, using the Edit Webhook button, you can also edit the Webhook directly from here.

    Note that you can use the filters at the top of this modal window to set filters and/or sort by:

    • Response code
    • Time
    • Event
    • Retry number

      The log lists all the details of each Webhook delivery, including request and response headers and payloads.

  9. Click on an entry to see more detail in the log.

  10. When you are done configuring Webhooks click OK.

  • deploycloud
  • deployonprem

results matching ""

    No results matching ""