4

I've found a similar question, but I could not find any real solutions for the issue.

We have a DataExtension with the following attributes:

"ID"                   Number
"Email"                EmailAddress  254
"LanguageID"           Locale          5
"Unsubscribed"         Boolean
"Promotion code sent"  Boolean
"T_OptedIn"            Boolean

I've inserted the following row to the DataExtension:

"ID"                   "415111"
"Email"                "sampleEmail@somedomain.com"
"LanguageID"           "hu-HU"
"Unsubscribed"         "False"
"Promotion code sent"  "False"
"T_OptedIn"            "False"

In the contact builder we've made a link "ContactKey to Email". Contact and DataExtension link

The reference states "The request must include at least one of the attribute sets to create a new contact" and "Email Addresses (You must also include this attribute set if you include Email Demographics)"

I've assembled the following JSON:

{
    "contactKey": "sampleEmail@somedomain.com",
    "attributeSets": [{
        "name": "Email Addresses",
        "items": [{
            "values": [{
                "name": "Email Address",
                "value": "sampleEmail@somedomain.com"
            },
            {
                "name": "HTML Enabled",
                "value": true
            }]
        }]
    }]
}

I've managed to successfully get a access token for our ClientId/ClientSecret key pair.

Then assembled this CURL command:

curl -X POST --header "Content-Type:application/json" --header "Authorization: Bearer {{MY_TOKEN}}" -d "{\"contactKey\":\"sampleEmail@somedomain.com\",\"attributeSets\":[{\"name\":\"Email Addresses\",\"items\":[{\"values\":[{\"name\":\"Email Address\",\"value\":\"sampleEmail@somedomain.com\"},{\"name\":\"HTML Enabled\",\"value\":"true"}]}]}]}" "https://www.exacttargetapis.com/contacts/v1/contacts"

Host: https://www.exacttargetapis.com
POST /contacts/v1/contacts
Content-Type: application/json
Authorization: Bearer {{MY_TOKEN}}

{
    "contactKey": "sampleEmail@somedomain.com",
    "attributeSets": [{
        "name": "Email Addresses",
        "items": [{
            "values": [{
                "name": "Email Address",
                "value": "sampleEmail@somedomain.com"
            },
            {
                "name": "HTML Enabled",
                "value": true
            }]
        }]
    }]
}

And this was the response:

{
  "operationStatus": "FAIL",
  "rowsAffected": 0,
  "requestServiceMessageID": "36f006b9-c6e0-4d8f-8907-e8ef785f0a9f",
  hasErrors": true,
  "resultMessages": [{
      "formatStringParams": [
        "ValueDefinition",
        null,
        null,
        "HTML Enabled"
      ],
      "messageFormatString": "Unable to resolve schema element of type: {0} by reference. [Id: {1}, Key: {2}, Name: {3}]",
      "resultType": "Validation",
      "resultClass": "Error",
      "resultCode": "SchemaObjectNotFoundByReference",
      "message": "Unable to resolve schema element of type: ValueDefinition by reference. [Id: , Key: , Name: HTML Enabled]"
    }],
  "serviceMessageID": "b1c2fbe6-1a95-4802-b838-1ff817ea08eb"
}

Also, here is the DataAccess for our API Integration Data Access

I really hope there is a solution to this issue.

  • 1
    How bizarre. This should work. I've tried your request payload and it works fine for me. I would suggest opening a support case as it appears this is an account related issue. – Eliot Harper Apr 24 '17 at 1:25
  • Since we do not have premier support, they could not provide me any helpful information. The only answer I got was "This is a development issue, please get premier support". Not so helpful. So this is still an open question if anyone has ever came across such an error. – Laszlo May 3 '17 at 21:45
  • 1
    This is ridiculous. There is nothing wrong with your code. This appears to be an account provisioning issue. I would escalate this to your Account Manager. – Eliot Harper May 4 '17 at 2:05
  • 2
    Please contact support and ask them to provide the applog error. This is the error which gets generated on the backend. Based on the error provided by the support you can get this case escalated. – Chandan May 15 '17 at 0:50
  • did you ever figure this out? I am having this problem as well..same error: salesforce.stackexchange.com/questions/204834/… – Ronnie Jan 16 '18 at 18:52
0

We had some problem with the attribute "HTML Enabled" when importing contacts via import file wizard. May be the same solution will work here.

Instead of this { "name": "HTML Enabled", "value": true }]

Can you try using this, { "name": "HTML Enabled", "value": "HTML" }]

or { "name": "HTML Email", "value": "HTML" }]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.