NextGen APIs

POST /scheduling/manual/r1/scheduling/activities-removals

Http Verb

POST

Url

/scheduling/manual/r1/scheduling/activities-removals

Permissions required


Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1 - 2024 W3 (FSM 18.0)

Released since

2024 W3 (FSM 18.0)

Deprecated since


Removed since


Tech Tags


Business Logic

This API is designed for remove the schedulings of a single work order operation, either that operation is assigned to a single scheduling resource, a team or a crew shell. This new removal process is a simplified version respect to the removal process of the daily plan.

Key Differences from the Daily Plan Functionality

  • Linked activity and work order by order are not supported.

  • Real-time management is not supported.

  • Timesheet, Multistage, Bundler, DCS, and other FSM modules are not managed.

  • Multi-day operations cannot be managed.

  • Only the real plan is considered.

Following the limitations reported above, to remove a scheduling of a work order operation is sufficient to have the id of the operation, because with it we can determine uniquely the schedulings associated to it.


  1. Activity Check

    • Check if the workOrderOperation can be managed in this process:

      1. Verify if the work order operation is not a booking operation. If yes, return error MANUAL_SCHED_016.

      2. Verify if workOrderOperationId.workOrderId.operationsAssignment is DISTINCT. If not, return error MANUAL_SCHED_028.

      3. Verify that the work order operation was created in the project module. If yes, return error MANUAL_SCHED_019.

      4. Verify that the work order operation is linked with another operation with workOrderOperationId.. If yes, return error MANUAL_SCHED_036.

  2. Retrieve Intervention

    • Search the intervention not in status cancelled related.

    • Otherwise, create a new intervention.

  3. Load the team

    • Using the retrieved intervention, search the valid schedulings, and get the resources associated to them. With these resource build the team and load all the required data.

    • Crew shell activities will be treated as normal activities, so the process will remove the schedulings from the crew shell and from each of his related resource.

  4. Check Freezing Day

    • Check if the operation center from workOrderOperationId.workOrderId.operationCenterId has daily freezing active. If yes, the start date of the work shift cannot be earlier than yesterday, and will return the error MANUAL_SCHED_013. If not active, calculate the date beyond which pasting is not allowed. If the start date of the work shift is earlier than this freezing day, the paste is not possible, and will return the error MANUAL_SCHED_014.

  5. Remove Activity

    • For each resource of the loaded team

      1. set the status CANCELLED to the scheduling corresponding to the work order operation to remove

      2. if there is more than one scheduling in the work shift

        1. update the tour data

        2. update the schedulings order

        3. update the arrival dates of the first activity if needed

  6. Update Intervention, Work Order and Work Order Operation Status:

    • Calculate and update the intervention status

    • Calculate and update workOrderOperationId.stateId.

    • Calculate and update workOrderOperationId.workOrderId.stateId.

Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

workOrderOperationId


 

Response documentation

Response payload fields

Field

Note

schedulingId

 the list of removed schedulings

Response error codes

MANUAL_SCHED_013, MANUAL_SCHED_014, MANUAL_SCHED_016, MANUAL_SCHED_019, MANUAL_SCHED_028, MANUAL_SCHED_031, MANUAL_SCHED_032, MANUAL_SCHED_033, MANUAL_SCHED_034, MANUAL_SCHED_037