Post Incident Report

Hafila Hatta
Tera Guru

hi. i have a requirement to digitalize a Post Incident Report in SN platform. current process is fulfillers will need to manually fill up a pdf form template after resolving incident and get the report approved. 

 

any idea whats the best method to achieve this? there's an OOTB PIR in the platform but i have yet to explore. is there a functionality to add approval?

1 REPLY 1

MackI
Kilo Sage

hi @Hafila Hatta 

 

I hope you are well and good

 

Yes, absolutely! You can achieve a similar outcome without relying solely on the OOTB PIR declarative tools.– fully automating the Record Producer submission to eliminate manual intervention. Here's how you can achieve this using Flow Designer and some scripting:

1. Identify Data Mapping:

Incident Fields: Make a list of all the fields from the Incident record that you need to map to the Record Producer variables (and ultimately to your PIR record).
Examples might include:short_description
description
work_notes (resolution notes)
close_notes
cmdb_ci (Configuration Item)
assignment_group
assigned_to
opened_at
resolved_at
priority
severity
u_custom_fields (any custom fields relevant to the PIR)
 
2. Create a Record Producer in the Service Catalog that acts as your digital PIR form

Secondly , you need to create Record Producer Variables: Ensure you have corresponding variables in your Record Producer to receive this data. Use appropriate variable types.

2. Create a Flow Designer Flow:

Trigger: Set the Flow trigger to "Record" -> "Updated" and select the "Incident" table.
Condition: Add a condition to the trigger to only run the Flow when the Incident state changes to "Resolved" (or "Closed," depending on your workflow). You can add other conditions, such as only for specific incident priorities, categories, or assignment groups, if needed.

3. Add a "Script" Action (Data Preparation):

Name: Give the Script action a descriptive name, like "Prepare PIR Data."
Script: This is where you'll write a server-side script (JavaScript) to:Retrieve the Incident record using the current object (which automatically refers to the incident that triggered the Flow).
Format data as needed (e.g., concatenate work notes, format dates).
Store the data you need in a scratchpad variable, which is a way to pass data between actions in a Flow.
 
If you like my concept and idea then let's share your idea and project in details and Mark my solution approach as Accepted Solution. So I can support and work with you in this solution.
 
If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer(Accepted Solution) ‌🌠‌ OR  mark it  Helpful ‌‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community
 
MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia