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

Responsys can send personalized SMS messages to mobile phone numbers.

REQUEST NOTES:

  • Responsys SMS campaigns can be sent to up to 200 members of a profile list.
  • 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.
  • The endpoint will validate whether the mobile number format is E.164. The endpoint will behave differently depending on the format:
    • When the mobile number format is E.164:
      • Records are merged based on the validations for the number.
      • Records are merged with valid corresponding code based on the mobile number given, even if there is no valid country code passed in the payload.
      • Records are skipped when the country is not served by the code used for the campaign.
    • When the mobile format is not E.164:
      • Records are merged as given in the payload irrespective of invalid mobile numbers or mobile country codes.
      • Records are triggered based on the country code irrespective of the mobile numbers.
      • Records are skipped when there is no mobile country code.
      • Records are skipped when the country is not served by the country code used for the campaign.

Service URL:

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

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",
                      "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:

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

[
  {
    "errorMessage": null,
    "success": true,
    "recipientId": 72067
  },
  {
    "errorMessage": "RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable",
    "success": false,
    "recipientId": -1
  }
]

Sample Response in case of failure

Campaign is invalid. If an incorrect campaign template is specified, the response resembles:

{
  "type": "",
  "title": "Not a valid campaign",
  "errorCode": "CAMPAIGN_IS_INVALID",
  "detail": "Campaign is invalid or inactive",
  "errorDetails": []
}

Invalid country code. Requests fail if the country code provided for an E.164 requets is not valid. Error resembles:

{
  "type":"",
  "title":"Invalid request parameters",
  "errorCode":"INVALID_PARAMETER",
  "detail":"Record 0 = Invalid Mobile Number Format.\r\n",
  "errorDetails":[]
}