Add Single Milestone (Resource / Job Specific): /workflow/component/{component_uuid}/{component_record_id}/milestone
Purpose
This API is used to add a single milestone to a specific workflow state for a given component record (resource or job). The milestone is created under a user-defined workflow that is already associated with the specified custom component, enabling structured tracking of task timelines, assignments, and alerts at a granular level.
Use Case
- Add a job-specific milestone under a particular workflow state.
- Define start and end dates for milestone-level tracking.
- Assign multiple stakeholders such as operators, accounts, labours, and employees to a milestone.
- Configure automated alerts and notifications tied to milestone timelines.
- Enable workflow-driven progress monitoring for individual jobs or resources.
Path Parameters
| Attribute | Type | Description |
|---|---|---|
| component_uuid | UUID | Unique identifier of the custom component to which the workflow is assigned |
| component_record_id | String | Record ID of the specific job or resource within the component |
Query Parameters
This endpoint does not support query parameters
Request Body
{
"workflow_data": [
{
"workflow_uuid": "WORKFLOW_UUID",
"data": [
{
"state_name": "WORKFLOW_STATE_NAME",
"milestones": [
{
"start_date": "START_DATE",
"end_date": "END_DATE",
"name": "MILESTONE_NAME",
"display_name": "MILESTONE_DISPLAY_NAME",
"description": "MILESTONE_DESCRIPTION",
"assignees": [
{
"type": "OPERATOR",
"name": "OPERATOR_NAME",
"email": "OPERATOR_EMAIL"
},
{
"type": "ACCOUNT",
"name": "ACCOUNT_CONTACT_NAME",
"email": "ACCOUNT_CONTACT_EMAIL",
"account_id": "ACCOUNT_ID"
},
{
"type": "LABOUR",
"labour_code": "LABOUR_CODE"
},
{
"type": "EMPLOYEE",
"employee_code": "EMPLOYEE_CODE"
}
],
"alerts": [
{
"name": "ALERT_NAME",
"display_name": "ALERT_DISPLAY_NAME",
"description": "ALERT_DESCRIPTION",
"time_interval": {
"trigger": "TRIGGER_TYPE",
"trigger_value": "TRIGGER_VALUE",
"trigger_unit": "TRIGGER_UNIT"
},
"notification_option": "NOTIFICATION_OPTION",
"email_html": "EMAIL_TEMPLATE",
"selected_account_and_contacts": [
{
"account_id": "ACCOUNT_ID"
}
],
"selected_labours": [
{
"labour_code": "LABOUR_CODE"
}
],
"selected_employees": [
{
"employee_code": "EMPLOYEE_CODE"
}
]
}
]
}
]
}
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| workflow_data | Array | Collection of workflow-specific milestone definitions |
| workflow_uuid | UUID | Unique identifier of the workflow assigned to the component |
| state_name | String | Name of the workflow state under which the milestone is added |
| milestones | Array | List of milestones to be created under the specified state |
| start_date | Date (YYYY-MM-DD) | Planned start date of the milestone |
| end_date | Date (YYYY-MM-DD) | Planned end date of the milestone |
| name | String | Internal name of the milestone |
| display_name | String | User-facing display name of the milestone |
| description | String | Description of the milestone |
| assignees | Array | List of users, accounts, labours, or employees assigned to the milestone |
| type | String | Assignee type (OPERATOR, ACCOUNT, LABOUR, EMPLOYEE) |
| labour_code | String | Unique code of the labour to be assigned |
| employee_code | String | Unique code of the employee to be assigned |
| alerts | Array | Alert configurations associated with the milestone |
| time_interval | Object | Defines when the alert should be triggered |
| trigger | String | Specifies whether the alert is triggered before or after the event |
| trigger_value | Integer | Numeric value for alert timing |
| trigger_unit | String | Unit of time for the alert (hour, day, etc.) |
| notification_option | String | Type of notification action to be executed |
Response
On successful execution, the API returns a structured response containing all milestones created under the specified workflow. Each milestone includes its system-generated identifiers, workflow linkage, assigned users, configured alerts, and lifecycle metadata. The response confirms that the milestone has been successfully associated with the given workflow state and component record.
Response Body
{
"all_milestones": [
{
"workflow_uuid": "WORKFLOW_UUID",
"milestones": [
{
"uuid": "MILESTONE_UUID",
"name": "MILESTONE_NAME",
"display_name": "MILESTONE_DISPLAY_NAME",
"description": "MILESTONE_DESCRIPTION",
"status": "ACTIVE",
"start_date": "START_DATE_ISO",
"end_date": "END_DATE_ISO",
"state_name": "WORKFLOW_STATE_NAME",
"workflow_version_uuid": "WORKFLOW_VERSION_UUID",
"assignees": {
"selected_operators": [],
"selected_account_contacts": [],
"selected_labours": [],
"selected_employees": []
},
"alerts": [
{
"uuid": "ALERT_UUID",
"name": "ALERT_NAME",
"display_name": "ALERT_DISPLAY_NAME",
"type": "MILESTONE",
"trigger": "TRIGGER_TYPE",
"trigger_value": "TRIGGER_VALUE",
"trigger_unit": "TRIGGER_UNIT",
"status": "ACTIVE",
"recipients": [],
"actions": []
}
],
"activity_definition_reference_uuid": "ACTIVITY_DEFINITION_UUID"
}
]
}
]
}
| Attribute | Type | Description |
|---|---|---|
| all_milestones | Array | Collection of milestones grouped by workflow |
| workflow_uuid | UUID | Identifier of the workflow associated with the milestones |
| uuid | UUID | System-generated unique identifier of the milestone |
| status | String | Current lifecycle status of the milestone |
| state_name | String | Workflow state under which the milestone exists |
| workflow_version_uuid | UUID | Identifier of the workflow version applied |
| assignees | Object | All assigned users and resources linked to the milestone |
| alerts | Array | Alert definitions configured for the milestone |
| recipients | Array | Entities that will receive notifications |
| activity_definition_reference_uuid | UUID | Internal reference linking milestone to workflow activity |
Create Alert Responsibility: /alert_responsibility
Purpose
This API is used to create a new alert responsibility that can be assigned to alerts within workflows, milestones, or other alert-enabled entities. Alert responsibilities define logical roles (such as CEO, Manager, or QA) that help control and filter alert recipients in a structured and reusable manner.
Use Case
- Define reusable responsibility roles for alert configurations.
- Assign alert responsibilities to milestones or workflow alerts.
- Enable responsibility-based filtering when sending notifications.
- Maintain consistency in alert recipient selection across workflows.
Path Parameters
This endpoint does not require any path parameters
Query Parameters
This endpoint does not support query parameters
Request Body
{
"name": "RESPONSIBILITY_NAME",
"display_name": "RESPONSIBILITY_DISPLAY_NAME",
"add_description": "ADD_DESCRIPTION_FLAG",
"description": "RESPONSIBILITY_DESCRIPTION"
}
| Attribute | Type | Description |
|---|---|---|
| name | String | Internal unique name of the alert responsibility |
| display_name | String | User-facing display name of the alert responsibility |
| add_description | Boolean | Determines whether a description is required and stored |
| description | String | Description of the alert responsibility, applicable only when add_description is true |
Response
On successful execution, the API returns a confirmation message indicating that the alert responsibility has been created successfully. This response confirms that the responsibility is now available for assignment within alert configurations across workflows and milestones.
Response Body
{
"message": "SUCCESS_MESSAGE"
}
| Attribute | Type | Description |
|---|---|---|
| message | String | System-generated confirmation message indicating successful creation of the alert responsibility |