Setting up a Before-Save Record-Triggered Flow is efficient because it doesn't require additional DML operations to save the data changes. Here's how you can set up this flow for your use case:
Log into Salesforce and to Flows:Click on the App Launcher (grid icon) on the top left.Enter "Flows" in the search box and click on "Flows".
Click on (grid icon) on the top left.
Enter "Flows" in the search box and click on "Flows".
Click on New Flow:Choose "Record-Triggered Flow".Click on "Next".
Choose "Record-Triggered Flow".
Click on "Next".
Configure the Trigger:Choose "A record is created or updated".For the object, select "Case".Under 'Run Flow', choose "Before the record is saved". This ensures that any changes the Flow makes are saved without extra DML operations.
Choose "A record is created or updated".
For the object, select "Case".
Under 'Run Flow', choose "Before the record is saved". This ensures that any changes the Flow makes are saved without extra DML operations.
Define the Criteria:Add a Decision element to check if the related Account meets the criteria:Label: "Is Strategic Account?"API Name: "Is_Strategic_Account"For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c> 1000000
Add a Decision element to check if the related Account meets the criteria:Label: "Is Strategic Account?"API Name: "Is_Strategic_Account"For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c> 1000000
Label: "Is Strategic Account?"
API Name: "Is_Strategic_Account"
For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c>
Record.Account.Open_Opportunities__c> 2
OR
Record.Account.Total_Won_Value__c>
Update the Case Record:If the decision criteria are met, use an Assignment element to set the "Strategic Account" field on the Case record totrue.
If the decision criteria are met, use an Assignment element to set the "Strategic Account" field on the Case record totrue.
Save & Activate the Flow:After setting up the criteria and assignment, click on "Save".Give your Flow a name and description.Once saved, click "Activate" to enable the Flow.
After setting up the criteria and assignment, click on "Save".
Give your Flow a name and description.
Once saved, click "Activate" to enable the Flow.
Log into Salesforce and to Flows:
Click on the App Launcher (grid icon) on the top left.
Enter "Flows" in the search box and click on "Flows".
Click on (grid icon) on the top left.
Enter "Flows" in the search box and click on "Flows".
Click on New Flow:
Choose "Record-Triggered Flow".
Click on "Next".
Choose "Record-Triggered Flow".
Click on "Next".
Configure the Trigger:
Choose "A record is created or updated".
For the object, select "Case".
Under 'Run Flow', choose "Before the record is saved". This ensures that any changes the Flow makes are saved without extra DML operations.
Choose "A record is created or updated".
For the object, select "Case".
Under 'Run Flow', choose "Before the record is saved". This ensures that any changes the Flow makes are saved without extra DML operations.
Define the Criteria:
Add a Decision element to check if the related Account meets the criteria:Label: "Is Strategic Account?"API Name: "Is_Strategic_Account"For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c> 1000000
Label: "Is Strategic Account?"
API Name: "Is_Strategic_Account"
For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c>
Record.Account.Open_Opportunities__c> 2
OR
Record.Account.Total_Won_Value__c>
Add a Decision element to check if the related Account meets the criteria:
Label: "Is Strategic Account?"
API Name: "Is_Strategic_Account"
For the Decision criteria:Record.Account.Open_Opportunities__c> 2ORRecord.Account.Total_Won_Value__c>
Record.Account.Open_Opportunities__c> 2
OR
Record.Account.Total_Won_Value__c>
Label: "Is Strategic Account?"
API Name: "Is_Strategic_Account"
For the Decision criteria:
Record.Account.Open_Opportunities__c> 2
OR
Record.Account.Total_Won_Value__c> 1000000
Record.Ac
count.Open_Opportunities__c> 2
OR
Record.Account.Total_Won_Value__c> 1000000
Update the Case Record:
If the decision criteria are met, use an Assignment element to set the "Strategic Account" field on the Case record totrue.
If the decision criteria are met, use an Assignment element to set the "Strategic Account" field on the Case record totrue.
Save & Activate the Flow:
After setting up the criteria and assignment, click on "Save".
Give your Flow a name and description.
Once saved, click "Activate" to enable the Flow.
After setting up the criteria and assignment, click on "Save".
Give your Flow a name and description.
Once saved, click "Activate" to enable the Flow.
Remember, Before-Save Flows don't require you to add an update record element because any changes you make to the record in the Flow are automatically saved as part of the save process.
Test the Flow:Create or update a Case record related to a Strategic Account based on your criteria.Ensure the "Strategic Account" field on the Case record gets set totrue.
Create or update a Case record related to a Strategic Account based on your criteria.
Ensure the "Strategic Account" field on the Case record gets set totrue.
Test the Flow:
Create or update a Case record related to a Strategic Account based on your criteria.
Ensure the "Strategic Account" field on the Case record gets set totrue.
Create or update a Case record related to a Strategic Account based on your criteria.
Ensure the "Strategic Account" field on the Case record gets set totrue.
Now, every time a Case is created or updated, the Flow will automatically check the related Account's criteria and set the "Strategic Account" field accordingly.