Skip to main content

Webhook: TASK_CANCELLED

Overview​

The TASK_CANCELLED webhook is triggered when a task is canceled by an employee. This ensures that relevant systems or users are notified, allowing updates to task statuses, resource planning, and tracking activities.


Purpose​

The webhook helps integrate real-time notifications about task cancellations into external systems, enabling stakeholders to take necessary actions (e.g., reallocating resources or updating workflows).


Request Format​

The webhook is sent as an HTTP POST request with the following payload structure:

{
"entityId": "9af5d7b0-b1e2-4436-b02e-1c6346eb09d1",
"type": "TASK_CANCELLED",
"createdAt": "2024-12-16T11:53:01.158Z",
"data": {
"id": "9af5d7b0-b1e2-4436-b02e-1c6346eb09d1",
"organizationId": "9864d894-699a-4a00-8d4c-ae181215d721",
"locationId": "27b732ee-5921-475f-acd7-137fc4d5aa0f",
"startAt": "2024-12-16T12:00:00.000Z",
"endAt": "2024-12-16T13:00:00.000Z",
"name": "Task 3",
"assigneeIds": [
"6ad1a95b-ea50-4e23-8495-ef82900ca98d"
],
"recurrenceRule": null,
"stepId": null,
"actionId": null
},
"id": 201
}

Key Properties​

Top-Level Properties​

  • entityId: Unique identifier for the canceled task.
  • type: Specifies the webhook type (TASK_CANCELLED).
  • createdAt: Timestamp when the webhook was triggered (ISO 8601 format).
  • data: Contains detailed task information.

Data Section​

  • id: ID of the canceled task.
  • organizationId: The organization associated with the task.
  • locationId: The location related to the task.
  • startAt: Start time of the task (ISO 8601 format).
  • endAt: End time of the task (ISO 8601 format).
  • name: Name or title of the task.
  • assigneeIds: List of user IDs assigned to the task.
  • recurrenceRule: Recurrence details for the task (if any; null in this case).
  • stepId: Identifier for the specific step in a workflow (null if not applicable).
  • actionId: Identifier for the associated action (null if not applicable).

Example Response​

A sample webhook payload for a successfully canceled task:

{
"entityId": "9af5d7b0-b1e2-4436-b02e-1c6346eb09d1",
"type": "TASK_CANCELLED",
"createdAt": "2024-12-16T11:53:01.158Z",
"data": {
"id": "9af5d7b0-b1e2-4436-b02e-1c6346eb09d1",
"organizationId": "9864d894-699a-4a00-8d4c-ae181215d721",
"locationId": "27b732ee-5921-475f-acd7-137fc4d5aa0f",
"startAt": "2024-12-16T12:00:00.000Z",
"endAt": "2024-12-16T13:00:00.000Z",
"name": "Task 3",
"assigneeIds": [
"6ad1a95b-ea50-4e23-8495-ef82900ca98d"
],
"recurrenceRule": null,
"stepId": null,
"actionId": null
}
}

Benefits of TASK_CANCELLED Webhook​

  1. Real-Time Updates: Ensures immediate notification to external systems or stakeholders about task cancellations.
  2. Improved Planning: Helps update schedules and resource allocation based on task cancellations.
  3. Streamlined Workflows: Enables external systems to adjust workflows or dependencies efficiently.

The TASK_CANCELLED webhook provides essential information for maintaining consistency and accuracy in task management systems.