I am trying to "log a call" in salesforce using REST API. Is it possible to do it with REST API and what is the exact end point?
Thanks
Inspect what's done in UI, check the ID of the generated record, then try to replicate it. From what I remember "log a call" action creates a completed Task record. Does the ID start with "00T"? http://www.fishofprey.com/2011/09/obscure-salesforce-object-key-prefixes.html
So inserting a Task should get you close enough.
POST to https://MyDomainName.my.salesforce.com/services/data/v55.0/sobjects/Task/
with headers
Authorization: Bearer <session id goes here>
Content-Type: application/json
and body
{
"Subject": "Sample call",
"Type": "Call",
"TaskSubtype" : "Call",
"CallType" : "Outbound",
"Status" : "Closed",
"WhoId" : "003... put contact id here?"
}
Should be good start. https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_task.htm is decent info although your org might need more (record types? required fields? different picklist values?)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.