FLOW_SendEmail.DTO_Request
Class
global inherited sharing class FLOW_SendEmail.DTO_RequestData Transfer Object (DTO) representing the input parameters for a single email request.
Since: 1.0
Fields
| Field | Description |
|---|---|
| global List fileIds | A list of ContentVersion IDs to attach to the email. |
| global List mergeFields | A list of custom key-value pairs to replace placeholders in the email body (e.g., [InvoiceNumber]). |
| global String orgWideEmailAddress | The email address defined in Organization-Wide Email Addresses to be used as the sender. |
| global Boolean saveAsActivity | Determines if a Task should be created. |
| global String templateUniqueName | The DeveloperName of the Email Template. |
| global String toAddress | The recipient. |
| global Boolean useStandardLogActivity | Controls the mechanism used for Activity Logging. |
| global Id whatId | The ID of the record that the email is related to (e.g., Opportunity, Case). |
Field Details
fileIds
@InvocableVariable(required=false description='A list of ContentVersion or Document Ids to attach as files to the email.' label='List of File Ids for Attachments') global List<Id> fileIdsType: List
A list of ContentVersion IDs to attach to the email.
Since: 1.0
mergeFields
@InvocableVariable(required=false description='List of name-value pairs for custom merge fields to replace in the email body. Placeholders must be in the format [mergefieldname].' label='Custom Merge Fields') global List<DTO_NameValue> mergeFieldsType: List
A list of custom key-value pairs to replace placeholders in the email body (e.g., [InvoiceNumber]).
Since: 1.0
orgWideEmailAddress
@InvocableVariable(required=true description='The org-wide email address to be used as the sender (From address).' label='Sender Org Wide Email Address') global String orgWideEmailAddressType: String
The email address defined in Organization-Wide Email Addresses to be used as the sender.
Since: 1.0
saveAsActivity
@InvocableVariable(description='Indicates if an activity (Task) should be logged against the Related To Id (WhatId). Ignored if Related To Id is null.' label='Save as Activity') global Boolean saveAsActivityType: Boolean
Determines if a Task should be created. Note: This is ignored if whatId is null or if useStandardLogActivity is enabled (which handles logging natively).
Since: 1.0
templateUniqueName
@InvocableVariable(required=true description='The unique name (DeveloperName) of the email template to generate the email content.' label='Email Template Unique Name') global String templateUniqueNameType: String
The DeveloperName of the Email Template.
Since: 1.0
toAddress
@InvocableVariable(required=false description='The Id of the Contact, Lead, or User, or the recipient email address. Used to resolve "TargetObjectId".' label='To Address or Target WhoId') global String toAddressType: String
The recipient. Can be a standard Email Address or the Salesforce ID of a Contact, Lead, or User.
Since: 1.0
useStandardLogActivity
@InvocableVariable(description='If True, standard activity logging is used. If False, custom activity logging is performed via the internal Flow.' label='Use Standard Activity Logging') global Boolean useStandardLogActivityType: Boolean
Controls the mechanism used for Activity Logging.
true: Uses standard Messaging.SingleEmailMessage activity logging (counts towards limits).
false: Uses a custom Task insertion approach (via Workflow Engine/Flow).
Since: 1.0
whatId
@InvocableVariable(required=true description='The Id of a record related to the email for merge field data (WhatId).' label='Related To WhatId') global Id whatIdType: Id
The ID of the record that the email is related to (e.g., Opportunity, Case). Used for merge fields.
Since: 1.0