Skip to content

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 SyntaxDescription
{{{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 SyntaxDescription
[[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.

<img src="https://api.i-dialogue.com/v1/orgs/{{{Organization.Id}}}/rooms/[[Room.Id]]/members/[[Member.Id]]/delivery" alt="iDialogue Logo" />

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.

<a href="https://api.i-dialogue.com/v1/orgs/{{{Organization.Id}}}/recipients/{{Recipient.Id}}">Unsubscribe</a>

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 TypeDescription
MEMBER_INVITERaised when a room member is invited to a room.
EMAIL_SENTRaised when an iDialogue email is sent.
EMAIL_OPT_INRaised when a Lead, Contact, or CampaignMember opts in to receive emails for a campaign.
EMAIL_OPT_OUTRaised when a Lead, Contact, or CampaignMember opts out or unsubscribes from an email.
EMAIL_OPENEDRaised when an email is opened / viewed (based on /delivery endpoint GET request above)