Articles in this section
Category / Section

Understanding Webhooks: An Easy Way to Automate Tasks

Published:
40 mins read

Webhooks are automated notifications or HTTP callbacks that allow applications to communicate and exchange data in real time. In BrainCert's Learning Management System (LMS), Webhooks serve as a powerful integration tool, enabling seamless interactions between BrainCert and external services or applications.

Webhooks act as instant messengers connecting various applications. Within BrainCert's LMS, they play a pivotal role in ensuring smooth operations by facilitating seamless information exchange between BrainCert and other applications.


How Webhooks Function in BrainCert

In BrainCert, Webhooks work by automatically starting actions or events when certain things happen in the LMS platform. For example, when someone new signs up or finishes a course, BrainCert sends a message to a special web address (called a Webhook endpoint) using an HTTP POST request. This lets other systems know about what happened.

Creating a Webhook

Follow the steps provided to create a webhook effortlessly:

Step 1:

Log in to your BrainCert account navigate to the Global Settings section and open the Webhooks tab.

1.png


Step 2:

Click on the '+ Add Webhook' button to initiate the process of creating a new webhook.
2.png


Step 3:

Configuring Webhook Details
3.png


Fill out the following details to configure your webhook:

  • Webhook Name: Provide a descriptive name for your webhook to easily identify its purpose.
  • Webhook URL: Paste the webhook URL into the designated webhook URL section of the application you wish to integrate with.
  • Select Topic: Choose the specific event or topic that will trigger the webhook.
  • Content-Type: Select the appropriate content type for the webhook payload, either "application/json" or "application/xml".
  • "application/json" - Representing data in a lightweight, human-readable format
  • "application/xml" - Represents data in a more verbose, structured format.
  • Basic Authentication: Specify whether basic authentication is required for accessing the webhook URL. Choose "Yes" or "No" accordingly.
    • If "Yes," provide the username and password required for authentication.
  • Webhook Body: Define the structure and content of the webhook payload, including any relevant data to be included.

Once you have configured all the necessary details for your webhook, click on the "Save" button to save your settings.

Following the steps outlined above, you can easily set up and configure Webhooks within BrainCert to enable seamless integration with external systems.


Send Test

After pasting the URL, perform a test submission by clicking on 'Send Test' button. The response will be sent to the connected app. Verify the received response sent from the BrainCert webhook body.

4.png

BrainCert Webhook Topics

These webhook triggers are helpful for real-time notifications and integrations with external systems. They enable automated processes, such as updating user records, tracking course enrollment, managing content creation, and monitoring sales activity, enhancing overall efficiency and data synchronization within the BrainCert platform.

#TopicsTriggers
1User CreatedTriggers when a new user account is created.
2Group CreatedTriggers when a new group is created.
3Course CreatedTriggers when a new course is created.
4Course Bundle CreatedTriggers when a new course bundle is created.
5Test CreatedTriggers when a new test is created.
6Live Class CreatedTriggers when a new live class is created.
7User UpdatedTriggers when a user profile is updated.
8Course UpdatedTriggers when a course is updated.
9Course Bundle UpdatedTriggers when a course bundle is updated.
10Test UpdatedTriggers when a test is updated.
11Live Class UpdatedTriggers when a new product is created.
12Product CreatedTriggers when a new product is created.
13User DeletedTriggers when a user account is deleted.
14Course DeletedTriggers when a course is deleted.
15Course Bundle DeletedTriggers when a course bundle is deleted.
16Test DeletedTriggers when a test is deleted.
17Live Class DeletedTriggers when a live class is deleted.
18Product DeletedTriggers when a product is deleted.
19Course EnrollmentTriggers when a user enrolls in a course.
20Test EnrollmentTriggers when a user enrolls in a test.
21Live Class EnrollmentTriggers when a user enrolls in a live class.
22Course CompletedTriggers when a user completes a course.
23Test CompletedTriggers when a user completes a test.
24New SaleTriggers when a new sale is made.


Webhook Trigger JSON Example

User Created

The 'User Created' webhook triggers when a new user account is successfully created in the system, allowing you to automate actions based on user registration events. Use this webhook to integrate user creation with external systems or notifications.

