HomeRecipesAPI ReferenceChangelogDiscussions
Log In
Discussions

Discussions

Ask a Question
Back to All

How to Create a work order with Conditional PM Procedure steps

Hi I'm trying to create a PM work order and use conditional Procedure steps. I can create it and none of the steps are conditional. I have tried to update the procedure steps as well and I am not able to update any of the step info.

Here's my Creation

POST : https://az-am-ent-f7.corrigo.com/api/v1/cmd/Workorder/Create

{
"Command": {
"WorkOrder": {
"TimeZone": 35,
"Items": [
{
"Asset": {
"Id": "4436393"
},
"Task": {
"Id": "29401"
},
"Comment": "Complete Refrigeration Rack 1 PM"
}
],
"Procedures": [
{
"ProcedureTemplate": {
"Id":"4044"
},
"Asset": {"Id": 4436393},
"Steps": [ {"ProcedureTemplateStep": {"Id": 36997},"TypeId":"Text","FieldDescriptor":{"Id":""},"DataTypeId":"10","Index":"1", "IsRequired":"True","ConditionType":"Regular","YIdx":"0","ZIdx":"0","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 36998},"TypeId":"Text","FieldDescriptor":{"Id":""},"DataTypeId":"10","Index":"2", "IsRequired":"True","ConditionType":"Regular","YIdx":"0","ZIdx":"0","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38491},"TypeId":"Field","FieldDescriptor":{"Id":"205"},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Parent","YIdx":"0","ZIdx":"0","ConcurrencyId":"1"},{"ProcedureTemplateStep": {"Id": 38491},"TypeId":"Field","FieldDescriptor":{"Id":"205"},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Parent","YIdx":"0","ZIdx":"0","ConcurrencyId":"1"},

] }],"Specialty": {
"Id": "10186"
},
"Priority": {
"Id": "8"
},
"EquipmentWorkedOn": {"Id": 4436393 },
"ContactName": " ",
"ContactAddress": {
"AddrTypeId": "Contact",
"Address": " "
},
"TypeCategory": 2,
"RequestorContact": {
"Id": 3
},
"WorkZone": {
"Id": "460"
},
"PM/RM Schedule": {
"Id":4143
},
"SubType": {
"Id": 257
},
"Customer": {
"Id": "20895"
}
},
"ComputeAssignment": true,
"ComputeSchedule": true
}
}


Here's my Update:

POST https://am-ce917.corrigo.com/api/v1/cmd/WoProcedureStep/Update

{"Command":{
"ProcedureStepId":9941634,
"Comment": "Test 2",
"Properties": [
"Comment,ConditionType"
],
"Entity": {
"Id": 9941634,
"Comment": "Test 2",

}

}}

No matter what field I try to update I cannot change anything on the PM Steps