HomeRecipesAPI ReferenceChangelogDiscussions
Log In
Discussions

Discussions

Ask a Question
Back to All

Can PM Contidional Steps be created with the API

Hi,

Trying to setup PMRM's with Procedure Steps that are conditional. I can create the work order but the steps all show as regular and do not fall under conditional as we would like.

Using the following

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

Json:

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

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

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

{"ProcedureTemplateStep": {"Id": 38492},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"1","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38493},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"2","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38494},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"False","ConditionType":"Conditional","YIdx":"1","ZIdx":"3","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38495},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"4","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38496},"TypeId":"Field","FieldDescriptor":{"Id":97},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"5","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38497},"TypeId":"Field","FieldDescriptor":{"Id":139},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"6","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38498},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"False","ConditionType":"Conditional","YIdx":"1","ZIdx":"7","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38499},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"8","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38500},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"9","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38501},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"10","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38502},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"11","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38503},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"12","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38504},"TypeId":"Field","FieldDescriptor":{"Id":97},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"13","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38505},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"14","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38506},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"15","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38507},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"16","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38508},"TypeId":"Text","FieldDescriptor":,"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"17","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38509},"TypeId":"Text","FieldDescriptor":,"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"1","ZIdx":"18","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38510},"TypeId":"Text","FieldDescriptor":,"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"1","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38511},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"2","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38512},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"3","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38513},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"4","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38514},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"5","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38515},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"6","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38516},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"7","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38517},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"8","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38518},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"9","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38519},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"10","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38520},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"False","ConditionType":"Conditional","YIdx":"2","ZIdx":"11","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38521},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"12","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38522},"TypeId":"Field","FieldDescriptor":{"Id":97},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"13","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38523},"TypeId":"Field","FieldDescriptor":{"Id":139},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"14","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38524},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"15","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38525},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"16","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38526},"TypeId":"Field","FieldDescriptor":{"Id":197},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"17","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38527},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"18","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38528},"TypeId":"Field","FieldDescriptor":{"Id":101},"DataTypeId":"10","Index":"3", "IsRequired":"False","ConditionType":"Conditional","YIdx":"2","ZIdx":"19","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38529},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"20","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38530},"TypeId":"Text","FieldDescriptor":,"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"21","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38531},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"False","ConditionType":"Conditional","YIdx":"2","ZIdx":"22","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38532},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"23","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38533},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"24","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38534},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"25","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38535},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"26","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38536},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"27","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38537},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"28","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38538},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"29","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38539},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"30","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38540},"TypeId":"Field","FieldDescriptor":{"Id":97},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"31","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38541},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"32","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38542},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"33","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38543},"TypeId":"Field","FieldDescriptor":{"Id":116},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"34","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38544},"TypeId":"Field","FieldDescriptor":{"Id":103},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"35","ConcurrencyId":"1"},

{"ProcedureTemplateStep": {"Id": 38545},"TypeId":"Field","FieldDescriptor":{"Id":103},"DataTypeId":"10","Index":"3", "IsRequired":"True","ConditionType":"Conditional","YIdx":"2","ZIdx":"36","ConcurrencyId":"1"},

] }],"Specialty": {
"DisplayAs": "Refrigeration - PMs"
},
"Priority": {
"DisplayAs": "Scheduled - 30 Day Completion "
},
"ContactName": " ",
"ContactAddress": {
"AddrTypeId": "Contact",
"Address": " "
},
"TypeCategory": 2,
"RequestorContact": {
"Id": 3
},
"WorkZone": {
"Number": "0056A"
},
"SubType": {
"Id": 257
},
"Customer": {
"Id": "21621"
}
},
"ComputeAssignment": true,
"ComputeSchedule": true
}
}

Here's one of the steps created that should have been conditional:

{"Data": {
"WorkOrderId": 1538122,
"Index": 4,
"Comment": "",
"Description": "",
"StatusId": "Open",
"WoProcedureId": 611642,
"ProcedureTemplateStep": {"Id": 38492},
"TypeId": "Field",
"IsWon": false,
"IsRequired": true,
"FieldDescriptor": {"Id": 101},
"DataTypeId": "Text",
"IsNotApplicable": false,
"MoneyId": "Unknown",
"ActionsRequired": 0,
"ActionsTaken": 0,
"IsVisible": true,
"ConditionType": "Regular",
"ParentStepId": 0,
"StepNumber": "3.1.1",
"IsRemoved": false,
"ConcurrencyId": 1,
"Id": 9481120
}},

I can't get the parent step to say Parent either