Efficiently managing customer accounts is critical for any CRM system, and Salesforce provides robust tools to help you automate routine tasks and reduce manual effort. In this tutorial, we’ll guide you through creating a Scheduled Flow in Salesforce CRM to update and manage Account statuses systematically. This approach not only keeps your CRM data clean but also ensures proactive follow-ups when needed. Let’s dive in!
What Does This Flow Do?
In this example, the Flow:
- Runs automatically on a schedule (e.g., daily) to evaluate all or specific subsets of Accounts in your CRM.
- Updates each Account’s status (e.g., Active, Churn, Prospect, Inactive) based on two custom fields.
- Optimizes performance by only updating records when the status truly changes, reducing unnecessary CRM processing and improving system efficiency.
- Creates follow-up tasks for Account owners whenever a status changes to “Churn,” ensuring timely actions.
The flexibility of Salesforce lets you customize this Flow for your unique business logic, including adapting field names, picklist values, or Task assignment rules. With proper setup, this Flow can enhance the quality of your CRM data and support your team’s efforts in managing customer relationships.
Step-by-Step Guide to Building the Scheduled Flow in Salesforce CRM
Define Your Requirements
Before creating the Flow, align it with your CRM processes. Consider the following:
- Fields for Status Logic:
- In this example, we’re using two numeric custom fields: Days_Since_Last_Ship_Date_SF__c and Days_Since_Last_Activity__c.
- If your CRM uses other fields, such as a formula or date field, adjust the logic accordingly.
- Account Status Values:
- Ensure your CRM has a picklist or text field, Account_Status__c, with values like “Active,” “Churn,” “Prospect,” and “Inactive.” Add them if they don’t already exist.
- Task Details for Churn:
- Decide on the Task Subject (e.g., “Follow Up: Account Now Churn”) and the owner (e.g., Account owner, a queue, or another user in your CRM).
By defining these requirements, you can align the Flow with your CRM’s structure and your team’s workflows.
Create the Scheduled-Triggered Flow
- Navigate to Setup → Flow in Salesforce CRM and click New Flow.
- Select Scheduled-Triggered Flow → Create.
- Configure the Start element:
- Frequency: Choose Daily or another interval that aligns with your CRM data refresh needs.
- Start Date/Time: Pick a time when CRM usage is low, such as 3:00 AM.
- Click Done to save your schedule.
This setup ensures Salesforce CRM will automatically evaluate Accounts at the chosen interval.
Fetch Relevant Accounts
- Add a Get Records element to fetch Accounts from the CRM and label it Get Account Records.
- Configure it as follows:
- Object: Account.
- Optionally, add Filters to limit the records to those requiring evaluation, such as:
- LastModifiedDate >= TODAY() – 5 (for recently updated Accounts).
- Select Store All Records.
If your CRM has a large number of Accounts, filtering is essential for performance. Otherwise, leave the filter blank to evaluate all Accounts.

Set Up Helper Variables
Create two variables to manage data during the Flow:
- var_NewStatus:
- Type: Text.
- Purpose: Temporarily holds the new status for each Account.
- var_AccountsToUpdate:
- Type: Record (Object: Account, Allow Multiple Values).
- Purpose: Collects Accounts that truly need status updates in your CRM.
These variables are vital for efficient processing and bulk updates.
Loop Through Accounts
Add a Loop element to process each Account one by one:
- Select the collection of Accounts fetched earlier.
- Label it something like “Loop Through Accounts.”
- Collection Variable is: {!Get_Account_Records}
- Set the direction: “First item to last item”

Determine the Correct Status
Inside the loop, use a Decision element to determine the appropriate Account status. Define outcomes based on your CRM logic. I will provide a text and image example below:
- Active: Days_Since_Last_Ship_Date_SF__c <= 30
- Churn: Days_Since_Last_Ship_Date_SF__c > 30 AND <= 60
- Prospect: Days_Since_Last_Ship_Date_SF__c > 60 AND Days_Since_Last_Activity__c <= 90
- Inactive: Days_Since_Last_Ship_Date_SF__c > 60 AND Days_Since_Last_Activity__c > 90

For each outcome, use an Assignment element to set var_NewStatus with values like “Active,” “Churn,” “Prospect,” or “Inactive.”

Check for Status Changes
To minimize unnecessary updates in your CRM, compare the new status with the current status:
- Use a Decision element labeled “Check if Status Changed.”
- Define an outcome, Status_Changed, where:
- {!Loop_Through_Accounts.Account_Status__c} != {!var_NewStatus}.
If the status hasn’t changed, skip further processing.

Perform Updates and Task Creation
If a status change is detected:
- Update Account Status:
- Use an Assignment element labeled Assign New Status to Account
- {!Loop_Through_Accounts.Account_Status__c} = {!var_NewStatus}
- Add another Assignment element labeled Add Account to Update Collection
- {!var_AccountsToUpdate} Add {!Loop_Through_Accounts}
- Use an Assignment element labeled Assign New Status to Account
- Create a Task if Churn:
- Create a Decision element labeled Check if Churn Status
- Create two paths, is Churn and is not Churn
- If is Churn
- {!var_NewStatus} = Churn
- If Is not Churn will be Default Outcome
- Add a Create Records element to generate a Task if the new status is “Churn.”
- Example fields:
- ActivityDate: {!FollowUpSevenDays}
- OwnerId: {!Loop_Through_Accounts.OwnerId}
- Status: Open
- Subject: “Follow Up: Account Now Churn”
- WhatId: {!Loop_Through_Accounts.Id}
- Create a Decision element labeled Check if Churn Status

Bulk Update Accounts
Once the loop finishes, use an Update Records element to update all Accounts in var_AccountsToUpdate. This batch operation reduces CRM overhead compared to updating records one at a time.

Activate and Monitor Your Flow
- Save and activate your Flow. It should look like this:

- Verify its functionality by checking LastModifiedDate on Accounts or inspecting newly created Tasks.
Optimizing for Your Salesforce CRM
Your CRM is unique, and this Flow is highly adaptable:
- Use relevant fields and status logic that align with your CRM data model.
- Adjust Task ownership rules to suit your team structure.
- Modify the schedule to match your data refresh cycles.
Benefits for Your CRM Workflow
Implementing this Flow streamlines your Salesforce CRM operations:
- Allows sales reps to stay on top of churn customers.
- Keeps data accurate with automated updates.
- Enhances user productivity with proactive Task creation.
- Reduces CRM processing load by avoiding unnecessary updates.
This flow will help your sales team manage churn customers and help ensure customers are staying active within your team. If you have any issues while setting up a similar flow, please feel free to leave a comment and I would be happy to help.
Happy automating!










