Merge members into a profile list & trigger email messages to them (HA Async Merge Trigger Email)

Use this interface to merge members into a profile list and subsequently send them an email message. This endpoint can be used for triggering both transactional and promotional emails. However, promotional emails will fail on the secondary account during failover. Both merging members and the email trigger will fail.

Service URL:

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

NOTE: For this request, ensure that your path uses haAsyncApi instead of haApi. The haAsyncApi part of the path is case sensitive.

Required Path Parameters:

campaignName - Name of the Email campaign to be sent to the recipients.

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Request Body Properties:

mergeTriggerRecordData – Record data that represents Field Names and Values for the recipient. For more information, see the standard Merge Trigger Email request example.

mergeRule – Merge rule used to merge recipient records in a Profile List. Only used during the merge operation. For more information, see the standard Merge Trigger Email request example.

Sample Request Body:

{
    "mergeTriggerRecordData": {
        "mergeTriggerRecords": [{
                "fieldValues": [
                    "mdi1234@foobar.com",
                    "martiness",
                    "6505551212",
                    "US"
                ],
                "optionalData": [{
                        "name": "FIRST_NAME",
                        "value": "jim_1"
                    },
                    {
                        "name": "LAST_NAME",
                        "value": "smith_1"
                    }
                ]
  
            },
            {
                "fieldValues": [
                    "mdi.1234@foobarcorp.com",
                    "concord",
                    "6505551212",
                    "US"
                ],
                "optionalData": [{
                        "name": "FIRST_NAME",
                        "value": "jim_2"
                    },
                    {
                        "name": "LAST_NAME",
                        "value": "smith_2"
                    }
                ]
  
            }
        ],
        "fieldNames": [
            "EMAIL_ADDRESS_",
            "CITY_",
            "MOBILE_NUMBER_",
            "MOBILE_COUNTRY_"
        ]
    },
    "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:

NOTES:

{
  "requestId": "aWpDUHozOjoxNTU4NTQyMTI1",
  "apiName": "HaAsyncMergeTriggerEmail",
  "status": "REQUEST_ACCEPTED",
  "links": [
    {
      "rel": "self",
      "href": "/rest/haAsyncApi/v1.3/campaigns/campTest/email",
      "method": "POST"
    },
    {
      "rel": "asyncResponse",
      "href": "/rest/haAsyncApi/v1.3/requests/aWpDUHozOjoxNTU4NTQyMTI1",
      "method": "GET"
    }
  ]
}

Learn more

Merge members into a profile list & trigger email messages to them (HA Merge Trigger Email)

Common error responses for the Asynchronous API