Logical Flow:
- Search the records for which the email series is to be activated.
- Search for the records to whom no emails have been sent yet and send them the first email.
- Update the value in the number of emails sent field in Contacts as 1 to indicate that first email has been sent.
- Similarly, search for the record to whom first mail has been sent and send them the second followup email.
- Again update the value in number of emails sent field in Contacts as 2.
- The same process will be repeated till the last follow up email is added and the number of emails sent value is updated accordingly.
- To stop the email series, in the last step while modifying the number of emails sent value, deactivate the Email Series start checkbox by setting its value as False.
This example sends a series of emails to the lead from the salesperson to whom the lead is assigned to or from any other user.