{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/responsys/json-schema/responsys-merge-trigger-email-schema.json",
  "title": "Merge Trigger Email",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/responsys-merge-trigger-email-api-openapi.yml#/components/schemas/mergeTriggerEmail",
  "type": "object",
  "properties": {
    "mergeTriggerRecordData": {
      "description": "Record data that represents Field Names and corresponding values for the recipient.",
      "required": [
        "mergeTriggerRecords",
        "fieldNames"
      ],
      "type": "object",
      "properties": {
        "mergeTriggerRecords": {
          "type": "array",
          "description": "Array of values corresponding to the fieldNames. Each element in the array represents a single recipient.",
          "items": {
            "type": "object",
            "properties": {
              "fieldValues": {
                "type": "array",
                "description": "Values corresponding to the fieldNames.",
                "items": {
                  "type": "string"
                }
              },
              "optionalData": {
                "type": "array",
                "description": "Optional data containing array of name value pairs.",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "fieldNames": {
          "type": "array",
          "description": "Field Names in the Profile List",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "mergeRule": {
      "description": "Merge rule used to merge recipient records in a Profile List. Only used during the merge operation.",
      "type": "object",
      "properties": {
        "rejectRecordIfChannelEmpty": {
          "type": "string",
          "description": "String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. Channel codes are 'E' (Email), 'M' (Mobile), 'P' (Postal Code). For example 'E,M' would indicate that a record that has a null for Email or Mobile Number value should be rejected. This parameter can also be set to null or to an empty string, which will cause the validation to not be performed for any channel, except if the matchColumnName1 parameter is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_. When matchColumnName1 is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_, then the null or empty string setting is effectively ignored for that channel."
        },
        "htmlValue": {
          "type": "string",
          "description": "Value of incoming preferred email format data. For example, 'H' may represent a preference for HTML formatted email."
        },
        "textValue": {
          "type": "string",
          "description": "Value of incoming preferred email format data. For example, 'T' may represent a preference for Text formatted email."
        },
        "matchColumnName1": {
          "enum": [
            "RIID_",
            "CUSTOMER_ID_",
            "EMAIL_ADDRESS_",
            "MOBILE_NUMBER_",
            "EMAIL_MD5_HASH_",
            "EMAIL_SHA256_HASH_"
          ],
          "type": "string",
          "description": "First match column for determining whether an insert or update should occur."
        },
        "insertOnNoMatch": {
          "type": "boolean",
          "description": "Indicates what should be done for records where a match is not found (true = insert / false = no insert)."
        },
        "optinValue": {
          "type": "string",
          "description": "Value of incoming opt-in status data that represents an opt-in status. For example, 'I' may represent an opt-in status."
        },
        "defaultPermissionStatus": {
          "enum": [
            "OPTIN",
            "OPTOUT"
          ],
          "type": "string",
          "description": "This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified, then it is set to OPTOUT."
        },
        "optoutValue": {
          "type": "string",
          "description": "Value of incoming opt-out status data that represents an optout status. For example, '0' may represent an opt-out status."
        },
        "matchColumnName2": {
          "enum": [
            "RIID_",
            "CUSTOMER_ID_",
            "EMAIL_ADDRESS_",
            "MOBILE_NUMBER_",
            "EMAIL_MD5_HASH_",
            "EMAIL_SHA256_HASH_"
          ],
          "type": "string",
          "description": "Second match column for determining whether an insert or update should occur. (optional)."
        },
        "updateOnMatch": {
          "enum": [
            "REPLACE_ALL",
            "NO_UPDATE"
          ],
          "type": "string",
          "description": "Controls how the existing record should be updated."
        },
        "matchOperator": {
          "enum": [
            "NONE",
            "AND"
          ],
          "type": "string",
          "description": "Operator to join match column names"
        }
      }
    }
  },
  "required": [
    "mergeTriggerRecordData",
    "mergeRule"
  ]
}