{
  "id": "20240214103000123456789",
  "resource": "user",
  "action": "signup",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T10:30:00.000Z",
  "payload": {
    "name": "John Doe",
    "user_id": 789012,
    "email": "[email protected]",
    "date_added": "2024-02-14T10:30:00.000Z",
    "avatar_url": null,
    "custom_registration_fields": [
      {
        "field_id": "school",
        "field_name": "School",
        "field_value": "University of BrainCert"
      },
      {
        "field_id": "major",
        "field_name": "Major",
        "field_value": "Computer Science"
      }
    ],
    "groups": [
      {
        "group_id": "101",
        "group_name": "Web Development Enthusiasts"
      },
      {
        "group_id": "102",
        "group_name": "Advanced Mathematics"
      }
    ],
    "roles": [
      {
        "role_id": "1",
        "role_name": "Student"
      },
      {
        "role_id": "2",
        "role_name": "Course Contributor"
      }
    ]
  }
}

Group Created (Exclusive to enterprise plans)

The 'Group Created' webhook fires when a new group is successfully created, enabling automated actions or integrations with external systems.
{
  "id": "03HK59P9478904RFVETKD4ZXXM",
  "resource": "group",
  "action": "created",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T15:45:00.000Z",
  "timestamp": 1684392300,
  "payload": {
    "group_id": 304050,
    "group_name": "Webhooks Enthusiasts",
    "description": "A group for individuals passionate about learning and sharing knowledge on webhooks and their applications in modern web development."
  }
}

Course Created

The 'Course Created' webhook triggers when a new course is successfully created in the system, allowing for automated processes or integrations based on course creation events.
{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "course",
  "action": "created",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Introduction to Webhooks",
    "slug": "introduction-to-webhooks",
    "subtitle": "The Power of Real-Time Integrations",
    "description": "A comprehensive guide to understanding and implementing webhooks. Learn through hands-on examples and real-world scenarios.",
    "course_card_image_url": "/assets/images/intro-to-webhooks.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "free/paid",
    "instructors": [
      {
        "id": 890789,
        "first_name": "Alex",
        "last_name": "Smith",
        "bio": "Senior Developer and Educator"
      },
      {
        "id": 890790,
        "first_name": "Jamie",
        "last_name": "Doe",
        "bio": "Expert in Webhook Integrations"
      }
    ]
  }
}

Course Bundle Created

The 'Course Bundle Created' webhook triggers when a new course bundle is successfully created in the system, enabling automated actions or integrations based on course bundle creation events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "bundle",
  "action": "created",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Webhooks Mastery Bundle",
    "slug": "webhooks-mastery-bundle",
    "description": "This bundle includes a comprehensive set of courses to master webhooks, from basic concepts to advanced implementations.",
    "bundle_card_image_url": "/assets/images/webhooks-mastery-bundle.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "paid",
    "courses": [
      {
        "course_id": 101,
        "course_name": "Introduction to Webhooks",
        "instructors": [
          {
            "id": 890789,
            "first_name": "Alex",
            "last_name": "Smith",
            "bio": "Senior Developer and Educator"
          }
        ]
      },
      {
        "course_id": 102,
        "course_name": "Advanced Webhooks in Practice",
        "instructors": [
          {
            "id": 890790,
            "first_name": "Jamie",
            "last_name": "Doe",
            "bio": "Expert in Webhook Integrations"
          }
        ]
      }
    ]
  }
}

Test Created

The 'Test Created' webhook fires when a new test is successfully created in the system, allowing for automated actions or integrations based on test creation events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "assessment",
  "action": "created",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Advanced Webhooks Assessment",
    "slug": "advanced-webhooks-assessment",
    "description": "Test your knowledge and application skills on webhooks with this comprehensive assessment.",
    "tes_card_image_url": "/assets/images/intro-to-webhooks.png",
    "scoring_type": "adaptive",
    "time_limit": "30 minutes",
    "payment_type": "free/paid",
    "created_at": "2024-02-14T21:52:13.530Z",
    "instructor": {
      "id": 890789,
      "first_name": "Alex",
      "last_name": "Smith",
      "bio": "Senior Developer and Educator"
    }
  }
}

Live Class Created

The 'Live Class Created' webhook triggers when a new live class is successfully created in the system, enabling automated actions or integrations based on live class creation events.

{
  "id": "02FJ48M9467893RFVEBKD3YWWL",
  "resource": "virtual classroom",
  "action": "created",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T10:30:00.000Z",
  "timestamp": 1684372200,
  "payload": {
    "class_id": 202223,
    "name": "Interactive Webhooks Workshop",
    "slug": "interactive-webhooks-workshop",
    "description": "Join us for a live, interactive workshop on webhooks, where you'll learn the basics and advanced techniques through real-world applications.",
    "datacenter": "New York",
    "class_type": "One-time/recurring",
    "attendee_limit": 100,
    "scheduled_date": "2024-03-01",
    "scheduled_time": "15:00:00",
    "instructors": [
      {
        "id": 891011,
        "first_name": "Jordan",
        "last_name": "Casey"
      },
      {
        "id": 891012,
        "first_name": "Alex",
        "last_name": "Taylor"
      }
    ]
  }
}

User Updated

The 'User Updated' webhook fires when a user's information is successfully updated in the system, allowing for automated actions or integrations based on user update events.

{
  "id": "20240214103000123456789",
  "resource": "user",
  "action": "updated",
  "tenant_id": "John Doe",
  "domain_id": "John Doe",
  "created_at": "2022-05-11T01:20:54.000Z",
  "timestamp": 1652232054,
  "payload": {
    "id": 2017237,
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "roles": [
      {
        "role_id": "3",
        "role_name": "Instructor"
      }
    ],
    "custom_registration_fields": [
      {
        "field_id": "location",
        "field_name": "Location",
        "field_value": "New York"
      },
      {
        "field_id": "department",
        "field_name": "Department",
        "field_value": "Engineering"
      }
    ],
    "groups": [
      {
        "group_id": "201",
        "group_name": "Software Engineering Masters"
      },
      {
        "group_id": "202",
        "group_name": "Project Management"
      }
    ]
  }
}

Course Updated

The 'Course Updated' webhook triggers when a course is successfully updated in the system, enabling automated actions or integrations based on course update events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "course",
  "action": "updated",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Introduction to Webhooks",
    "slug": "introduction-to-webhooks",
    "subtitle": "The Power of Real-Time Integrations",
    "description": "A comprehensive guide to understanding and implementing webhooks. Learn through hands-on examples and real-world scenarios.",
    "course_card_image_url": "/assets/images/intro-to-webhooks.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "free/paid",
    "instructors": [
      {
        "id": 890789,
        "first_name": "Alex",
        "last_name": "Smith",
        "bio": "Senior Developer and Educator"
      },
      {
        "id": 890790,
        "first_name": "Jamie",
        "last_name": "Doe",
        "bio": "Expert in Webhook Integrations"
      }
    ]
  }
}

Course Bundle Updated

The 'Course Bundle Updated' webhook fires when a course bundle is successfully updated in the system, allowing for automated actions or integrations based on course bundle update events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "bundle",
  "action": "updated",
  "domain_id": "William Smith",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Webhooks Mastery Bundle",
    "slug": "webhooks-mastery-bundle",
    "description": "This bundle includes a comprehensive set of courses to master webhooks, from basic concepts to advanced implementations.",
    "bundle_card_image_url": "/assets/images/webhooks-mastery-bundle.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "paid",
    "courses": [
      {
        "course_id": 101,
        "course_name": "Introduction to Webhooks",
        "instructors": [
          {
            "id": 890789,
            "first_name": "Alex",
            "last_name": "Smith",
            "bio": "Senior Developer and Educator"
          }
        ]
      },
      {
        "course_id": 102,
        "course_name": "Advanced Webhooks in Practice",
        "instructors": [
          {
            "id": 890790,
            "first_name": "Jamie",
            "last_name": "Doe",
            "bio": "Expert in Webhook Integrations"
          }
        ]
      }
    ]
  }
}

Test Updated

The 'Test Updated' webhook triggers when a test is successfully updated in the system, enabling automated actions or integrations based on test update events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "assessment",
  "action": "updated",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Advanced Webhooks Assessment",
    "slug": "advanced-webhooks-assessment",
    "description": "Test your knowledge and application skills on webhooks with this comprehensive assessment.",
    "tes_card_image_url": "/assets/images/intro-to-webhooks.png",
    "scoring_type": "adaptive",
    "time_limit": "30 minutes",
    "payment_type": "free/paid",
    "created_at": "2024-02-14T21:52:13.530Z",
    "instructor": {
      "id": 890789,
      "first_name": "Alex",
      "last_name": "Smith",
      "bio": "Senior Developer and Educator"
    }
  }
}

Product Created

The 'Product Created' webhook activates when a new product is successfully created in the system, enabling automated actions or integrations based on product creation events.

{
  "id": "20240301191956020665300",
  "resource": "product",
  "action": "created",
  "tenant_id": "William Smith",
  "created_at": "2024-03-01T15:19:01.924Z",
  "payload": {
    "product_type": "Physical product",
    "name": "Course Growing Star",
    "excerpt": "Excerpt",
    "slug": "https://entelyst.braincert.com/product/course-growing-star",
    "price": "Price",
    "discount": "Discount",
    "description": "Description",
    "shipping_option": "Both",
    "shipping_charge": "Shipping Charge",
    "weight": "Weight lb",
    "banner": "Banner URL",
    "sku": "SKU",
    "track_stock": true,
    "items_in_stock": 0
  }
}

User Deleted

The 'User Deleted' webhook triggers when a user account is deleted from the system, facilitating automated processes or integrations upon user deletion events.

{
  "id": "20240214103000123456789",
  "resource": "user",
  "action": "deleted",
  "tenant_id": "John Doe",
  "domain_id": "John Doe",
  "created_at": "2022-05-11T01:20:54.000Z",
  "timestamp": 1652232054,
  "payload": {
    "id": 2017237,
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "roles": [
      {
        "role_id": "3",
        "role_name": "Instructor"
      }
    ],
    "custom_registration_fields": [
      {
        "field_id": "location",
        "field_name": "Location",
        "field_value": "New York"
      },
      {
        "field_id": "department",
        "field_name": "Department",
        "field_value": "Engineering"
      }
    ],
    "groups": [
      {
        "group_id": "201",
        "group_name": "Software Engineering Masters"
      },
      {
        "group_id": "202",
        "group_name": "Project Management"
      }
    ]
  }
}

Course Deleted

The 'Course Deleted' webhook triggers when a course is deleted, allowing for automated actions or integrations in response to course deletion events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "course",
  "action": "deleted",
  "domain_id": "William Smith",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Introduction to Webhooks",
    "slug": "introduction-to-webhooks",
    "subtitle": "The Power of Real-Time Integrations",
    "description": "A comprehensive guide to understanding and implementing webhooks. Learn through hands-on examples and real-world scenarios.",
    "course_card_image_url": "/assets/images/intro-to-webhooks.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "free/paid",
    "instructors": [
      {
        "id": 890789,
        "first_name": "Alex",
        "last_name": "Smith",
        "bio": "Senior Developer and Educator"
      },
      {
        "id": 890790,
        "first_name": "Jamie",
        "last_name": "Doe",
        "bio": "Expert in Webhook Integrations"
      }
    ]
  }
}

Course Bundle Deleted

The 'Course Bundle Deleted' webhook triggers when a course bundle is deleted, enabling automated actions or integrations in response to course bundle deletion events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "bundle",
  "action": "deleted",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Webhooks Mastery Bundle",
    "slug": "webhooks-mastery-bundle",
    "description": "This bundle includes a comprehensive set of courses to master webhooks, from basic concepts to advanced implementations.",
    "bundle_card_image_url": "/assets/images/webhooks-mastery-bundle.png",
    "created_at": "2024-02-14T21:52:13.530Z",
    "payment_type": "paid",
    "courses": [
      {
        "course_id": 101,
        "course_name": "Introduction to Webhooks",
        "instructors": [
          {
            "id": 890789,
            "first_name": "Alex",
            "last_name": "Smith",
            "bio": "Senior Developer and Educator"
          }
        ]
      },
      {
        "course_id": 102,
        "course_name": "Advanced Webhooks in Practice",
        "instructors": [
          {
            "id": 890790,
            "first_name": "Jamie",
            "last_name": "Doe",
            "bio": "Expert in Webhook Integrations"
          }
        ]
      }
    ]
  }
}

Test Deleted

