{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4069,"path":"build-workflows/workflow-studio/create-process-definition.md","title":"Create a playbook","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a playbook\n\nCreate a playbook to set up an automated business process. Use Playbook builder in Workflow Studio to add stages, activities, triggers, and runtime permissions, then activate the playbook to make it available to agents and fulfillers.\n\n## Before you begin\n\n-   Activate the Playbook application for your instance. See [Activate Playbooks](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/activate-process-automation-designer.md).\n-   Familiarize yourself with the tables and relationships that your application uses for the playbook that you want to create.\n-   Familiarize yourself with any features that your business uses to automate operations on the ServiceNow AI Platform, such as [flows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/exploring-flows.md), [subflows](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/exploring-subflows.md), and [actions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/exploring-actions.md).\n-   Role required: admin, playbook.admin, or playbook.write.\n\n## About this task\n\nUse this procedure to build a new playbook from scratch. You can create a playbook with no trigger, a single trigger, or multiple triggers. If you change a playbook after activating it, the system saves your changes but deactivates the playbook. You must activate the playbook again to publish any new changes.\n\nFluent support for playbooks lets developers build, edit, and manage playbooks as code with the Fluent domain-specific language \\(DSL\\) in the ServiceNow IDE or a local SDK. For more information, see [https://servicenow.github.io/sdk/guides/playbook-guide](https://servicenow.github.io/sdk/guides/playbook-guide).\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Workflow Studio** &gt; **Playbooks**.\n\n    The Workflow Studio landing page opens with the Playbooks list displayed by default.\n\n2.  In the upper-right corner, under **New**, select **Playbook**.\n\n3.  Fill in the following fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |**Playbook name**|Unique, user-facing name for the playbook. Appears to agents and fulfillers at runtime.|\n    |**Application**|Application scope for the playbook. Select **Global** to run the playbook in any application scope.|\n    |**Description**|Descriptive details about the playbook.|\n\n4.  Select **Build playbook**.\n\n    The builder displays in **Diagram view** by default, but you can select **Board view** to switch between views anytime as you build your playbook.\n\n    \\[Omitted image \"board-view.png\"\\] Alt text: Diagram and Board view toggle\n\n5.  Select the **Start** node.\n\n    The Playbook properties side panel opens.\n\n6.  Under the **Details** tab, fill in the fields.\n\n    You can also update the Playbook name and Description.\n\n<table id=\"table_lhw_frm_njc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n**Limit playbook executions for each parent record to**\n\n</td><td>\n\nMaximum number of times the playbook can run for a single parent record.\n\n</td></tr><tr><td>\n\n**Execution type**\n\n</td><td>\n\nType of playbook to create.-   **Record driven:** Playbook tied to a record. Triggered on demand or automatically based on record operations. Data from the playbook is stored on that record.\n-   **Standalone:** Single-session playbook that does not store data to a record. Must be manually triggered or called from another playbook.\n\n\n</td></tr><tr><td>\n\n**Parent table**\n\n</td><td>\n\nTable that provides trigger records and other playbook inputs. Required for Knowledge and Email activities.\n\n</td></tr><tr><td>\n\n**Allow this playbook to be restarted during runtime**\n\n</td><td>\n\nWhen selected, runtime users can restart the entire playbook during a run.\n\n</td></tr></tbody>\n</table>7.  Under the **Inputs** tab, add inputs for a playbook to launch with.\n\n    Inputs defined here are accessible throughout the playbook via dot-walking and dot notation, for example `inputs.inputName`, and can be used in activity fields, conditions, and UI elements.\n\n    **Tip:** To trigger a playbook with API inputs instead of trigger records, use the `triggerPlaybook(String scopedName, GlideRecord parentRecord)` API to trigger a playbook. For more information about the API, search `triggerplaybook` on the ServiceNow Developer Site: [Playbook Experience APIs](https://developer.servicenow.com/dev.do#!/reference/api/zurich/server/sn_playbook-namespace/PlaybookExperienceScopedAPI).\n\n8.  Under the **Runtime permissions** tab, configure permissions for users, user groups, user criteria, and roles.\n\n9.  Configure a trigger for the playbook.\n\n    You can create a playbook with no trigger, a single trigger, or multiple triggers. For more information, see [Add and configure a trigger in a playbook](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/add-configure-trigger.md).\n\n10. Add activities, stages, decision nodes, and parallel branches as required to automate your process.\n\n    Continue adding stages and activities until your playbook reflects the full business process. For more information, see [Stages and activities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/process-automation-designer-lanes-activities.md).\n\n11. Preview activities to confirm the activity's appearance to end users and adjust their configuration.\n\n    For more information about previewing activities, see [Preview an activity's runtime UI](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/preview-playbook-runtime-ui.md).\n\n12. Add a variant to your playbook.\n\n    You can use one playbook in multiple use cases by using variants. For more information, see [Playbook variants](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/playbook-variants.md).\n\n13. After adding all stages and activities, test the playbook.\n\n14. After testing the playbook, select **Activate** in the header.\n\n    The playbook is published and runs when its trigger conditions are met.\n\n\n## Result\n\nWhen the trigger conditions of the playbook are met, the system creates a Process Execution record and renders user-facing configurations for Playbook Experience. For an example of how to digitize a manual business process, see [Create a sample playbook](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/design-automated-process.md).\n\n## What to do next\n\nSet up the Playbook Experience for your agents and fulfillers.\n\n**Parent Topic:**[Creating and managing Playbooks](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/creating-managing-playbooks.md)\n\n"}}