0

Scenario:

Build an automated email that fires off the opportunity when it reaches a certain sales stage.

Send a reminder email every 12 hours until they have completed a form attached to the email.

Envisioned Solution:

Put two checkboxes form_completed__c and first_email_sent__c on the opportunity. Both set to false

When an opportunity reaches the specific sales stage the trigger handler sends an email to the associated contact, then checks the first email sent box.

A separate batch class will query for opps every 12 hours that have the first email send but form_completed__c == false.

It will send a reminder email to each of the contacts in the scope of the batch.

My Questions:

Should I use some sort of specific asynchronous apex structure to send the first email off the trigger when the opp reaches a specific stage? Or would synchronous be fine?

Is batch the best method to build the second part of the system that sends the reminder emails?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.