iDialogue Email API
This article defines the iDialogue Application Programming Interface (API) for use in merge tags, tracking, Opt In/Out, and handling email-related platform events in Salesforce flows.
API sections:
- Merge Tags
- API Endpoints
- Platform Events
Merge Tags
Standard Email Merge Tags
Salesforce standard email merge tags include:
Merge Tag Syntax | Description |
---|---|
{{{Recipient.FieldName}}} | The Lead or Contact record |
{{{Sender.FieldName}}} | The Salesforce User / Sender |
{{{Organization.FieldName}}} | The Salesforce Org |
{{{RelatedEntity.FieldName}}} | Any Salesforce standard or custom object. For quote emails, this is typically an Opportunity. |
iDialogue merge tag extensions include:
Merge Tag Syntax | Description |
---|---|
[[Body]] | The personalized message body provided by a Salesforce user from the rooms component invite flow. |
[[Room.URL]] | The recipients personalized link to direct response rooms. For use in call-to-action buttons and links. |
[[Room.Link]] | Same as above. |
[[Room.Attachments]] | Renders all room items as inline attachments in place of the tag location. |
[[Room.Id]] | 18-character unique ID for email response room. |
[[Room.FieldAPIName]] | Merges field values directly from roomsDocumentRoomc records. |
[[Member.URL]] | Same as Room.URL. |
[[Member.Link]] | Same as Room.Link. |
[[Member.FieldAPIName]] | Merges field values directly from roomsDocumentRoomMemberc records. |
FAQ
Question: Why do the iDialogue extensions use square brackets [[]] for merge tags?
Answer: Salesforce throws exceptions when unknown entities are surounded by the native handlebar {{{ }}} tags. When delivering emails via iDialogue rooms component, iDialogue separately uses Salesforce native rendering plus the iDialogue extensions to merge multiple data sources in one email.
Question: When inviting multiple members to room, does each member receive a unique email?
Answer: Yes, each email is rendered separately. Each member receives a unique, personalized room URL.
API Endpoints
Pasting the following links and images into email templates will make real-time callouts to the iDialogue API for use in creating interactive emails and raising platform events in Salesforce.
Email Open / Delivery
Use this endpoint to track email opened events.
Unsubscribe / Opt-Out
Adding this link to emails will raise an EMAIL_OPT_OUT platform event in Salesforce for use in updating opt-out policies and flows.
Note that B2B emails or transactional emails, such as sending quotes, generally do not require an opt-out link. Instead, update the terms section of the example email template with “one time delivery” verbiage.
Platform Events
See iDialogue Platform Events for complete details.
Platform Event Type | Description |
---|---|
MEMBER_INVITE | Raised when a room member is invited to a room. |
EMAIL_SENT | Raised when an iDialogue email is sent. |
EMAIL_OPT_IN | Raised when a Lead, Contact, or CampaignMember opts in to receive emails for a campaign. |
EMAIL_OPT_OUT | Raised when a Lead, Contact, or CampaignMember opts out or unsubscribes from an email. |
EMAIL_OPENED | Raised when an email is opened / viewed (based on /delivery endpoint GET request above) |