Triggering Smart Assessment from Flow without using code snippet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2025 08:47 PM - edited ‎08-21-2025 03:46 AM
Dear All, Docs doesn't elaborate much on how to use code snippet for Smart Assessment and at times customers find it confusing. For one of my customer, we explored using Events and using Flows to trigger Smart Assessment based on the Events. Scenario was to allow users to request Smart Assessments in Audit Application using UI Action.
For background on how to use events for Flows, refer to following articles first:
- https://www.servicenow.com/community/developer-forum/not-able-to-find-table-in-flow-designer/m-p/139... to use glide.ui.permitted_tables and adding sysevent
- https://www.servicenow.com/community/workflow-automation-articles/trigger-a-flow-based-on-an-event-e... by @Uncle Rob
Approach taken:
a. Setup an event in the registry. In this case, it was sn_audit_advanced.
b. Fire the event from the UI Action (with parm1 and parm2 as current.sys_id and current User)
gs.eventQueue('sn_audit_advanced.trigger_assessment.flo', current,current.sys_id, gs.getUserName());
c. Last step was where above listed articles/posts helped. Step the flow with trigger as Created on table sysevent with name as "sn_audit_advanced.trigger_assessment.flo". In the flow post the trigger step, use Look up record actions to first look up the current record and the user. Then use the Trigger Smart Assessment OOTB action and pass the values from Data Pill at the right places in the action.
Sample flow image. I did not added checks to see if the records exist post look up records, even though it is good practice (because it is assumption that those exist because the values are passed through UI Action with current contexts and in my case it is just a mock up). But I do advise to do these checks.
Hope this is helpful.
By mistake this was setup as a question. This is not a question. New article with the same content is now available at https://www.servicenow.com/community/grc-articles/triggering-smart-assessment-from-flow-without-usin...
- 820 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2025 03:45 AM
Thanks @Rafael Cardoso for your suggestion. Posted the article at https://www.servicenow.com/community/grc-articles/triggering-smart-assessment-from-flow-without-usin...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2025 04:32 AM
I appreciate the shout out on my content.