Incidents created from Slack

Susan Sellmeye1
Tera Expert

How can I identify Incidents that are created from the Slack integration 'ServiceNow for Slack'?

I have a need to flag and modify these Incidents

Thank you

8 REPLIES 8

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Susan Sellmeye1 ,

Hope you are doing great.
Identifying Incidents that are created from the Slack integration 'ServiceNow for Slack' is a straightforward process. First, you need to access your ServiceNow instance and navigate to the 'Incidents' tab. From there, you can filter the list of Incidents by the 'Source' field. This field will indicate whether the Incident was created from the Slack integration or not. Once you have identified the Incidents that were created from Slack, you can then flag them and modify them as needed.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hi @Amit Gujarathi 

I've tried filtering by Source and it is not available to filter by. How would I add it?

Thank you

Basheer
Mega Sage

Hi @Susan Sellmeye1 ,

Based on Source field or Created By (If you've specified any user during integration) you can identify the incidents that are created from Slack Integration.

 

If you want it through code, then below is your code 

var inc = new GlideRecord("incident");
inc.addQuery("source","slack")//Instead of slack give the proper name, if you wish to go be created By then it would be something like "sys_created_by","Sl123". Replace Sl123 with the proper username.
inc.query();
while(inc.next()){
gs.log(inc.number);
}

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Hi @Basheer,

The Source field is not available to filter by- any ideas on how to get it?

The 'Created by' is listed as the user that created the Incident from Slack.

In your code: what would the "slack" value be?

 

I appreciate your help!

Thank you

Susan