The 'Test Deleted' webhook triggers when a test is deleted, enabling automated actions or integrations in response to test deletion events.

{
  "id": "01EJ79N9456763TEVEAKD2YWWC",
  "resource": "assessment",
  "action": "deleted",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T21:52:13.000Z",
  "timestamp": 1684289533,
  "payload": {
    "id": 909850,
    "name": "Advanced Webhooks Assessment",
    "slug": "advanced-webhooks-assessment",
    "description": "Test your knowledge and application skills on webhooks with this comprehensive assessment.",
    "tes_card_image_url": "/assets/images/intro-to-webhooks.png",
    "scoring_type": "adaptive",
    "time_limit": "30 minutes",
    "payment_type": "free/paid",
    "created_at": "2024-02-14T21:52:13.530Z",
    "instructor": {
      "id": 890789,
      "first_name": "Alex",
      "last_name": "Smith",
      "bio": "Senior Developer and Educator"
    }
  }
}

Live Class Deleted

The 'Live Class Deleted' webhook triggers when a live class is deleted, enabling automated actions or integrations in response to live class deletion events.

{
  "id": "02FJ48M9467893RFVEBKD3YWWL",
  "resource": "virtual classroom",
  "action": "deleted",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T10:30:00.000Z",
  "timestamp": 1684372200,
  "payload": {
    "class_id": 202223,
    "name": "Interactive Webhooks Workshop",
    "slug": "interactive-webhooks-workshop",
    "description": "Join us for a live, interactive workshop on webhooks, where you'll learn the basics and advanced techniques through real-world applications.",
    "datacenter": "New York",
    "class_type": "One-time/recurring",
    "attendee_limit": 100,
    "scheduled_date": "2024-03-01",
    "scheduled_time": "15:00:00",
    "instructors": [
      {
        "id": 891011,
        "first_name": "Jordan",
        "last_name": "Casey"
      },
      {
        "id": 891012,
        "first_name": "Alex",
        "last_name": "Taylor"
      }
    ]
  }
}

Product Deleted

The 'Product Deleted' webhook triggers when a product is deleted, allowing automated actions or integrations in response to product deletion events.

{
  "id": "20240301191956020665300",
  "resource": "product",
  "action": "deleted",
  "tenant_id": "William Smith",
  "created_at": "2024-03-01T15:19:01.924Z",
  "payload": {
    "product_type": "Physical product",
    "name": "Course Growing Star",
    "excerpt": "Excerpt",
    "slug": "https://entelyst.braincert.com/product/course-growing-star",
    "price": "Price",
    "discount": "Discount",
    "description": "Description",
    "shipping_option": "Both",
    "shipping_charge": "Shipping Charge",
    "weight": "Weight lb",
    "banner": "Banner URL",
    "sku": "SKU",
    "track_stock": true,
    "items_in_stock": 0
  }
}

Course Enrollment

The 'Course Enrollment' webhook triggers when a user enrolls in a course, enabling automated actions or integrations based on course enrollment events.

{
  "id": "20240126171756020665195",
  "resource": "course_enrollment",
  "action": "enrollment",
  "tenant_id": "Jason Miller",
  "created_at": "2024-01-26T22:17:01.924Z",
  "payload": {
    "activated_at": "2024-01-26T22:16:52.255Z",
    "course": {
      "id": 101,
      "name": "Advanced Web Development"
    },
    "enrollment_id": 97472,
    "started_at": "2024-01-26T22:17:01.891Z",
    "user": {
      "email": "[email protected]",
      "first_name": "Jane",
      "id": 123457,
      "last_name": "Doe"
    }
  }
}

Test Enrollment

The 'Test Enrollment' webhook triggers when a user enrolls in a test, allowing for automated actions or integrations based on test enrollment events.

{
  "id": "20240127171756020665196",
  "resource": "test_enrollment",
  "action": "enrollment",
  "tenant_id": "William Smith",
  "created_at": "2024-01-27T22:17:01.924Z",
  "payload": {
    "activated_at": "2024-01-27T22:16:52.255Z",
    "test": {
      "id": 202,
      "name": "Webhooks Certification Exam"
    },
    "enrollment_id": 97473,
    "started_at": "2024-01-27T22:17:01.891Z",
    "user": {
      "email": "[email protected]",
      "first_name": "John",
      "id": 123458,
      "last_name": "Public"
    }
  }
}

