Alert Management Rules and Sub Flows

ayush_saxena
Tera Expert

Hi,

Is it possible to map JSON Parameter values on Alert's Additional Info to Incident Drop Down field. We have a requirement, environment of the server impacted comes as part of event's additional information, we want to map it to Incident's Environment (Custom) field using Subflow if possible. 

 

Any Ideas/Suggestions ?

 

Regards,

Ayush Saxena

1 ACCEPTED SOLUTION

So the best way that I have done this is to create a custom alert action and reverence that action from within a subflow to provide that data. I had to do this for a few things (in fact if you look there is an out of the box one for getting alert details in the out of the box create incident subflow which you could clone and add it to that as it just returns multiple variables that can be referenced). 

In order to do this though you have to be using the new subflow for incident creation and not referencing the script include way of doing it. I would just add code to an action or that out of the box one (after cloning it) to run regex on the additional_info (or you could get do the JSON.parse() and then access the data that way). Hope this helps.

View solution in original post

9 REPLIES 9

christianmalone
ServiceNow Employee
ServiceNow Employee
This is precisely how the event mappings work. They allow you to map additional info key name:value pairs into fields as needed. Using an alert action flow you can then map alert field/value to incident field value. In older versions you might use the CustomIncidentPopulatorScript to handle that. https://docs.servicenow.com/bundle/madrid-it-operations-management/page/product/event-management/concept/populate-custom-alert-fields.html

Hello Christian,

 

I understand we can map an Alert Field to Incident filed but the problem statement is "how to map content in Additional info to an incident field ? " 

I tried creating a new field on alert form and map it using subflows, it worked but I am not able to find reference to JSON Parameter or Value in Subflow inputs.

 

Can you provide more details on this?If you are recommending use of Event Field Mappings, that won't work for us until we create a custom field.

 

  

Sure. Check the link provided again. It outlines how the additional information field is json key value pairs and can be used to automatically or through event rules populate alert data. I used to create alert fields and then pass additional information key name as the same so I did not even need an event rule to map/transform but that’s the most common technique. Once you have that you say you know how to get from alert field to incident field. Here another that includes a video on accessing event fields: https://docs.servicenow.com/bundle/madrid-it-operations-management/page/product/event-management/concept/create-event-rules.html#create-event-rules

ayush_saxena
Tera Expert

My Bad, I should have mentioned that I am not willing to create new fields. In Alert Action Rules, we were able to map additional_info JSON values to Task fields using $ . I am hoping to have something similar.