Receive a Notification on a New Grade Justification

This case covers how a webhook can be used to receive an update when a participant has requested a grade justification, or an assessor has submitted a grade justification. 

This use case is split in two parts:

  1. A high-level walkthrough of how an update is sent to your SIS using a webhook
  2. A technical description with examples using the webhook

This use case is ideal for institutions relying on the WISEflow API and has built their own middleware to control key aspects of WISEflow. A webhook can also be used by institutions with a custom-built integration.

Instead of constantly polling the WISEflow API for a status update, you can let the webhook event notify you on grade justifications.

When subscribed to the grade.justification event, an event will be triggered when a participant has requested a grade justification, or an assessor has submitted a grade justification. When an event has been triggered, the webhook will call your middleware and notify that there is a new grade justification. This call includes basic information on the grade justification. If you wish, you can use the information provided in the webhook call to ask the WISEflow API for additional information.

 

API_flow_charts_for_service_centre_-_Webhooks.png

The webhook will trigger when:

  • A participant will trigger the event when a grade justification has been requested

  • An assessor will trigger the event when a grade justification has been submitted

Event Payload

The payload of the grade.justification event includes basic information:

{
"flowId": 13510,
"explanationRequestId": 36,
"participantId": 16842,
"assessorId": 813879
}

Examples

Subscribing to the grade.justification event will provide you with a status update when there is either a request for a grade justification or a grade justification is ready. 

Using the API to Get Additional Information on a Grade Justification

The event payload will hold the information necessary to retrieve further information through the API.

There are different endpoints that can be useful to use in combination with the payload:

If you want to fetch further information on the grade justification, you can use the GET /flow/{flowId}/explanation/request endpoint. This will return information on the grade justification, such as the flowId, the date of request, information in the participant, the assigned assessor. This is. the complete response body: 

[
  {
    "explanationId": 1547,
    "flowId": 1014,
    "title": "Grade justification",
    "subtitle": "Example flow",
    "requestDate": 1645105507,
    "assignDate": 1645105609,
    "acceptDate": 1645105707,
    "dueDate": 1645105904,
    "state": 1,
    "participant": {
      "participantId": 15478,
      "user": {
        "id": 22147,
        "firstName": "Mr",
        "lastName": "WISEflow",
        "phone": "14457895",
        "externalIds": [
          {
            "name": "UNIwise Id",
            "value": "258"
          }
        ]
      },
      "ssoUrl": "www.uniwise.co.uk"
    },
    "assignedAssessor": {
      "assessorId": 4578,
      "user": {
        "id": 5698,
        "firstName": "Assessor",
        "lastName": "Test",
        "phone": "1234589",
        "externalIds": [
          {
            "name": "UNIwise Id",
            "value": "415"
          }
        ]
      }
    },
    "assignedBy": {
      "userId": 2555,
      "firstName": "Manager",
      "lastName": "Test"
    }
  }
]

Using the GET /flow/{flowId}/explanation/request/{explanationRequestId} endpoint and the "explanationId" from the above response it is possible to fetch only a single grade justification. The response body is the same as above, but only holds a single justification.

 

Was this article helpful?
1 out of 1 found this helpful

Articles in this section