Perform a Work Order Transition

Purpose

To perform a transition on a work order. The transitions that are supported for a work order are:

Complete, Cancel, Terminate

Request URL

https://fsm.zoho.com/fsm/v1/Work_Orders/<record_id>/actions/blueprint

record_id - The unique ID of the record.

Request Method

PUT

Scope

scope=ZohoFSM.modules.WorkOrders.UPDATE

Input JSON Keys

NameDescriptionTypeMandatory
transition_idThe ID of the transition you want to perform on the work order. It can be obtained from the record using the List Work Order Transitions API.StringYes
data

Use this to add notes while canceling or terminating a work order.

N.B. Error will be thrown if the user does not have the Notes -> Create permission.

MapMandatory when canceling or terminating a work order.

Optional Parameters

NameDescriptionType
$force_completeComplete partially completed line items (if any) and complete the work order. If $force_complete is set to false and there are any partially completed line items in the work order, an error will be thrown.Boolean

Sample Request

Copiedcurl --request PUT 'https://fsm.zoho.com/fsm/v1/Work_Orders/4776000000265036/actions/blueprint' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "{"field1":"value1","field2":"value2"}"

Sample Input

Copied{
    "blueprint": [
        {
            "transition_id": "4776000000169090",
            "data": {
                "Notes": "Customer has cancelled the request"
            }
        }
    ]
}

Sample Input (with Optional Data)

Copied{
 "blueprint": [
   {
     "transition_id": "1003000000240084",
     "data": {
    "$force_complete": true
    }
   }
 ]
}

Sample Response

Copied{
    "code": "SUCCESS",
    "details": {},
    "message": "Action executed successfully",
    "actions": {
        "before": {},
        "after": {}
    },
    "status": "success"
}

Sample Error Response

Copied{
    "code": "INVALID_DATA",
    "details": {},
    "message": "Complete all associated Line Items to complete work order",
    "status": "error"
}