OS1 Services
Orchestrator Service

Work Order Manager Plugin

8min

This plugin will interpret the current event and, if required, it will update an existing WorkOrder.

Use case

Single leg - Update the work order status based on job updates.

Input

  1. tenantId
  2. orderId
  3. workOrderId
  4. workOrderPickupLocation
  5. workOrderDeliveryLocation
  6. jobStatus
  7. eventCode
  8. reasonCode
  9. location
  10. callback

Output

  1. UpdateWorkOrderStateEvent (status = IN_PROGRESS)
  2. UpdateWorkOrderStateEvent (status = COMPLETED)

Logic

  1. jobStatus == IN_PROGRESS && location == workOrderPickupLocation → UpdateWorkOrderStateEvent (status = IN_PROGRESS)
  2. jobStatus == COMPLETED && location == workOrderDeliveryLocation && reasonCode == “R-0065” → UpdateWorkOrderStateEvent (status = COMPLETED)

Current Configuration

Rules

Job Complete Success Rule

Job Complete Success Rule


Job Complete Failure Rule

Job Complete Failure Rule


Plugin Workflow

JSON


Plugin

JSON