3

I am currently trying to insert a new 'Log a Call' task for accounts / contacts using the REST API.

I have the information I require from the calls in an SQL database table including the accountId/contactId.

There are approximately 100 calls per day which I need to add every 30 minutes (20 at a time max).

I would prefer to add these via the REST API for ease of use (it fits alongside a current REST API implementation).

If I iterate over the records, is it possible to do the insert in this fashion?

4

Yes, you can use the REST API to insert tasks for account. The REST api only supports actions on individual records, if you want to use one call for multiple records you'll need to use the BULK API. Whether being inefficient and doing one call per record matters has to do with how many API calls your organizations has available. Large organizations with unlimited edition rarely have issues, but smaller organizations can hit the 1K/day/user limit (assuming enterprise license) much quicker.

As @theGreatDanton points out. You also have the option of creating your own REST webservice which you can build out your logic to insert multiple records in one call.

4
  • Just add to the answer one more option is to create a class annotated with @restResource which will have all the logic to process request and insert the records, call this service in the REST url.. This will allow inserting multiple records in one call.
    – Sam
    Jul 19 '13 at 4:30
  • Perfect thank you. Just to confirm, the 'Log a Call' activity is added via the Tasks object? Then to link it to a specific Account you use WhatID, and for Contacts the WhoID? Jul 22 '13 at 19:02
  • That's correct. Log a call also defaults the status to Completed and may also set the type to Call. You should be able to outline that behavior with some quick tests. Jul 22 '13 at 22:15
  • what exactly is rest api end for logging call?
    – N Nem
    Aug 9 '18 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.