Skip to main content
Solved

Automating Processes Based on Custom Field Changes in Assyst


Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • 2 replies

I would like to initiate a process based on changes to data in a custom field. Is this possible within IFS Assyst? Specifically, I need to automate the creation of an authorization task when a project's budget is exceeded. Any insights or guidance on how to achieve this would be greatly appreciated!

Best answer by KevinM

Yes, you can, but as the created authorisation task would not be included in the workflow (if one exists), but as an adhoc task. 

First (if not already present in your action processor rules) - you’ll need to add the following before the “set_of_rules”: 

strETM = [[PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ']] .. AXIOS_BASE .. [[\Software\ETMImportTool\importtool.ps1'"  -verbose -url ]] .. ETMUrl .. [[ -username ]] ..  ETMUser .. [[ -password ]] .. ETMPwd .. [[ -simpleResult true -channel ]]

and this within your additional variables

["AV_SERVREQ_SC"] = "event.serviceOffering.shortCode",

 

Then within your rule set you’ll need to create a rule similar to the below: 

        {
        [[ RULE TITLE ]],
        [[ (ACT_TYPE_SC == "CHGFIELDS"
            or ACT_TYPE_SC == "CHGWEBPROPERTY")
            AV_SERVREQ_SC == "ServiceOfferingShortcode" ]],
            strETM .. "'ETMChannelName' $EVENT_ID",    
        "continue"
    },

This should then kick off an ETM channel which you’ll need to create

On your channel you’ll essentially want 2 datamappers - An initialisation and then a task one. 

On your initialisation file you’ll need to create a “Variable assyst search” for the resource of event, name it _event and enter the following as the search criterion for the ID: 

parseInt(inbound.split(',')[1]);

Use this as the text in the “Fields” section above assyst Resource: 

affectedUser, itemA, itemB, category, technicalUser, responsibleUser[name], technicalServDept, responsibleServDept, currentStage[name], customFields

 

Next created a variable called configObject and paste the following 

var searchResult = variables._event[0];
var desc = "<<Provide task description here>>";


var outObj = {
    "debug": {
        "debug1": searchResult.eventCost,
        "debug2": searchResult.eventTotalCost
    },
    "processingRequired": false,
    "seedEvent":{
        "id": searchResult.id
    },
    "linkReason":{
        "id": <<PROVIDE LINK ID>>
    },
    "event": {
        "userMapping": null,
        "acknowledgementRequired": false,
        "additionalRequirements": [],
        "callbackRequired": true, // Hardcoded to require RespondBy SLA
        "category": {
            "id": <<PROVIDE ID>>, // Leave blank - Set by eventType below
            "sc": "<<PROVIDE ShortCode>>"
        },
        "chargeCode": {
            "id": null,
            "sc": null
        },
        "copyFrom.id": null,
        "costCentre":{
            "id": null,
            "sc": null
        },
        "csg":{
            "id": null, // Set by itemA
            "sc": null
        },
        "dateTime":{
            "requiredBy":  null,
            "scheduledEnd": null,
            "scheduledStart": null,
            "logged": null
        },
        "department": {
            "id": null,
            "sc": null
        },
        "downFlag": null,
        "eventCost": null,
        "formattedReference": null,
        "customForm": { 
            "sc": null// Set by the service offering
        },  
        "importProfile": {
            "id": null,
            "sc": null
        },
        "itemA": {
            "id": <<PROVIDE ID>>, 
            "sc": "<<PROVIDE ShortCode>>",
            "name": null,
            "serialNumber": null
        },
        "itemB": {
            "id": null,
            "sc": null,
            "name": null,
            "serialNumber": null
        },
        "justification":  null,
        "knowledgeProcedure": {
            "id": null,
            "sc": null
        },
        "majorIncident": null,
        "process": {
            "id": null, // Set by import profile
            "bool": null,
            "templateProcess": {
                "id": null,
                "sc":  null
            }
        },
        "project": {
            "id": null,
            "sc": null
        },
        "purchaseOrder": {
            "id": null,
            "sc": null
        },
        "quantity":  1,
        "remarks":  desc, // Summary
        "richRemarks": null, // Description
        "room": {
            "id": null, // Set by import profile
            "sc": null
        },
        "serviceOffering": {
            "id": null,
            "sc": "null"
        },
        "siteVisitRequired": null, // Set by import profile
        "sla": {
            "id": null, // Set by import profile or service offering
            "sc": "<<PROVIDE ShortCode>>",
            "derivedPriority": {
                "id": null,
                "sc": null
            },
            "urgency": {
                "id": null, // Set by import profile or service offering
                "sc": "<<PROVIDE ShortCode>>"
            },
            "impact": {
                "id": null, // Set by import profile or service offering
                "sc": "<<PROVIDE ShortCode>>"
            }
        },
        "source":  1,
        "sourceEnum":  null,
        "state":  null,
        "stateEnum": null,
        "svd": {
            "assignedSvd": {
                "id": <<PROVIDE ID>>, // Set by import profile
                "sc": "<<PROVIDE ShortCode>>"
            },
            "responsibleSvd": {
                "id": null,
                "sc": null
            },
            "technicalSvd": {
                "id": null,
                "sc": null
            }
        },
        "eventType": 32, // I Believe this is the event type ID for an Authorisation task
        "eventTypeEnum": null,
        "unitCost": null,
        "unitPrice": null,
        "usr": {
            "affectedUsr": {
                "id": searchResult.affectedUserId,
                "sc": (searchResult.affectedUser.shortCode).toUpperCase(),
                "name": null,
                "staffNumber": null,
                "emailAddress": null,
                "telephoneNumber": null,
                "telephoneExt": null
            }, 
            "reportingUsr": {
                "id": null,
                "sc": null,
                "name": null,
                "staffNumber": null,
                "telephoneNumber": null,
                "telephoneExt": null
            },
            "assignedUsr": {
                "id": null,
                "sc": null
            },
            "authorisingUsr": {
                "id": null,
                "sc": null
            },
            "delegatedUsr": {
                "id": null,
                "sc": null
            },
            "responsibleUsr": {
                "id": null,
                "sc": null
            },
            "reviewingUsr": {
                "id": null,
                "sc": null
            },
            "technicalUsr": {
                "id": null,
                "sc": null
            },
            "loggingUsr": {
                "id": null,
                "sc": null
            }
        },
        "usrField1": {
            "flag1": null,
            "flag2": null,
            "flag3": null,
            "flag4": null,
            "flag5": null, // Does not exist - Do not use
            "flag6": null,
            "flag7": null,
            "flag8": null,
            "char1": null,
            "char2": null,
            "char3": null,
            "date1": null,
            "date2": null,
            "date3": null,
            "dec1": null,
            "dec2": null,
            "dec3": null,
        },
        "usrField2": {
            "char1": null,
            "char2": null,
            "char3": null,
            "date1": null,
            "date2": null,
            "date3": null,
            "dec1": null,
            "dec2": null,
            "dec3": null,
        },
        "usrReference":  null,
        "usrStatus": null
//        "importProfileDebug": importProfile
    }
};

*/
// You will need to verify this is correct
if (searchResult.eventCost > 1500 ){
    var process = true;
}*/


outObj;

 

Then you can create a second datamapper which is looking at event, ensuring that you provide the Task Seed ID (as the ID of your event from datamapper  1) and Task Link ID as a valid Link Reason ID from your database. 

 

If you use the above config object, you should be able to use something similar to the below for each of the variables 

mapped[0].variables.configObject.seedEvent.id;

mapped[0].variables.configObject.event.chargeCode.id;

In some cases you may which to include a skip search when, so you would need to fill that out with something similar to the below: 

!mapped[0].variables.configObject.event.chargeCode || mapped[0].variables.configObject.event.chargeCode.sc === null;

 

Unfortunately I’ve not triggered an adhoc task using the above method so I haven’t got anything I can directly share, but the above is based upon something similar I have been working on to create an adhoc task. 

I hope this is of some help, if you find yourself stuck, feel free to reach out!  

Kevin

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+8
  • Hero (Customer)
  • 44 replies
  • Answer
  • April 22, 2025

Yes, you can, but as the created authorisation task would not be included in the workflow (if one exists), but as an adhoc task. 

First (if not already present in your action processor rules) - you’ll need to add the following before the “set_of_rules”: 

strETM = [[PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ']] .. AXIOS_BASE .. [[\Software\ETMImportTool\importtool.ps1'"  -verbose -url ]] .. ETMUrl .. [[ -username ]] ..  ETMUser .. [[ -password ]] .. ETMPwd .. [[ -simpleResult true -channel ]]

and this within your additional variables

["AV_SERVREQ_SC"] = "event.serviceOffering.shortCode",

 

Then within your rule set you’ll need to create a rule similar to the below: 

        {
        [[ RULE TITLE ]],
        [[ (ACT_TYPE_SC == "CHGFIELDS"
            or ACT_TYPE_SC == "CHGWEBPROPERTY")
            AV_SERVREQ_SC == "ServiceOfferingShortcode" ]],
            strETM .. "'ETMChannelName' $EVENT_ID",    
        "continue"
    },

This should then kick off an ETM channel which you’ll need to create

On your channel you’ll essentially want 2 datamappers - An initialisation and then a task one. 

On your initialisation file you’ll need to create a “Variable assyst search” for the resource of event, name it _event and enter the following as the search criterion for the ID: 

parseInt(inbound.split(',')[1]);

Use this as the text in the “Fields” section above assyst Resource: 

affectedUser, itemA, itemB, category, technicalUser, responsibleUser[name], technicalServDept, responsibleServDept, currentStage[name], customFields

 

Next created a variable called configObject and paste the following 

var searchResult = variables._event[0];
var desc = "<<Provide task description here>>";


var outObj = {
    "debug": {
        "debug1": searchResult.eventCost,
        "debug2": searchResult.eventTotalCost
    },
    "processingRequired": false,
    "seedEvent":{
        "id": searchResult.id
    },
    "linkReason":{
        "id": <<PROVIDE LINK ID>>
    },
    "event": {
        "userMapping": null,
        "acknowledgementRequired": false,
        "additionalRequirements": [],
        "callbackRequired": true, // Hardcoded to require RespondBy SLA
        "category": {
            "id": <<PROVIDE ID>>, // Leave blank - Set by eventType below
            "sc": "<<PROVIDE ShortCode>>"
        },
        "chargeCode": {
            "id": null,
            "sc": null
        },
        "copyFrom.id": null,
        "costCentre":{
            "id": null,
            "sc": null
        },
        "csg":{
            "id": null, // Set by itemA
            "sc": null
        },
        "dateTime":{
            "requiredBy":  null,
            "scheduledEnd": null,
            "scheduledStart": null,
            "logged": null
        },
        "department": {
            "id": null,
            "sc": null
        },
        "downFlag": null,
        "eventCost": null,
        "formattedReference": null,
        "customForm": { 
            "sc": null// Set by the service offering
        },  
        "importProfile": {
            "id": null,
            "sc": null
        },
        "itemA": {
            "id": <<PROVIDE ID>>, 
            "sc": "<<PROVIDE ShortCode>>",
            "name": null,
            "serialNumber": null
        },
        "itemB": {
            "id": null,
            "sc": null,
            "name": null,
            "serialNumber": null
        },
        "justification":  null,
        "knowledgeProcedure": {
            "id": null,
            "sc": null
        },
        "majorIncident": null,
        "process": {
            "id": null, // Set by import profile
            "bool": null,
            "templateProcess": {
                "id": null,
                "sc":  null
            }
        },
        "project": {
            "id": null,
            "sc": null
        },
        "purchaseOrder": {
            "id": null,
            "sc": null
        },
        "quantity":  1,
        "remarks":  desc, // Summary
        "richRemarks": null, // Description
        "room": {
            "id": null, // Set by import profile
            "sc": null
        },
        "serviceOffering": {
            "id": null,
            "sc": "null"
        },
        "siteVisitRequired": null, // Set by import profile
        "sla": {
            "id": null, // Set by import profile or service offering
            "sc": "<<PROVIDE ShortCode>>",
            "derivedPriority": {
                "id": null,
                "sc": null
            },
            "urgency": {
                "id": null, // Set by import profile or service offering
                "sc": "<<PROVIDE ShortCode>>"
            },
            "impact": {
                "id": null, // Set by import profile or service offering
                "sc": "<<PROVIDE ShortCode>>"
            }
        },
        "source":  1,
        "sourceEnum":  null,
        "state":  null,
        "stateEnum": null,
        "svd": {
            "assignedSvd": {
                "id": <<PROVIDE ID>>, // Set by import profile
                "sc": "<<PROVIDE ShortCode>>"
            },
            "responsibleSvd": {
                "id": null,
                "sc": null
            },
            "technicalSvd": {
                "id": null,
                "sc": null
            }
        },
        "eventType": 32, // I Believe this is the event type ID for an Authorisation task
        "eventTypeEnum": null,
        "unitCost": null,
        "unitPrice": null,
        "usr": {
            "affectedUsr": {
                "id": searchResult.affectedUserId,
                "sc": (searchResult.affectedUser.shortCode).toUpperCase(),
                "name": null,
                "staffNumber": null,
                "emailAddress": null,
                "telephoneNumber": null,
                "telephoneExt": null
            }, 
            "reportingUsr": {
                "id": null,
                "sc": null,
                "name": null,
                "staffNumber": null,
                "telephoneNumber": null,
                "telephoneExt": null
            },
            "assignedUsr": {
                "id": null,
                "sc": null
            },
            "authorisingUsr": {
                "id": null,
                "sc": null
            },
            "delegatedUsr": {
                "id": null,
                "sc": null
            },
            "responsibleUsr": {
                "id": null,
                "sc": null
            },
            "reviewingUsr": {
                "id": null,
                "sc": null
            },
            "technicalUsr": {
                "id": null,
                "sc": null
            },
            "loggingUsr": {
                "id": null,
                "sc": null
            }
        },
        "usrField1": {
            "flag1": null,
            "flag2": null,
            "flag3": null,
            "flag4": null,
            "flag5": null, // Does not exist - Do not use
            "flag6": null,
            "flag7": null,
            "flag8": null,
            "char1": null,
            "char2": null,
            "char3": null,
            "date1": null,
            "date2": null,
            "date3": null,
            "dec1": null,
            "dec2": null,
            "dec3": null,
        },
        "usrField2": {
            "char1": null,
            "char2": null,
            "char3": null,
            "date1": null,
            "date2": null,
            "date3": null,
            "dec1": null,
            "dec2": null,
            "dec3": null,
        },
        "usrReference":  null,
        "usrStatus": null
//        "importProfileDebug": importProfile
    }
};

*/
// You will need to verify this is correct
if (searchResult.eventCost > 1500 ){
    var process = true;
}*/


outObj;

 

Then you can create a second datamapper which is looking at event, ensuring that you provide the Task Seed ID (as the ID of your event from datamapper  1) and Task Link ID as a valid Link Reason ID from your database. 

 

If you use the above config object, you should be able to use something similar to the below for each of the variables 

mapped[0].variables.configObject.seedEvent.id;

mapped[0].variables.configObject.event.chargeCode.id;

In some cases you may which to include a skip search when, so you would need to fill that out with something similar to the below: 

!mapped[0].variables.configObject.event.chargeCode || mapped[0].variables.configObject.event.chargeCode.sc === null;

 

Unfortunately I’ve not triggered an adhoc task using the above method so I haven’t got anything I can directly share, but the above is based upon something similar I have been working on to create an adhoc task. 

I hope this is of some help, if you find yourself stuck, feel free to reach out!  

Kevin


Forum|alt.badge.img+1
  • Author
  • Do Gooder (Customer)
  • 2 replies
  • April 24, 2025

Hi ​@KevinM , Thank you very much for the detailed answer. Really appreciate it.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings