Skip to main content

Dynamic Content Emails Via the API

Introduction

The Conversation::sendEmail method in the Paminga API may be used to send emails that merge arbitrary content, including HTML, directly into any Email that exists in your Paminga account.


This allows the layout and look of the email to be controlled within the Paminga platform by members of your marketing team, while the triggering of the email, and the dynamic content therein, is controlled by your I.T. team and the systems they manage.


Example use cases include welcome emails, transaction & shipping confirmations, and shopping cart abandonment.

How To Send Dynamic Content Emails via the API

To take advantage of this capability, you’ll need to use special merge tags in your email template and pass corresponding data in your API call.
For example, to dynamically insert a username and password into your email, you would place the following merge tags at the location in your email where you’d like the username and password to appear:

{MERGE_DATA:USERNAME|unknown}
{MERGE_DATA:PASSWORD|unknown}

This is very similar to using Personalized Field merge tags like first name, which look like this:

{FIRST NAME|Valued Customer}

In the case of the First Name field, Paminga will inject the Contact’s First Name, as stored in Paminga, wherever this tag is found in your email. If the prospect’s first name is blank, Paminga will inject the default value, Valued Customer which comes after the pipe, the vertical line character that separates the field name from its default value.


In the case of our username and password, Paminga will merge in the values passed in the API call, and inject the default value unknown if you were to pass a null value for either username or password.


The important capability offered by this technique is the ability to merge values into your email that are not necessarily stored in Paminga at all.

An Example

To inject the correct values in place of these merge tags, you will need to pass a JSON object formatted per the example below to the Conversation:: sendEmail method.

{
"id": "5a9ec21d29487",
"method": "sendEmail",
"jsonrpc": "2.0",
"params": {
"email_id": 12345,
"contact_id": 123456789,
"options": {
"override": {
"merge_data": {
"username": "user@domain.com",
"password": "123456"
}
}
}
}
};

This method relies on the use of the options property in the params object that you pass in JSON format when calling the method.


The override property allows you to pass values that potentially override any stored in Paminga. Values passed in this JSON object are not stored on the corresponding Contact in Paminga. They are simply merged into your email template before sending.


Questions? Please call or email your Customer Success Team!

Product

How it WorksPricingFAQDocumentationMarketo Alternative
Paminga Logo

Built with pride in Denver, Colorado, USA

Copyright © Paminga 2024
All rights reserved. Various trademarks held by their respective owners.