I need to set Interactions to "Closed Complete" after Incident is set to "Resolve."

carlosllano
Tera Contributor

I'm trying to create a Business Rule to get my "Integration" set to "Closed Complete" after the created incident is set to "Resolve."

 

6 REPLIES 6

carlosllano
Tera Contributor

I have set it up to close the interaction once the incident is opened.

In the BR, select table "Interaction Related Record" to run When "after"

carlosllano_0-1734528566291.pngcarlosllano_1-1734528605426.png

 

(function executeRule(current, previous /*null when async*/ ) {

var closeInteractionRec = new GlideRecord('interaction');
closeInteractionRec.get(current.interaction.sys_id);
closeInteractionRec.state = 'closed_complete';
closeInteractionRec.update();

})(current, previous);

Ok yes that makes more sense. Once an incident is opened the interaction should be considered "done" so you could close it out and that code matches mine, with one exception. We are capturing on the interaction a custom field to indicate if it was transferred to a request or incident, so extra lines to of code to populate that information. Made reporting easier.