{“engagement”:{“active”:true,“type”:“EMAIL”},“metadata”:{“from”:{“email”:“support@domain.co.uk”,“firstName”:“First”,“lastName”:“Last”},“to”:{“email”:“user@domain.co.uk”},“cc”:"",“bcc”:"",“subject”:“This is the subject of the email”,“html”:“This is the body of the email”,“text”:“This is the body of the email”}}
I think I have it working and now the post is responding with the following rather than an error:
{“engagement”:{“id”:xxxxxx,“portalId”:xxxxxx,“active”:true,“createdAt”:1491317239185,“lastUpdated”:1491317239185,“type”:“EMAIL”,“timestamp”:1491317239185},“metadata”:{“from”:{“email”:“email@xxxxxx.co.uk”,“firstName”:“First”,“lastName”:“Last”},“to”:[{“email”:“contact@xxxx.co.uk”}],“cc”:[],“bcc”:[],“subject”:“This is the subject of the email”,“html”:“This is the body of the email”,“text”:“This is the body of the email”}}
But I don’t see it appearing in the dashboard against the “to” contact. Why is that?
I am assuming ‘engagements’ should be found in the ‘activities’ timeline.
I would make sure your JSON is formatted correctly. It looks like your “to” is an object and not an array for starters. That might be part of the problem.
"metadata": {
"from": {
"email": "email@domain.com",
"firstName": "First",
"lastName": "Last"
},
"to": [
{
"email": "contact name <test@test.com>"
}
],
"cc": [],
"bcc": [],
"subject": "This is the subject of the email",
"html": "<div>This is the body of the email</div><div><br></div><div>-Me</div>",
"text": "This is the body of the email\n\n-Me"
}