What table is incident Priority located to use for script in Flow Designer

Craig65
Giga Contributor

We are using Integration Hub and Flow Designer to integrate ServiceNow and Jira. In our Flow to create a new Jira issue, Priority is only a choice and cannot be dragged over from the Trigger ServiceNow incident. I would like to setup a script to gather the ServiceNow Incident Priority and correlate it to the Jira Issue Priority. We are not sure of the specific table and fields for this Priority info or how to setup the needed scripting. Thank you.

1 ACCEPTED SOLUTION

Craig65
Giga Contributor
Below is the script we ended up using
 
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var priority = fd_data.trigger.current.priority;
var jirap;
if (priority=='1'){
jirap = 'Highest';
} else if (priority=='2'){
jirap = 'High';
} else if (priority=='3'){
jirap = 'Medium';
} else if (priority=='4'){
jirap = 'Low';
} else if (priority=='5'){
jirap = 'Lowest';
} return jirap;

View solution in original post

9 REPLIES 9

Hi Craig, 

So you have a data picker that contains an incident and you want a script to extract its priority and store it inside a variable?

 

 

Hi,

can you refer yellow highlighted and using that you should define the script.

find_real_file.png

Regards,

Suresh.

Regards,
Suresh.

Craig65
Giga Contributor
Below is the script we ended up using
 
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var priority = fd_data.trigger.current.priority;
var jirap;
if (priority=='1'){
jirap = 'Highest';
} else if (priority=='2'){
jirap = 'High';
} else if (priority=='3'){
jirap = 'Medium';
} else if (priority=='4'){
jirap = 'Low';
} else if (priority=='5'){
jirap = 'Lowest';
} return jirap;

Majid Hassan
Tera Contributor

Hi Craig,

This is Majid @ Exalate. 

I believe you found the table name that you were looking for, but I wanted to know if you are receptive to the idea of synchronizing between Jira and ServiceNow using third party integration solutions. I say this because Exalate does this kind of mapping (priority/ status/ etc.), using one line of script and keeps the end user away from the internal complexities of the two systems. It also allows you very granular control over the synchronization itself by providing both sides (Jira and ServiceNow) complete autonomy over their part of the connection in this integration. 

Please feel free to book a customized demo if you would like to see the product in action. 

Thanks

Majid

Majid Hassan
Tera Contributor

Hi Craig,

This is Majid @ Exalate. 

I see that you found the table you were looking for, but I wanted to ask if you have considered a third party integration solution to fully synchronize your ServiceNow instance to Jira bidirectionally. If not, I would urge you to look at Exalate where you can create these sort of mappings (status/ priority/ etc.) with one line of script. Exalate hides away the complexities of the underlying systems from the end user and allows you much tighter control on the data you are syncing in and out. 

Please feel free to book a customized demo if you would like to see the product in action. 

Thanks

Majid