SAP Open Connectors

Microsoft Dynamics CRM - How to Create and Associate an Email Activity to a Contact

To create the activity object, first POST to the appropriate activity type. In this example, it is email. The following POST works:

POST /{objectName} where objectName=email
{
"attributes":{
"activitytypecode":"email",
"description":"EMAIL BODY!!!"
}
}

Then, to create the association to the contact, execute a PATCH /contacts/{id} with the following json body:

{ "action": "associate", "association": { "entity": "email", "id": "bf027250-a2b5-e611-80e4-c4346bacaac0", "associationName": "Contact_Emails" } }