Webhooks

Webhooks

Overview

Using Webhook actions, you can configure the platform to call a third-party API whenever a particular event occurs. For example, you can create a webhook action to call an API on your own servers when a student completes a course. This article covers the basics of adding a Webhook action to a qualifying event.

Installing the Webhooks app

To use Webhooks, the app must first be installed. To install the Webhooks app, administrators:

  1. Click Admin from the primary navigation menu.
  2. Click App center from the fly-out menu.
  3. Install the Webhooks app from the Integration tools section. 
Admin, App center with the Webhooks app highlighted

Webhooks actions

After installing the Webhooks app, the Webhook action becomes available on the Integrations tab any time you add a rule action.  You can add webhook rules to course enrollments; course, module, and section completions, when users join a group; account creation; and more. 

To add a Webhook action:
  1. Click Add in the action section of a qualifying event.
    1. For more details on adding actions to qualifying events, visit the Rules knowledge based article.
  2. Click the Integrations tab.
  3. Click Webhook.

Add action pop-up, Integrations tab with the Webhook button highlighted

The Webhook pop-up displays.
  1. Enter a webhook Endpoint.
    1. The webhook endpoint will be invoked using an HTTP POST. The endpoint can be HTTP or HTTPS. 
    2. There is a 256 character limit for the endpoint.
  2. Enter webhook Parameters.
    1. The parameters can accept variables of the form @xxx, just like message templates.
  3. If you only want the webhook action to occur for specific users, you can add a filter. To add a filter, click the Add  icon in the Filters section.
    1. To learn more about filters, visit the Filters knowledge base article. 
  4. Click Save.
Idea
You can add multiple Webhook actions to qualifying events. 
Webhook pop-up with an example Endpoint and Parameters entered

Webhooks widget

For additional visibility into webhook calls and errors, administrators can add the Webhooks widget to the Admin dashboard.

To add the widget to the dashboard:
  1. Click Home from the primary navigation menu.
  2. Click the Admin tab.
  3. Click the Edit widgets  button.
Admin dashboard with the Edit widgets button highlighted

The Edit pop-up displays.

  1. Click Center panel.

The Edit pop-up with the Center panel button highlighted

The Admin dashboard will display in edit mode.

  1. Drag-and-drop the Webhooks widget from the Available widgets column to the Center panel.
  2. Click Save

The Admin dashboard in edit mode with the Webhooks widget being drug to the Center panel

The Webhooks widget displays the number of Webhook calls and the number of errors.

The Admin dashboard with the Webhooks widget highlighted

Additional information and troubleshooting 

  1. The platform's webhook's header content-type is "application/x-www-form-urlencoded", if your endpoint is configured to only accept "application/json", the request will fail.
  2. Webhook jobs allow a full 10 seconds for a webhook to respond to the call from CYPHER Learning's job servers. If the server that is called by a webhook does not respond within 10 seconds, the connection will terminate with the remote service, wait for five seconds, then attempt to invoke the webhook again. The system will repeat this retry logic up to 10 times, doubling the delay each time (5s, 10s, 20s, 40s, 80s, etc.) before registering the entire operation as failed due to timeout.
  3. The platform automatically applies URL encoding. When entering endpoints, make sure to use a decoded URL to prevent double encoding.
    1. For example, if your endpoint includes encoded characters such as %2F, replace the %2F-encoded component with the decoded character of / so the endpoint just contains the decoded URL.
    2. The HTML URL Encoding Reference is a great resource to assist you in decoding an encoded URL.

    • Related Articles

    • Best practices for administrators

      Overview The following are recommended best practices for new administrators. Choose a short URL Keep your URL short—ideally fewer than 10 characters. For example, if your company is called 'The Academy of Digital Photography,' a URL like 'ADP' is ...
    • Profile settings for administrators

      Overview Every user has a profile page that includes various information such as their basic info, their account details, their friends, photos, social media links, and more. The information that is visible depends on the user's role and the portal's ...
    • Accredible

      Overview Accredible is a credentialing platform that can be integrated with the CYPHER Learning platforms. By integrating Accredible, businesses and schools can encourage course completion and learner engagement by recognizing users with Accredible ...
    • CYPHER Agent for administrators

      Overview CYPHER Agent is an indispensable tool that uses the power of AI to take your learning platform to the next level. CYPHER Agent consists of multiple tools. Click the links below to explore each tool: CYPHER Agent course creation: Use CYPHER ...
    • Networks

      Overview You can organize businesses into a network, which is a great way for members of the businesses to collaborate, share resources, and teach/enroll in each other's courses. Each network has a description, one or more member businesses, one or ...