Merge members into a profile list and trigger email messages to them

Use the following interface to merge members into a profile list and subsequently send them an email message.

REQUEST NOTES:

  • You can send Responsys Email campaigns that already exist to up to 200 members of a profile list.
  • For the list associated with the specified Email campaign, you must specify an array of record data that contain field names and their corresponding field values.
  • Do not use system column names for the optional data, such as EMAIL_ADDRESS_. This may cause incorrect data to be processed, possibly resulting in skipped records and incorrect data being recorded in the Event table.
  • To pass extended/accented characters in optionalData payload, they must be escaped as Unicode characters. For example, the euro symbol € is escaped as \u20AC, the yen symbol ¥ is escaped as \u00A5, an ü is escaped as \u00FC, an é is escaped as \u00E9, and the like. Otherwise, you may receive an INVALID_REQUEST_CONTENT error.
  • This API supports hashed emails (MD5 and SHA256) when the request parameter insertOnNoMatch is set as false. In other words, inserting a new record is not allowed using email hash as a match column.

Please see the definition of merge rule parameters provided in Definitions of Rule Parameters for Merging Members into a Profile List.

Service URL:

/rest/api/v1.3/campaigns/{campaignName}/email

Required Path Parameter:

campaignName

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Sample Request Body:

{
   "mergeTriggerRecordData":{
      "mergeTriggerRecords":[
         {
            "fieldValues":[ 
               "mdi1234@foobar.com",
               "martiness"
            ],
            "optionalData":[
               { "name":"FIRST_NAME", "value":"jim_1" },
               { "name":"LAST_NAME", "value":"smith_1" }
            ]
         },
         {
            "fieldValues":[ 
               "mdi.1234@foobarcorp.com",
               "concord"
            ],
            "optionalData":[
               { "name":"FIRST_NAME", "value":"jim_2" },
               { "name":"LAST_NAME", "value":"smith_2" }
            ]
         }
      ],
      "fieldNames":[
         "EMAIL_ADDRESS_",
         "CITY_"
      ]
   },
   "mergeRule": { 
      "htmlValue":"H",
      "matchColumnName1":"EMAIL_ADDRESS_",
      "matchColumnName2":null,
      "optoutValue":"O",
      "insertOnNoMatch":true,
      "defaultPermissionStatus":"OPTIN",
      "rejectRecordIfChannelEmpty":"E",
      "optinValue":"I",
      "updateOnMatch":"REPLACE_ALL",
      "textValue":"T",
      "matchOperator":"NONE" 
   }
}

Sample Response:

The response returns a status for each record sent in the request. In this example, the first record was successfully merged and the email was sent to the recipient whose RIID is 72067. The second record was successfully merged, but the email was undeliverable.

[
  {
    "errorMessage": null,
    "success": true,
    "recipientId": 72067
  },
  {
    "errorMessage": ”RECIPIENT_STATUS_UNDELIVERABLE: Recipientdeliverabilitystatusisundeliverable”,
    "success": false,
    "recipientId": -1
  }
]