0

I am having a weird experience with Aysnchronous Path inflow. What if in case if I have to send 10 different emails with different email templates on different conditions.

For example, if Field1 is changed then I need to send Email1, if field 2 changes send email 2. Is that possible with Asynchronous path, because Asynchronous Decisions cannot have is Changed or prior values.

What is the recommended approach? I hate creating multiple flows for each condition set. In process builder, we had different Nodes where you can have a node for each condition set.

I tried this approach by checking all possible conditions in STart conditions, then I tried to handle individual conditions in different outcomes in the Decision, but even if I change Finance Flagged Record = False, the Start Date Changed outcome is getting executed, not sure why? I am guessing because the Prior value in the Asynchronous path will be null. How to Achieve this? I need to combine both email alerts in one flow.

enter image description here

enter image description here

3
  • What is the reason you are using Asynchronous path for this? Emails can get sent from the synchronous path (they won't actually go out until after the transaction commits, like any other email mechanism)
    – Jeff Kranz
    Commented Dec 15, 2021 at 20:57
  • makes total sense for emails. what if incase if we want to use it for child record update/cerate? and we wanted it to run asynchronously
    – Ajay
    Commented Dec 15, 2021 at 21:05
  • child creates and updates can and usually are run synchronously in an after-save flow or trigger. the primary use case for an asynchronous flow path is for callouts or avoiding mixed DML errors (create/update of setup records while creating/updating regular object records). i can also imagine it being helpful for processing large amounts of data, but that may be considered a workaround rather than primary use case
    – Jeff Kranz
    Commented Dec 15, 2021 at 21:37

1 Answer 1

0

You should be ok with the synchronous path of the flow, the emails will be sent when the transaction has completed, as per the docs.

At run time, the email isn’t sent until the interview’s transaction is completed. Transactions are complete when the interview either finishes or executes a Screen, Local Action, or Pause element.

Also you can use a single decision element to evaluate different scenarios. If the condition seems not to be working I would advise you to debug the flow, through the "Debug" button.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .