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.

Manually closing a case and terminating open playbook

Kit G
Giga Guru

Hi all,

 

Looking for some advice on handling manual case closure and playbook termination.

 

Scenario

Currently we have a custom case which has an associated playbook that triggers on creation. The playbook when completed successfully closes out the case and all is well. However if a agent sets the case to a resolution of cancelled for example the playbook remains active and the case remains in an open state.

 

Questions

  1. What are the best practice methods for controlling manual case closure?

Thanks in advance

1 ACCEPTED SOLUTION

Hi @Lisa Holenstein ,

We ended up using a business rule and scripting to resolve this issue which was fairly straight forward. Understanding not all playbook users may be familiar with scripting it. Thanks again for your input 😄

Sample

 

sn_playbook.PlaybookExperience.cancelPlaybooksByParentRecord(current, "XYZ is cancelled");

 

 

Doco

PlaybookExperience | ServiceNow Developers

 

Cheers

Kit

 

View solution in original post

5 REPLIES 5

Hi @Kit G !

Thanks for updating this with your solution! 😊



Have questions about the Now Platform? Join our bi-weekly Platform Academy.