Has anyone created multiple playbooks for a case type?

Patti Camilo
Giga Contributor

We are looking at CSM for tracking cases... the cases are very similar, however will have different categories / subcategories.  They are not really different enough to have separate case types however some of the steps for resolving will be different, so we would like to have different playbooks for each of the various categories/subcategories.  We are trying to avoid multiple case types, thinking that multiple case types will cause issues with reporting, searching etc. because they are in different tables.  Thoughts?

 

Thank you!

Patti

4 REPLIES 4

Robin John
Kilo Sage

Hi Patti,

Yes we did actually work both ways. We did create case types and also categories. For us, the ideology behind implementing case types was not that they are different but more that they were diverse products within the implementations and had their own processes and events. The handling agents were different and hence we could control the permissions (ACLs) easily.

Reporting will not be an issue as they are extended from the core case table. So you can easily report on them based. Plus the new agent workspace (Now experience framework) is a breeze to work with. You can configure searches create reporting dashboards and what not.

And to answer the Playbooks question, we have categories/sub-categories and case types. And we have implemented multiple playbooks (around 13) on the cases and its types. Playbooks are quite versatile with their trigger conditions and we did not have any problem regrading when and how it should trigger. 

Hi Robin,

 

I have similar scenario, although not related to CSM. But, I want to trigger different playbooks based on change of the type of Milestone. Now, I created different playbooks with specific conditions. But The playbook created earlier is still showing up . How can I delete the previous context?
I tried this script but it is not completely helping me in my case.

 

var now_GR = new GlideRecord("sys_pd_context");
now_GR.addQuery("input_record",current.sys_id);
now_GR.addQuery("sys_id","!=", latest);
now_GR.query();
if (now_GR.next()) {
sn_fd.FlowAPI.cancel(now_GR.getUniqueValue(), 'Canceling Test Flows');
//now_GR.deleteRecord(); // This did not work it is giving cross scope error.

}

ServiceNow provides an API/Class named sn_playbook.PlaybookExperience. This has a function named cancelPlaybooksByParentRecord. You can use it to cancel the execution. Here is a sample code from the documentation:

var parentRecord = new GlideRecordUtil().getGR("sn_customerservice_case", <sys_id>);

var cancellationReason = "Cancelling this playbook";

// demo playbook from Process Automation Experience Demo store app
var scopedName = "sn_pad_demo.playbook_experience_demo"; 

// demo playbook experience from Process Automation Experience Demo store app
var playbookExperienceId = "a56d8d93ff311010cc0853ea793bf1a6"; 
	
var cancelPlaybookReturn = sn_playbook.PlaybookExperience.cancelPlaybooksByParentRecord(parentRecord, cancellationReason, scopedName, playbookExperienceId);
	

gs.info(JSON.stringify(cancelPlaybookReturn, null, 2));

 You can find the documentation here. 

Patti Camilo
Giga Contributor

Thanks,  that was very helpful!