I'm trying to work out how to handle the migration of time-based workflows to flow, when there are still multiple items in the WFR queue. We have some WFRs that send staggered emails, months after they have been triggered. How do I handle this when I convert these WFRs into flows? I need to be able to send emails from the new flow using the same criteria as the WFR, but I don't want to re-trigger any emails that have already been sent out. However I do need the emails in the original queue to still send, but obviously don't want to risk sending any twice. I've thought of having a checkbox for each email being sent, and have the new flow automatically check this box when it sends the email. If the box is unchecked, then the email can be sent. I could then tick the boxes on the records in the original WFR queue, so that the emails already sent are marked, then somehow re-trigger all the records (but I'm not sure how I'd re-trigger them without changing the criteria for triggering the flow). Otherwise, maybe run the new flow in parallel with the old WFR, so that any NEW records go through the flow, and existing records stay in the WFR? And just deactivate the WFRs when the queue is finally empty. Both of these solutions seem messy, and very prone to error (we are talking about hundreds of records and emails). Has anyone got any better ideas please?
Hello Sara,
Your best option would be to have both solutions coexisting until all the emails scheduled by the legacy workflow have been triggered (I.e., your option #2) To make this work, you need a threshold to let Salesforce know which automation to use while both the workflow and the flow are active.
My recommendation would be to use the record creation date of the triggering record, but you can use any other time based criteria, as long as there is no time overlap between your workflow and your flow.
For example, you can set it up like this :
- workflow : record created before date X
- flow : record created at or after date X, X beeing the date of your Flow activation.
Whenever all emails triggered by the workflow have been sent, you will be able to delete it and update your flow to remove the time criteria.