Best Practices for Editing an Active Workflow
This article outlines the best practices for editing an active workflow in your system. Following these guidelines ensures smooth updates to existing workflows.
Approaches for editing a workflow
There are two approaches available for editing a workflow:
- Edit the draft or active version of a workflow: This approach allows you to make changes directly to the existing draft. On the other hand, editing the active version creates a draft copy of the active workflow and allows you to make changes to the draft.
- Create a duplicate workflow: Clone the existing workflow and make the required changes.
Navigate to the workflows section
-
Go to Admin > Chat > Automation > Workflows.
You will see a list of available workflow triggers. For more details, refer to the Workflow Triggers documentation.
-
Select the appropriate Workflow Trigger.
-
Choose a workflow currently in the Active state for editing.
Note: This process is same for workflows in the Inactive state.
Edit the draft or active version of a workflow
When you attempt to edit an active workflow, the system automatically creates a draft version (a clone of the active workflow) for editing.
If a draft already exists for the workflow, a confirmation popup appears prompting you to choose whether to Continue with Draft or Edit Active Version.
- If a draft version of the workflow already exists, you have the option to Continue with Draft without creating a new one.
- Choosing the Edit Active Version option will discard the current draft (if one exists) and create a new draft based on the currently active workflow version. This ensures that you are editing the most recent live configuration.
Note: Once you proceed with the Edit Active Version option, your current draft will be permanently removed.
Publish and activate the edited workflow
- Before you can publish or activate a workflow, make sure all paths are complete. Any open-ended paths must be closed using Exit blocks. A workflow with incomplete paths can’t be published.
- When you click Publish & Activate, the draft version is set as the current active workflow, and the previous active version is deleted.
Note: Any ongoing conversations using the old workflow are immediately terminated.
Create a duplicate workflow for editing
- Click the Kebab icon (⋮) on the workflow you want to edit.
- Choose Duplicate Workflow from the provided options.
- Enter a Workflow Name for your duplicate.
- The system creates a copy next to the original workflow.
- Click the Edit icon on the far right to modify the newly created workflow as needed.
- Once editing is complete, Publish & Activate the duplicate workflow. Then, deactivate the original workflow after the duplicate is successfully activated.
Best approach to edit an active workflow
The best way to safely edit an active workflow is by creating a duplicate, allowing you to make changes without disrupting ongoing conversations.
Why this approach does not affect existing executions
When a workflow is duplicated, it creates a separate copy (clone) of the original workflow. The duplicate workflow also clones the initial conditions of the original. However, during execution:
- Only the original workflow is triggered if it satisfies the defined conditions first.
- The duplicate workflow doesn’t run because the original workflow already handles the execution.
- After the duplicate workflow editing is completed, the original workflow will be deactivated.
Note: Deactivating a workflow stops it from being applied to new conversations, but it will continue to run in any conversations where it is already active.