Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Promote task playbook to routine

Greetings

I have built a handful of playbooks for a Virtual Agent and the new update has classified them as Task playbooks. 

 

I would like to elevate these to the new Routine playbook type because they have ~40 examples that I've written to customize behavior and invocations. I've tried to export and import, as well as looked for settings that would modify the classification but haven't been able to.

Is this a coming feature or does anyone have a method to accomplish this, like editing the .json directly?

Solved Solved
0 4 269
1 ACCEPTED SOLUTION

Hi @anwhite - I was able to convert an existing task playbook into routine, and yes I did it by manually editing the exported JSON. 

1. Export your task playbook as JSON - this will have the definition of your 40 plus examples.
2. Create a new empty routine playbook.
3. Copy and paste goal and instructions from your task playbook to the new routine playbook. 
4. Export and download the new playbook also as JSON
5. Open both in an IDE that alllows you to do a visual file diff (e.g VS Code)

There is a single JSON property which defines the playbook as a routine

"playbookType": "WORKFLOW"

You can add this to your old playbook and import it back in. 
You'll need to be careful with your editing of the file and ensure it is still valid JSON before you import it back into Dialogflow CX.

Good luck!
Joe



View solution in original post

4 REPLIES 4

Hi @anwhite,

Welcome to the Google Cloud Community!

It looks like you are trying to convert your Task Playbooks into Routine Playbooks in ServiceNow to leverage your 40 examples of custom training data, but you’ve found no built-in method and want an efficient solution without starting over from scratch.

Here are the potential ways that might help with your use case:

  • Rebuild as a Routine Playbook: You may want to manually recreate your logic within your new Routine Playbook, as this ensures a clean transfer and helps you avoid any potential database corruption or unexpected behavior that can result from directly manipulating your JSON. Additionally, this process will force you to review and potentially optimize your logic during the rebuild. Below are the steps you may follow to recreate your logic within your new Routine Playbook:
    1. Analyze Existing Playbooks: Thoroughly examine your Task Playbooks, pinpointing the essential steps, input parameters, and critical decision points. Ensure all details are well-documented.
    2. Design Routine Playbooks: Using your analysis as a foundation, create the appropriate Routine Playbooks. Consider how users will begin the conversation, the entities you need to extract, and how the conversation flow should dynamically adjust to user inputs.
    3. Create Routine Playbooks: Develop your Routine Playbooks entirely from the ground up, ensuring you define your input parameters, nodes, branches, and corresponding responses.
    4. Migrate and Enhance Training Data: Adapt your 40 examples to fit into your Routine Playbook, and think about incorporating additional variations to enhance the training of your NLU model. Emphasize a wide range of phrasings and subtle intent variations, as these are vital for the success of your Routine Playbooks.
  • Error Handling: You may want to add error handling to your script to catch any exceptions that might occur during your transformation process, ensuring smoother and more reliable execution for your workflow.
  • Logging: You may want to add detailed logging to your script to track its progress and help you identify any issues.

You may refer to the documentation below, which covers understanding users, acting appropriately, and maintaining quality in your Dialogflow CX agent:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Hi, ServiceNow is unrelated to my inquiry.

Was this response produced by an LLM? Sorry, most of the answer is not applicable.

Hi @anwhite - I was able to convert an existing task playbook into routine, and yes I did it by manually editing the exported JSON. 

1. Export your task playbook as JSON - this will have the definition of your 40 plus examples.
2. Create a new empty routine playbook.
3. Copy and paste goal and instructions from your task playbook to the new routine playbook. 
4. Export and download the new playbook also as JSON
5. Open both in an IDE that alllows you to do a visual file diff (e.g VS Code)

There is a single JSON property which defines the playbook as a routine

"playbookType": "WORKFLOW"

You can add this to your old playbook and import it back in. 
You'll need to be careful with your editing of the file and ensure it is still valid JSON before you import it back into Dialogflow CX.

Good luck!
Joe



A note for anyone else looking at this- the structure seems to indicate the playbookType object needs to be inserted directly above the first codeBlock object.

 

Edit: Some other considerations- After uploading this and working in the web interface, some of the examples had blanks in the dropdowns for the flows/playbooks they invoked. May have to review examples in your own project to see if they still are referenced properly.

Playbook behavior may differ markedly between a routine and task playbook- I found routine playbooks were more likely to hold someone on an instruction inside the playbook rather than move around the given rules to find a more applicable one.