Live Class Enrollment

The 'Live Class Enrollment' webhook triggers when a user enrolls in a live class, facilitating automated actions or integrations based on live class enrollment events.
{
  "id": "20240303192058040865502",
  "resource": "virtual classroom",
  "action": "enrollment",
  "tenant_id": "William Smith",
  "created_at": "2024-03-03T17:20:03.408Z",
  "payload": {
    "class_id": 202223,
    "live_class": {
      "name": "Advanced Yoga Techniques",
      "datacenter": "New York",
      "class_type": "One-time",
      "scheduled_date": "2024-04-01",
      "scheduled_time": "08:00:00"
    },
    "enrollment_id": 97676,
    "enrolled_at": "2024-03-03T17:20:03.401Z",
    "user": {
      "email": "[email protected]",
      "first_name": "Morgan",
      "id": 123461,
      "last_name": "Practitioner"
    },
    "enrollment_status": "Active"
  }
}

Course Completed

The 'Course Completed' webhook triggers when a user completes a course, enabling automated actions or integrations based on course completion events.

{
  "id": "20240214103000123456789",
  "resource": "course_completion",
  "action": "completed",
  "domain_id": "Jason Miller",
  "created_at": "2024-02-14T12:00:00.000Z",
  "timestamp": 1644835200,
  "payload": {
    "course": {
      "id": 12345,
      "title": "Example Course Title",
      "completion_date": "2024-02-14T12:00:00Z"
    },
    "user": {
      "first_name": "John",
      "last_name": "Doe",
      "id": 67890,
      "email": "[email protected]"
    },
    "completion_details": {
      "certificate_issued": "yes",
      "certificate_expiry": "yes",
      "certificate_expiration_date": "2025-02-14T12:00:00Z"
    }
  }
}

Test Completed

The 'Test Completed' webhook triggers when a user completes a test, allowing for automated actions or integrations based on test completion events.

{
  "id": "20191029145629636106318",
  "resource": "assessment",
  "action": "completed",
  "domain_id": "John Doe",
  "created_at": "2024-02-14T21:02:50.000Z",
  "timestamp": 1684288970,
  "payload": {
    "id": 909850,
    "name": "Advanced Webhooks Test",
    "final_score": 85,
    "passing_score": 75,
    "open_ended": "no/yes",
    "scoring_type": "adaptive/standard/partial credit",
    "time_limit": "30 minutes",
    "manual_scoring": "pending/completed/null",
    "total_questions": 20,
    "correct_count": 17,
    "incorrect_count": 3,
    "user": {
      "id": 124567,
      "first_name": "Sam",
      "last_name": "Davis",
      "email": "[email protected]"
    }
  }
}

New Sale

The 'New Sale' webhook triggers when a new sale occurs, enabling automated processes or integrations based on new transaction events.
{
    "id": "20180126172320940835610",
    "resource": "purchase",
    "action": "completed",
    "tenant_id": "3",
    "created_at": "2023-11-30T16:51:00.000Z",
    "payload": {
        "order_id": "ORD_ep3FVWZ9lC",
        "order_date": "2023-11-30T16:51:00.000Z",
        "payment_method": "paypal",
        "payment_mode": "card",
        "currency": "USD",
        "total_amount": 180,
        "service_charge": 0,
        "total": 180,
        "payment_status": "paid",
        "items": [
            {
                "type": "course",
                "name": "PHP course",
                "price": 100,
                "quantity": 1,
                "shipping_charge": 0,
                "total_shipping_amount": 0,
                "discount": 0,
                "item_total": 100
            },
            {
                "type": "assessment",
                "name": "Recurring payment test",
                "price": 80,
                "quantity": 1,
                "shipping_charge": 0,
                "total_shipping_amount": 0,
                "discount": 0,
                "item_total": 80
            }
        ],
        "user": {
            "email": "[email protected]",
            "first_name": "Yasin",
            "customer_since": "2011-05-28T15:41:00.000Z"
        }
    }
}

Using Webhooks allows you to automate processes, receive real-time notifications, and enhance the functionality of ppr platform. Experiment with different webhook configurations to suit your specific requirements and unlock the full potential of this powerful integration feature.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied