APIs & Integrations

pocketexpert
Member

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\"" +
"}" +
"}";

 

Any advice would be appreciated.

0 Upvotes
1 Accepted solution
pocketexpert
Solution
Member

Creating an engagement after a company throws an internal service error

SOLVE

Nevermind i got it, I was parsing the companyId incorrectly.

View solution in original post

1 Reply 1
pocketexpert
Solution
Member

Creating an engagement after a company throws an internal service error

SOLVE

Nevermind i got it, I was parsing the companyId incorrectly.