Dynamic Email Dispatch
Published on February 10, 2026 DRTE
Feature Overview: Send Dynamic Email
The Send Dynamic Email feature is a Flow-based extension of the DRTE (Dynamic Rich Text Editor) that bridges static email templates and live Salesforce data. It enables users to:
- Select a pre-configured DRTE Rich Text/HTML template.
- Generate real-time data tables or lists via SOQL queries.
- Personalize the content in a WYSIWYG editor before sending.
- Auto-Log the communication to the Salesforce Activity Timeline.
| Who is this for? Salesforce admins configuring the feature (Configuration Guide) and end users sending dynamic emails from a record (User Workflow). |
Configuration Guide (Admin)
1. The Object Action
To make the feature accessible, create a record-level action:
- Location: Object Manager > [Your Object] > Buttons, Links, and Actions.
- Action Type: Flow.
- Flow Name: Send_Dynamic_Email (provided by the extension).
- Label: Custom (e.g., Send Report, Email Briefing, Client Update).
Figure 1: Creating the Flow action on the object.
2. Template Definition (Rich Text Button / Doc Template)
The core of the logic lives in the Template record.
- Category: Map this to the Object API Name (e.g., Account, Lead, Custom_Object__c).
- Is Email Template: Must be checked to appear in the email flow.
- Test SFDC Record Id: Use a valid ID to preview data during configuration.
Figure 2: Template record settings.
3. Data Integration (Dynamic Tables)
Create a document section of Table type with a SOQL Query. Instead of manual entry, use the Dynamic Table Configuration Builder:
- SOQL Query: Define which child records or related data to pull.
- Example: SELECT Name, Amount, StageName FROM Opportunity WHERE AccountId = :recordId
- Column Builder: Assign labels and formatting (Currency, Date, etc.) to the query results.
- JSON Integration: The builder generates the logic required to render this table inside the email body automatically.
Figure 3: Dynamic Table Configuration Builder.
Use Case Gallery
The flexibility of the DRTE extension allows for various applications beyond simple briefings:
| Use Case | Data Source (SOQL) | Target Audience |
| Project Status | Milestones__c & Tasks__c | Stakeholders / Clients |
| Collections/Invoicing | Invoices__c where Status = 'Overdue' | Finance Contacts |
| Onboarding Checklist | Requirements__c where Completed = False | New Customers |
| Case Summary | Cases related to an Account | Success Managers |
User Workflow
Step 1: Initialize
The user clicks the custom button (e.g., Send Dynamic Briefing) on any record. This passes the recordId into the engine.
Figure 4: Launching the action from a record.
Step 2: Template Selection
The user chooses from a list of templates filtered by the current object. This ensures the user only sees relevant email formats.
Figure 5: Template list filtered by object.
Step 3: Real-Time Preview & Edit
The engine executes the SOQL queries and renders the document sections dynamically. The user can:
- Search and select a contact from the system to send the email to.
- Add a personalized introduction.
- Format text using the rich text toolbar (Bold, Colors, Links).
Figure 6: Recipient selection and personalization.
Figure 7: Real-time rendered preview with dynamic data.
Step 4: Dispatch & Log
Upon clicking Send Email Now, the extension:
- Sends the email via the Salesforce platform.
- Creates an Email Message and Task record.
- Attaches the final HTML content to the record's Activity History for future reference and compliance.
Figure 8: Sending the email.
Figure 9: Email logged to Activity History.
| Success: The email is delivered and a complete copy is stored on the record's Activity Timeline. |
💡 Best Practices
| Dynamic Filters: Always use :recordId in your SOQL queries within the Template Builder to ensure data is context-specific. |
| Branding: Use the HTML section of the template to include company logos and standard signatures. |
| Testing: Use the Test SFDC Record Id field on the Template record to verify that your SOQL query returns the expected data before deploying to users. |
Knowledge Article Number: KA-00116