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. 

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 either by using the API or in-app in WISEflow, 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 event 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. 

Create a New Grade Justification

Using POST /flow{flowId}/explanation/request a student can create a new grade justification request directly from e.g. Moodle or Canvas. 

Here the case would be that the integration logic fetches grades from a flow, making them visible for the students. The students can then, after viewing the grade, request a new grade justification.

Get Additional Information on a Grade Justification

The event payload will hold the information necessary to fetch further information via the grade justification endpoints.

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:

[
  {
    "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