Pooja Doshi
Kilo Explorer

One of the most talked about feature of ServiceNow is it’s no code/low code application development capability. Non-technical team members like business analyst can perform administration tasks within the tool without the need for scripting. Flow Designer is one of these applications within the tool that comes with no code/low code functionality. In this blog post, we will review how the flow designer could be used for creating a business rule (server side script) without coding.

Use case: Creation of a problem record when a priority 1 (P1) incident is resolved.

Steps:

1. Go to Flow Designer in navigation pane and click on “Designer”. This should open the flow designer in a new tab.

          find_real_file.png

2. Next click on New -> Flow.

          find_real_file.png

3. Fill in the form for new flow as shown below and click submit.

find_real_file.png

4. This will load the new flow screen like below,

find_real_file.png

5. A trigger is the condition that triggers the flow. For this use case, the trigger is a P1 incident state change to resolve.

6. Click the “+” under TRIGGER and select the second Record updated trigger.

find_real_file.png

7. Select Table as Incident and add filter for priority=1 and state changes to Resolved. Set Run Trigger as “For each unique change”. Click “Done” to save the trigger.

find_real_file.png

8. Next create an action that the flow needs to take when triggered. Click the “+” under actions -> Click on Action -> Under ServiceNow Core select “Create Record”

find_real_file.png

9. Select the Table Name as Problem. Next click “Add Field Value” and choose description from the list of fields available for a problem record. Click on Data Pill Picker and select Trigger – Record Updated -> Incident Record -> Description field as shown in the screenshot below. This is dot walking in ServiceNow.

find_real_file.png

10. Similarly Add fields Business Service and Configuration item and choose appropriate incident record field by dot walking from Data Pill Picker and click done. Your action should look like below,

find_real_file.png

11. Now Save the flow and click on Test.

find_real_file.png

12. Choose a P1 incident record to test the flow. Click “Run Test”.

find_real_file.png

13. Once the flow has been executed, select “Click here” and look at the execution record. If both trigger and action records show completed then your test was successful.

find_real_file.png

find_real_file.png

14. The execution detail shows information on incident updated trigger and create record action. Click the “Create Record” action and you can see the problem record number that was created by the flow.

find_real_file.png

15. Click open record to view the problem record. Go to Incident related list and notice that it’s empty.

find_real_file.png 

Question – Do you know why related list “Incidents” is empty?

Answer – Because we haven’t added an “update record” action on the incident table to link it to the problem record created by our first action.

16. So, let’s go back to our flow and add a second “Update record” action to link the incident and problem record.

17. Click “+” after create record action and select “Update record” action from ServiceNow Core actions.

find_real_file.png

18. Select the Incident record from Data Pill Picker. Table field is auto-updated.

19. Click “Add field” and Select field “Problem” from the list. Select the problem record created by “Create Record” action using the data pill picker. See screenshot below,

find_real_file.png

20. Save the workflow and test again with another P1 incident. The problem and incident records should be linked now.

 find_real_file.png

Lastly, activate the flow to publish the functionality in the instance.

Hope this helps! Feel free to reach out if you have any questions.

 

 

Version history
Last update:
‎11-14-2019 02:36 PM
Updated by: