{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":2166,"path":"application-development/flow-designer.md","title":"Flow Designer","bundle":null,"doc_type":null,"release":"australia","body":"\n# Flow Designer\n\nFlow Designer is a ServiceNow AI Platform feature that enables rich process automation capabilities in a consolidated design environment. Flow Designer enables process owners to use natural language to automate approvals, tasks, notifications, and record operations without having to code.\n\n## Flow Designer and IntegrationHub\n\nFor any new process flow requirements, ServiceNow recommends using Flow Designer over the legacy workflow for almost all circumstances.\n\n## Flow Designer and Business Rules\n\nYou should use Flow Designer instead of Business Rules unless:\n\n-   Business logic needs to run in a specific sequence with other Business Rules. For example, new business logic needs to run after one Business Rule but before another.\n-   Logic needs to execute immediately before or after writing to the database in the same thread.\n-   The logic only calls a Script Include.\n\nWhen designing a flow, follow these design principles:\n\n-   Single Purpose: Each flow should have a singular goal.\n-   Reusability: Design with reusable sub-flows in mind \\(approval is a great example\\).\n-   Clarity: The language and layout of a flow should make each action’s purpose clear.\n\nStart with a white board design of a business flow. Then build the flow action by action to align with the process. More than one flow may be required for a for a single process to keep to the design principles.\n\nUse the following practices when working with Flow Designer:\n\n-   Use records, not SysIDs. Provide a guided experience with inline documentation.\n-   Learn how to use template objects to work with both static and dynamic inputs.\n-   Avoid passing around blobs of data unless absolutely necessary.\n-   Only pass information to a flow that the flow is going to use.\n\nUse the following practices when working with Flow Designer Actions:\n\n-   Always create actions under the scope of the application’s spoke, if applicable.\n-   Set access to Accessible from all scopes in actions to be able to reuse actions across other apps and scopes in the future.\n-   Set **Protection** to Read-only to avoid any unwanted edits to the actions by users.\n-   Make sure inputs have a specific type.\n-   Ensure that **Mandatory** is selected where required.\n-   If using a **choice** input type, use a default value.\n\nUse the following practices when working with IntegrationHub:\n\n-   Create one spoke per integration system. Only put actions for a single system in a spoke.\n-   When creating the scoped app for the spoke, use a version naming convention that makes sense.\n-   Use a connection alias instead of an inline connection. The Base URL will be automatically extracted.\n-   Use connection attributes under the Alias to pass the version in a REST step giving future flexibility for versioning in the resource path.\n-   Use Save as Attachment to save the content in the response instead of creating another step to save the data.\n-   If the Alias is dynamic, make Alias one of the inputs and use the data pill to provide the Alias.\n\nUse the following practices in Flow Designer and IntegrationHub for Error Handling:\n\n-   Create a Script Include to handle errors.\n-   Write short and understandable error messages.\n-   Incorporate all of the possible error messages the API returns.\n-   Ensure that the outputs from the integration step are validated before using them.\n-   Fail Early: If the inputs are not available, do not call the integration.\n\nSelf-Paced Training: [Flow Designer](https://developer.servicenow.com/dev.do#!/learn/courses/paris/app_store_learnv2_flowdesigner_paris_flow_designer)\n\nSelf-Paced Training: [IntegrationHub](https://developer.servicenow.com/dev.do#!/learn/courses/paris/app_store_learnv2_rest_paris_rest_integrations/app_store_learnv2_rest_paris_rest_in_integrationhub/app_store_learnv2_rest_paris_rest_in_integrationhub_objectives)\n\n**Parent Topic:**[Build form and business logic](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/build-form-and-business-logic.md)\n\n"}}