You are here:
EmailQueueProcessor Interface
The EmailQueueProcessor interface handles email operations for a third-party email service, including sending emails and updating the tracking status in Salesforce. You can add additional implementations for different email service providers.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package. |
Namespace
lsc4ce
Typed
Strongly typed
Signature
| Access | Signature |
|---|---|
| global | |
| global | |
| global | |
| global | |
| global | |
| global | |
| global | |
| global | |
| global | |
Methods
| Method | Description |
|---|---|
| initialize(List<LifeScienceEmail> records) | Initializes resources and setup for the third-party email service and prepares to process Life Science Email records. |
| setParameters(Map<String, Object> parameters) | Configures required parameters for the email processor, and stores API credentials, configuration, and connection parameters. |
| addMessage(LifeScienceEmail lScEmail) | Converts a Life Science Email record to the third-party service’s format
and validates the email before adding it to the queue. Returns
true if successful. |
| exceededLimits() | Checks if the current email batch size will exceed limits for the
third-party service. Returns true if the batch size
will exceed limits. |
| canExceedLimits(Integer emails) | Checks if sending the specified number of emails will exceed email
sending limits. Returns true if sending will exceed
limits. |
| sendEmail() | Send the queued emails through the third-party service and return a list of error messages. Returns a null value if the email is sent successfully. |
| cleanUp(List<LifeScienceEmail> emails) | Updates the status of processed Life Science Email records. |
| updateAttemptStatus(List<LifeScienceEmail> emailAttemptsToProcess) | Updates Life Science Email records with the status of email attempts from the third-party service. |
| finish() | Closes the connection to the third-party email service. |
Example Implementation
Did this article solve your issue?
Let us know so we can improve!
