In Salesforce, Record-Triggered Flows are used to automate processes in a declarative manner by responding to changes in records, such as when they're created or updated. Suppose you have a Record Triggered Flow and you'd like to update it to work with new Stage values. Here’s a generalized step-by-step approach:
Prerequisites:
Ensure you have the necessary permissions to edit flows in Salesforce.
Familiarize yourself with the current logic and actions in your flow.
If this is your first time updating flows or if you're just getting started with them, its always recommended to test this in Sandbox First. [Coming Soon Sandbox Playbook in Swantide App]
Updating Record Triggered Flow with New Stage Values
Login and Navigate to Flow Builder:
Login to your Salesforce instance.
Navigate to "Setup".
In the Quick Find box, type “Flows” and select it.
Find the flow you need to edit and click on its name.
Optionally, you can Locate the Flow Trigger Explorer Button, on the upper right corner and search for Flows by Object in addition to if it's triggered on Create or Update.
Example of Updating an Opportunity Stage Timestamp Flow:
Consider, I have the below Flow, that once stamped a Date/Time Value into a Field called "Stage Changed Negotiatio " but I no longer will be using that Stage Value and I will be replacing Negotiating with a New Stage Called "Legal and Close".
With this new Stage Value, I can do two things:
Update the Decision Node where I find where Stage Change = "Negotiation" or
Create a New Decision Node for when the Stage Change = "Legal and Close"
Lets start with the first method: Update the Decision Node where I find where Stage Change = "Negotiating"
I can update this Decision Node, by giving it a New Label, verify that the API Name also changes. To do so:
Delete both the Label and API Name
Update the Label, click Tab and the API Name will update
I can go to the Condition Requirements, and also:
Update the Label and API Name using the same steps above
Update the conditions.
Where it says Record > Stage [Equals] I can delete the Picklist Value and select a New Stage. I select, the value 6. Legal and Close
Under the second condition, I search for the New Field called "Stage Change Legal and Close"
To do so, I start by typing "Record" and then you will be able to see a popup appear
I proceed to click in the Global Variable of $Record and start search for the field name of the field in scope.
If successfully done, it should look like the below image.
If I want to create a New Decision Node:
I just click on an of the open dots in the Flow Builder
And Select the Decision Node
Analyze Current Flow:
Understand the existing conditions, actions, and logic before making changes.
Consider taking screenshots or notes for reference.
Add New Stage Values:
If your flow is working with picklist values, such as the "Stage" field in an Opportunity, first ensure that the new values are added to the picklist at the object level.
Navigate to the object manager, find your object, and add new picklist values to the "Stage" field.
Update Decision Elements:
In the Flow Builder, find Decision elements that use the "Stage" field.
Update each Decision element by adding new outcomes for the new Stage values. You may need to:
Define conditions that cater to the new Stage values.
Assign what the flow should do when these conditions are met.
Update Record Elements:
If there are Record Update elements that need to work with new Stage values:
Check the conditions and criteria to see if they cater to the new Stage values.
Make necessary adjustments or add new criteria as needed.
Adjust Additional Logic if Needed:
Check for additional elements like Assignment, Loop, and Subflow(s). Adjust the logic accordingly to account for new Stage values.
Ensure that any new actions, record updates/creates, or emails are added as needed for the new Stage values.
Testing:
Save your flow, but do not activate it yet.
Test the updated flow in a sandbox or developer environment, ensuring the new logic and actions work as expected with the new Stage values.
Use the Debugger on the Top-Right Corner
Pay attention to error messages and debug logs to troubleshoot issues.
Review and Activate:
Once your testing is successful and you’re confident in the updated flow:
Activate the flow in your working environment using a Change Set.
Monitor the flow for a period of time to ensure it’s working as expected in the live environment.
Documentation:
Ensure you document the changes, in the Description of the flow you could include:
The date of change.
What was changed.
Why it was changed.
The name of the person who made the change.
Swantide is also looking to Document these flows with a New SwanLibrary feature that will be your go to "Meta-Data" Catalogue for important items such as Custom Objects, Fields, Flows, Validation Rules, etc. [Expected to Come Out Fall of 2023]