There are many similarities with a Flow Loop and a manual Data Update using Excel. We’re going to walk through a process and compare throughout how the Excel steps relate to the Flow. When I say Flow Loop, I’m referring process of using a Fast Lookup, Looping through the records, and then Updating the records in a Fast Update. (If you’ve got a better way to describe it, let me know!)
The below Flow is reassigning all of our Accounts to my new Sales team. All Low Priority Accounts will go to Astro. All Medium Priority Accounts will go to Einstein. And, any Accounts without a Priority will be marked as High and all High Priority Accounts get assigned to Codey.
Easy enough, so let’s take the below finished Flow and walk through how you’d do everything this Flow does in Excel and Workbench (or another Data Loader).
Part 1 – Creating the Report & Exporting to Excel [Fast Lookup]
Alright, so let’s get a Report that includes the Customer Priority, Account Owner, and Account ID.
What this looks like in Flow is:
Note – AccountsToReassign is a Collection Variable
Alright, so now let’s export this data out so we can work with it in Excel!
Part 2 – Modifying the Data [Loop]
Now that we’ve exported out our Data, it’s time to work with it and make our updates! In Flow, our version of skipping to the next row is by using our Loop element. In this scenario, it looks like this:
We’ve got a Medium Priority Account, that means we need to assign it to Einstein.
In Flow, this is what we just did:
We update the OwnerId of the Account to Einstein’s ID.
Then, we add this Account to the Collection/List of Records we are going to update at the end of the Flow.
Let’s go to our second record. This also should get assigned to Einstein. Notice, we’ve only touched the first two rows, everything else is untouched. Also, notice that we’ve actually done NOTHING to Salesforce yet… it’s all prep work at this point. This is important, so I’m going to say it again — Salesforce doesn’t yet know of the two Account Ownership changes, because we’ve not updated the records… we’re just getting them ready for to update.
Once again, in Flow, this is what we just did:
As we keep on Looping through these records, we eventually get to a Low Priority Account, and assign it to Astro.
In Flow, this is what we just did:
We update the OwnerId of the Account to Astro’s ID.
Then, we add this Account to the Collection/List of Records we are going to update at the end of the Flow.
As we keep updating each record, “looping” through them, we eventually get to the last record. In this record, we’ve not got any Priority. We need to update the Priority AND the Owner to Codey.
In Flow, this is what we just did:
Notice, our assignment is slightly different than the last two, because we’re updating the Customer Priority Field as well as the OwnerId here.
For the last time, we add this Account to the Collection/List of Records we are going to update at the end of the Flow.
Part 3 – Updating the Data [Fast Lookup]
Now, we’ve correctly updated our Excel spreadsheet. We’re ready to commit these changes into Salesforce. So, let’s navigate to our Data Loader tool of choice, and get ready to Update the data!
Map the Fields in the Excel file to the Salesforce Fields
Next, we take that deep breath in, and hit Confirm Update.
In Flow, all that looks like is this:
Note – AccountsToUpdate is a Collection Variable
Now that we’ve finished our update, we want to navigate back to our report and admire our craftsmanship:
Recap: If you’re an Admin that has done any sort of data manipulation in Excel and then updated Salesforce, you are equipped to master Fast Lookups, Loops, and Fast Updates/Creates.
Related Resources: