# Extra Payload Attributes - SubTask

These attributes make up the extra payload for the **SubTask** webhook resource for the following events: **Create** / **Update** / **Delete**

## Create / Update Attributes

[block:parameters]
{
  "data": {
    "h-0": "ATTRIBUTE",
    "0-0": "**id**  \nstring",
    "1-0": "**entity.entityId**  \nstring",
    "2-0": "**entity.entityType**  \nstring",
    "3-0": "**action**  \nstring",
    "4-0": "**modified**  \nstring",
    "5-0": "**modifiedBy**  \nstring",
    "6-0": "**type**  \nstring",
    "7-0": "**modifiedAttributes.attribute**  \nstring",
    "8-0": "**modifiedAttributes.priorValue**  \nstring",
    "9-0": "**modifiedAttributes.newValue**  \nstring"
  },
  "cols": 1,
  "rows": 10,
  "align": [
    "left"
  ]
}
[/block]

## Delete Attributes

[block:parameters]
{
  "data": {
    "h-0": "ATTRIBUTE",
    "0-0": "**id**  \nstring",
    "1-0": "**entity.entityId**  \nstring",
    "2-0": "**entity.entityType**  \nstring",
    "3-0": "**action**  \nstring",
    "4-0": "**modified**  \nstring",
    "5-0": "**modifiedBy**  \nstring",
    "6-0": "**type**  \nstring"
  },
  "cols": 1,
  "rows": 7,
  "align": [
    "left"
  ]
}
[/block]

## Webhook Payload Notification Samples

```json Create
{
    "eventId": "564de953-b13f-45fa-bcfd-fc789c00c370",
    "eventTime": "2024-12-11T21:17:29.000Z",
    "eventType": "create",
    "meta": {
        "userId": "admin",
        "resourceType": "SubTask",
        "resourceId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "instanceId": "be11172718",
        "resourceRef": "workflow/v1/subtasks/c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "payload": {
            "id": "6f4a8312-706b-401d-9c88-313c7cfeddff",
            "entity": {
                "entityId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
                "entityType": "SubTask"
            },
            "action": "CREATE",
            "modified": "2024-12-11T21:17:26.735Z",
            "modifiedBy": "admin",
            "type": "Task_type_378986bc-2340403",
            "modifiedAttributes": [
                {
                    "attribute": "taskId",
                    "priorValue": null,
                    "newValue": "48250a93-0b56-4213-90f1-4f3bc844689f"
                },
                {
                    "attribute": "started",
                    "priorValue": null,
                    "newValue": "2024-12-11T21:17:26.643Z"
                },
                {
                    "attribute": "category",
                    "priorValue": null,
                    "newValue": "loansubtask"
                },
                {
                    "attribute": "id",
                    "priorValue": null,
                    "newValue": "c72c0050-ff9f-4234-a5a3-10a435ced4ed"
                },
                {
                    "attribute": "instanceId",
                    "priorValue": null,
                    "newValue": "BE11172718"
                },
                {
                    "attribute": "name",
                    "priorValue": null,
                    "newValue": "SubTask_378986bc-2340403"
                },
                {
                    "attribute": "description",
                    "priorValue": null,
                    "newValue": "Desc_378986bc-2340403"
                },
                {
                    "attribute": "type",
                    "priorValue": null,
                    "newValue": "Task_type_378986bc-2340403"
                },
                {
                    "attribute": "customAttributes",
                    "priorValue": null,
                    "newValue": "[{\"field1\":\"value 1\",\"field2\":\"value 2\"},{\"field3\":\"value 3\"}]"
                },
                {
                    "attribute": "associations",
                    "priorValue": null,
                    "newValue": "[{\"entityId\":\"e2etesting_lo\",\"entityType\":\"urn:elli:encompass:user\",\"entityUID\":\"SubTaskUID\",\"relationship\":\"user\"}]"
                },
                {
                    "attribute": "required",
                    "priorValue": null,
                    "newValue": "true"
                },
                {
                    "attribute": "status",
                    "priorValue": null,
                    "newValue": "IN_PROGRESS"
                },
                {
                    "attribute": "resolution",
                    "priorValue": null,
                    "newValue": "Completed"
                },
                {
                    "attribute": "resolutionComment",
                    "priorValue": null,
                    "newValue": "Test comment_378986bc-708e-4196-b9ee-5738e35b36e0"
                },
                {
                    "attribute": "priority",
                    "priorValue": null,
                    "newValue": "1"
                },
                {
                    "attribute": "rank",
                    "priorValue": null,
                    "newValue": "1"
                },
                {
                    "attribute": "created",
                    "priorValue": null,
                    "newValue": "2024-12-11T21:17:26.730Z"
                },
                {
                    "attribute": "lastModified",
                    "priorValue": null,
                    "newValue": "2024-12-11T21:17:26.769Z"
                },
                {
                    "attribute": "createdBy",
                    "priorValue": null,
                    "newValue": "admin"
                },
                {
                    "attribute": "lastModifiedBy",
                    "priorValue": null,
                    "newValue": "admin"
                }
            ]
        }
    }
}
```
```json Update
{
    "eventId": "53e77518-9639-4558-becd-a7c54434ee90",
    "eventTime": "2024-12-11T21:17:34.000Z",
    "eventType": "update",
    "meta": {
        "userId": "admin",
        "resourceType": "SubTask",
        "resourceId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "instanceId": "be11172718",
        "resourceRef": "workflow/v1/subtasks/c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "payload": {
            "id": "b9d112d7-4952-4f15-ae5b-09d4ba9ecb6f",
            "entity": {
                "entityId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
                "entityType": "SubTask"
            },
            "action": "UPDATE",
            "modified": "2024-12-11T21:17:31.709Z",
            "modifiedBy": "admin",
            "type": "Task_type_378986bc-2340403",
            "modifiedAttributes": [
                {
                    "attribute": "completed",
                    "priorValue": null,
                    "newValue": "2024-12-11T21:17:31.699Z"
                },
                {
                    "attribute": "status",
                    "priorValue": "IN_PROGRESS",
                    "newValue": "COMPLETED"
                },
                {
                    "attribute": "resolutionComment",
                    "priorValue": "Test comment_378986bc-708e-4196-b9ee-5738e35b36e0",
                    "newValue": "this is test"
                },
                {
                    "attribute": "completedBy",
                    "priorValue": null,
                    "newValue": "admin"
                },
                {
                    "attribute": "lastModified",
                    "priorValue": "2024-12-11T21:17:26.769Z[GMT]",
                    "newValue": "2024-12-11T21:17:31.707Z"
                }
            ]
        }
    }
}
```
```json Delete
{
    "eventId": "3c650773-fbaf-414a-8884-71e493f3cefe",
    "eventTime": "2024-12-11T21:17:39.000Z",
    "eventType": "delete",
    "meta": {
        "userId": "admin",
        "resourceType": "SubTask",
        "resourceId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "instanceId": "be11172718",
        "resourceRef": "workflow/v1/subtasks/c72c0050-ff9f-4234-a5a3-10a435ced4ed",
        "payload": {
            "id": "13a78def-b8f7-025b-6307-2edf15c292f0",
            "entity": {
                "entityId": "c72c0050-ff9f-4234-a5a3-10a435ced4ed",
                "entityType": "SubTask"
            },
            "action": "DELETE",
            "modified": "2024-12-11T21:17:34.876Z",
            "modifiedBy": "admin",
            "type": "Task_type_378986bc-2340403"
        }
    }
}
```