Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to close the interaction after incident or request is created?

Ricardo Sanche3
Tera Contributor

When I create an incident from an interaction or a request from interaction, the interaction should automatically be "closed completed"Interaction.JPG

1 ACCEPTED SOLUTION

AndersBGS
Tera Patron
Tera Patron

Hi @Ricardo Sanche3 ,

 

Please find this community post from 2022, which describes the resolution to your query: Solved: interaction to be automatically closed when it get... - ServiceNow Community

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

View solution in original post

2 REPLIES 2

AndersBGS
Tera Patron
Tera Patron

Hi @Ricardo Sanche3 ,

 

Please find this community post from 2022, which describes the resolution to your query: Solved: interaction to be automatically closed when it get... - ServiceNow Community

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Ricardo Sanche3
Tera Contributor

THE BR is only working on the agent workspace, but not in the actual UI form, when I click on the UI action for  "Create incident" or "Create a request" nothing happens. 

 

Table: Interaction related record

When: After

Insert

Condition: no conditons

(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);

 

 

Interaction.JPG