What are the automation or scripting options available in Smart Assessment Engine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Automations in Smart Assessment Engine
ServiceNow has provided multiple automation features out of the box with which we can perform complex operations. Below are the key automation options
- Automate Response
- Conditional Visibility and Required configuration
- Scoring
- Sub Flow Trigger
1. Automate Response
1.1 No Code: Condition builder is provided to filter the condition of previous question selection to set the current question answer automatically.
No code by default works only on the first load of the page, does not work onChange of the selection.
1.2 onChange Configuration of Automation Response
Under Additional options, select the Set response as editable option. This will make the Automate response to validate the changes made in the question which are set in the conditional builder and set the answer to the current question. This is a game-changer, this is so powerful when you combine scripting with this.
3. Scripting: We are also provided with scripting option in the Automate Response.
There are only two key parameter here
1. questionInstanceId : Sys Id of question instance
2. result.value : to set output in the 'value' key of the 'result' object
Note: Trust me, we can do wonders with these two alone.
Below is an example of how we can use the questionInstanceId and dot walk to get key information about the current assessment instance
var tab = new GlideRecord("sn_smart_asmt_question_instance");
tab.get(questionInstanceId);// gives the question instance object
//tab.assessment_instance gives the object of the assessment instance
var responseOptInst = new GlideRecord("sn_smart_asmt_response_option_instance");
responseOptInst.addQuery("assessment_instance", tab.assessment_instance);//
responseOptInst.query();//gives the object of Response Option Instance of the current assessment
Script section can handle any server scripting, this opens up lot of automation options
- Perform real-time calculation to the current assessment
- Create issue or remediation task
- Clear values to the current assessment
- Trigger a business rule
- Generate an event to trigger notification
- Start a flow or sub flow
- Make integration request and many more...
4. onChange Scripting of Automate Response
Previously I have mentioned the scripting option provided in the editor to run any server side scripting and along with this if you select the "Set response as editable option to false" (by default its true). You can trigger multiple server side script based on the condition you provide.
Based on each condition, you can perform different server side actions.
2. Conditional Visibility, Required and other client configurations
Within the assessment in each question there are lot of No code configuration provided to perform client side automation
- When Required is set to true, question becomes mandatory
- Make Conditional visibility is used to show or hide the question based on previous answer. Here you only have configuration, no scripting is provided
- Ask for justification: Will show an additional comment box below when the condition is met
3. Scoring:
You can add scores to the question, sub section, section and the entire assessment using the Scoring feature provided in the Smart Assessment
Scoring should be enabled in the Scoring section and also to the questions individually.
Note: Scoring will be calculated post the submission of the assessment not before.
4. Sub Flow
Sub Flow can be trigger after the submission of the assessment. There are multiple not so clearly documented pre-requisite to enable this. Listing out whatever I found
- You can only do this when the assessment template is published.
- There is a purpose for a smart assessment template, under that there would be Action Category related list
- We need to set the Action Categories which are nothing but Category in the Sub flow action
- Only those sub-flows will be available to select.
- We can give the response received from the assessment, assessment related records as input to the sub flow.
- This certainly helps create an issue, remediation task, approval and whatever post submission activities required.
Epilogue: This is a sincere attempt to document implementation essentials for Smart Assessment engine.
Any day ServiceNow documentation is always preferred but for classification and categorization they have a limitation to put all relevant details in one place. Please always trial any new feature in PDI instance before trying in your DEV instance. I have implemented all the above mentioned features, please feel free to reach me for any support. If you like the article please select helpful.
Previous Articles:
What is Smart Assessment Engine, how it is different from Classic Assessment ?
What is Smart Assessment Collaboration feature in the Smart Assessment Engine and how to implement?
#tprm #grc #smartassessmentengine
Reach me at LinkedIn.
Thanks,
Vinod Kumar M
TPRM Implementer
