- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 06:15 PM
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
- What are the best practice methods for controlling manual case closure?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 04:05 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 02:15 PM
hey @Lisa Holenstein ,
would love it if I could get some advice from an experienced playbooker 😄
Cheers
Kit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 01:10 AM
Hi Kit,
we currently don't have a generalized activity to do something like the "End Flow" flow logic, but you can reuse or duplicate the functionality included in the Incident Management for Service Operations Workspace. There is a subflow/action that lets you end the playbooks for a given Parent Record with the corresponding PlaybookExperience API method cancelPlaybooksByParentRecord().
1. (Optionally) install the above plugin or create an action & subflow based on their "Cancel remedial action playbook" action & subflow.
2. In your playbook, create a parallel branch with a new stage.
3. In that stage, add a new activity Wait for Condition, with the condition of your parent record being closed or canceled.
4. Add a new activity and check the box to "Include all Automation Assets" to show subflows and actions, pick the Cancel remedial action playbook subflow and map the record input to your playbook parent record.
Hope this helps,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 01:32 PM
Hey @Lisa Holenstein ,
Thanks for the response, I will look into your suggestions and let you know the results 😄
Regards
Kit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 04:05 PM
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
