Salesforce - Multi-Record Email Composer
Salesforce - Multi-Record Email Composer
Problem: Creating personalized emails becomes repetitive when users need to contact several people about several related Salesforce records. Each recipient-record combination can produce different merge-field values, making it difficult to verify the final messages, manage attachments, and preserve CRM activity context before sending.
Solution: Built a configurable Lightning email composer that lets users select multiple recipients and related records, apply Salesforce Email Templates, edit rich-text content, attach Salesforce Files, and review every compiled message before sending.
Impact: Consolidated message composition, personalization, attachment selection, preview, delivery, and activity logging into one Lightning workflow. This reduces repetitive copying, helps users catch incorrect merge context before delivery, and preserves sent-email visibility on Contact records.
Key features
- Multi-record composition Selects multiple recipients and related Salesforce records using removable record pills.
- Recipient-record pairing Generates a separately personalized email for every recipient and related-record combination.
- Compiled message review Displays the resolved subject and body for each combination before anything is sent.
- Dynamic merge fields Resolves Recipient, Sender, Organization, and related-record fields, including supported relationship paths such as account information.
- Salesforce Email Templates Loads active templates and applies their subject and HTML or plain-text content inside the composer.
- Rich-text authoring Allows users to revise the subject and formatted message after selecting a template.
- Salesforce Files integration Supports searching existing files, browsing libraries, uploading new files, and attaching multiple files to the generated emails.
- Contact activity history Records emails sent to Contacts in their Salesforce Activity timeline and associates them with the applicable related record.
- Configurable Lightning component Lets administrators configure recipient objects, related objects, email fields, and HTML handling through Lightning App Builder.
- Native Salesforce delivery Sends messages through Salesforce's standard email services without requiring an external email provider.
- Security and validation Validates merge paths and record access, queries personalization data in user context, and places limits on excessive message combinations.
I built the Lightning Web Component interface, compiled-review experience, attachment picker, and Apex service layer responsible for template retrieval, secure merge-field resolution, recipient-record combination generation, Salesforce Files handling, send validation, native email delivery, and Contact activity logging.
Privacy note: The portfolio preview uses recreated Contacts, Opportunities, email templates, addresses, and files. No client records, customer information, or proprietary email content is shown.