Fracttal →

Create a pending task from a work request

Notes: - This web service is part of the ADVANCED APIS add-on - The work request must have a linked asset - The work request must be in the "open" or "under development" status.

Input parameters

ParameterTypeRequiredDescription
id_requestNumberYesJob Application ID
task_type_mainTextYesType of task
account_codeTextYesCode of the human resource or third party with a Fracttal user account, who will be registered as the creator of the pending task.
task_type_descriptionTextOptionalClassification 1 of the task
task_type_2_descriptionTextOptionalClassification 2 of the task
date_maintenanceDateYesScheduled date of the task (default is the current date - Format YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00:00-03)
date_incidentDateOptionalIncident date (default is the date of the work request incident - Format YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00:00-03)
descriptionTextOptionalTask description (default is work request description)
noteTextOptionalTask Note (default is the remarks of the work request)
durationNumberOptionalEstimated duration (in seconds - default 600 seconds)
id_prioritiesNumberOptionalTask priority: 1 - Very High 2 - High 3 - Medium 4 - Low 5 - Very Low (default 3 - Medium)
requested_byTextOptionalApplicant of the task (default applicant of the work request)
asset_out_of_serviceBooleanOptionalvalue to indicate whether the task has an associated out-of-service. False by default
date_asset_out_of_serviceDateOptionalDate of start of out-of-service

**Send the required fields and the parameters with the additional values you wish to insert.

Output parameters

ParaneterTypeDescription
id_todoNumberTask ID in the To-do module
id_taskNumberTask ID
date_createdDateDate of creation of the TO
created_byTextName of the user who is listed as the creator of the TO
idNumberId of the pending task
id_companyNumberCompany Id
id_taskNumberTask ID
id_type_itemNumberType of asset
id_itemNumberAsset Id
codeTextAsset code
item_descriptionTextDescription of asset
id_cost_centerNumberId of the asset's cost center
id_custom_field_groupNumberAsset's custom field group ID
item_id_priorityNumberAsset priority ID
id_groupNumberAsset group ID
id_group_1NumberAsset classification ID 1
id_group_2NumberAsset classification ID 2
id_task_type_mainNumberTask type ID
id_task_typeNumberTask Rating ID 1
id_task_type_2NumberTask Classification Id 2
date_maintenanceDateScheduled date of task
descriptionDateTask description
durationNumberEstimated duration
is_activeBooleanActive enabled
tasks_types_main_descriptionTextType of task
priorities_descriptionTextPriority of the task
tasks_types_descriptionTextClassification 1 of the task
tasks_types_2_descriptionTextClassification 2 of the task
id_prioritiesNumbertask priority id
parent_descriptionTextDescripción de activo padre
requested_byTextApplicant
task_noteTextNote on the task
id_requestNumberJob Application ID
event_dateDateDate of incident
cal_date_maintenanceDateCalculated date
visible_to_allBooleanAsset visible to all
groups_descriptionTextAsset group
groups_1_descriptionTextAsset classification 1
groups_2_descriptionTextAsset classification 2

Example:

Request: (POST) https://app.fracttal.com/api/tasks_from_work_request/

{
    "id_request":377,
    "task_type_main": "CORRECTIVA MRX SQA",
    "task_type_description": "MECÁNICA MRX",
    "task_type_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
    "date_maintenance": "2022-09-27T13:30:29-05",
    "date_incident": "2022-09-14T06:15:29-05",
    "description": "EJEMPLO VERIFICACIÓN DE SOLICITUD 379 A TAREAS PENDIENTES DESDE API",
    "note":"VERIFICACIÓN DE MRX",
    "duration":1500,
    "id_priorities":2,
    "account_code": "JCDIAZ",
    "requested_by":"Prueba desde API MRX"
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 8810053,
        "id_company": 1190,
        "id_task": 3157021,
        "id_type_item": 1,
        "id_item": 6,
        "code": "ENVASADO",
        "item_description": "ENVASADO      { ENVASADO }",
        "id_cost_center": null,
        "id_custom_field_group": null,
        "item_id_priority": null,
        "id_group": null,
        "id_group_1": null,
        "id_group_2": null,
        "id_work_order_task": null,
        "id_group_task": null,
        "id_task_type_main": 10318,
        "id_task_type": 13293,
        "id_task_type_2": 13584,
        "group_task_description": null,
        "date_maintenance": "2022-09-27T18:30:29+00:00",
        "trigger_description": "NO_SCHEDULE_TASK",
        "delay": 0,
        "description": "EJEMPLO VERIFICACIÓN DE SOLICITUD 379 A TAREAS PENDIENTES DESDE API",
        "duration": 1500,
        "is_active": true,
        "stop_assets": false,
        "stop_assets_sec": null,
        "tasks_types_main_description": "CORRECTIVA MRX SQA",
        "priorities_description": "HIGH",
        "tasks_types_description": "MECÁNICA MRX",
        "tasks_types_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
        "id_priorities": 2,
        "num_resources": 0,
        "notes": null,
        "parent_description": "// EMPRESA SECTOR MANUFACTURA/ PLANTA 1 - PRODUCCIÓN ALIMENTOS/ ÁREA PRODUCCIÓN FRUTAS/ LINEA FRUTAS ROJAS/ ",
        "last_date_maintenance": "2022-09-27T18:55:29+00:00",
        "requested_by": "Prueba desde API MRX",
        "task_failure": null,
        "task_note": "VERIFICACIÓN DE MRX",
        "id_task_trigger": null,
        "show_todo": true,
        "replay_counter": 0,
        "wo_folio": null,
        "id_request": 377,
        "event_date": "2022-09-14T11:15:29+00:00",
        "cal_date_maintenance": "2022-09-27T18:30:29+00:00",
        "triggers": {},
        "items_log_description": "ENVASADO      { ENVASADO }",
        "replay_counter_cycles": null,
        "num_iterations": null,
        "is_cyclical": null,
        "visible_to_all": false,
        "id_items_availability": null,
        "groups_description": null,
        "groups_1_description": null,
        "groups_2_description": null,
        "items_log_id_priority": 2,
        "tasks_log_task_type_main": "CORRECTIVA MRX SQA",
        "tasks_log_types_description": "MECÁNICA MRX",
        "tasks_log_types_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
        "id_status_work_order": 5,
        "id_type": 69,
        "id_event": 33
    },
    "total": 0
}

Test It

Language