Dynamic Email Dispatch
Feature Overview: Send Dynamic Email
The Send Dynamic Email feature is a Flow-based extension that enables users to:
- Select a pre-configured DRTE Rich Text/HTML template.
- DRTE Generate real-time data tables or lists via SOQL queries.
- Personalize the content in a "What You See Is What You Get" (WYSIWYG) editor before sending.
- Auto-Log the communication to the Salesforce Activity Timeline.
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).
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.
3. Data Integration (Dynamic Tables)
Create a document section of Table type with 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.
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.
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.
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 email to.
- Add a personalized introduction.
- Format text using the rich text toolbar (Bold, Colors, Links).
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.
💡 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.