Creating an engagement after a company throws an internal service error
SOLVE
Immediately after creating a company I am trying to create an engagement tied to that company for our sales team. When creating the engagement an internal service error is returned. When I use the same timestamp and companyId in postman right after seeing the failure it succeeds. Here is the string I am sending in Java:
"{\"engagement\": {" + "\"active\": true," + "\"ownerId\": 38143121," + "\"type\": \"TASK\"," + "\"timestamp\": " + date.getTime() + "}," + "\"associations\": {" + "\"contactIds\": []," + "\"companyIds\": [" + companyId + "]," + "\"dealIds\": []," + "\"ownerIds\": [38143121]" + "}," + "\"attachments\": []," + "\"metadata\": {" + "\"body\": \"Merge the deal for this company into this site.\"," + "\"subject\": \"Merge the deal into this site\"," + "\"status\": \"NOT_STARTED\"," + "\"forObjectType\": \"COMPANY\"" + "}" + "}";