6

The SOAP API seems to expose the EmailMessage sobject which would allow for downloading details of emails sent through Salesforce.

I do not seem to be able to access this based on the sobject data returned by the REST API.

Any idea if this is likely to be included in the REST API?

What are my options?

Would SOAP be the only way to access it?

3
  • Could you create a custom REST endpoint in Apex and deliver it that way?
    – joshbirk
    Jan 31, 2013 at 16:50
  • This is for a plugin for an open-source email client designed to be used by any user with API access (not just a specific organisation) so would that be an option?
    – leighman
    Feb 2, 2013 at 22:00
  • Any user with API access should be able to access an Apex REST endpoint. Only if the org didn't support Apex, basically, would I think there would be a problem.
    – joshbirk
    Feb 6, 2013 at 18:56

2 Answers 2

4

EmailMessage is in fact not accessible over the SOAP API either.

Emails via Salesforce are stored in the Task object so you can select from that where Subject begins with "Email: ". Other Email information is stored within the Description.

1
  • Emails are stored in the Task object. To save an email you simply use the type = Email. The whoId is the contactId.
    – erbdex
    Aug 12, 2013 at 11:15
1

Yes it does seem that there is a difference here, that does surprise me as well to be honest. I did a test using the Salesforce Workbench and it was not listed in the global describe, editing the URL directly confirmed things.

enter image description here

The standard docs for this object do indicate that the usual array of CRUD operations are supported and I cannot find any stated exclusion for the REST API. So yes I would say the traditional SOAP Partner/Enterprise API's are your next best route.

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update()

2
  • 2
    I can confirm that EmailMessage is not available via the REST API in the current release. We are looking at supporting it in a future release.
    – metadaddy
    Feb 7, 2013 at 6:33
  • Any idea on a timeline? Should it be available over the SOAP API as per salesforce.com/us/developer/docs/api/Content/… ?
    – leighman
    Feb 8, 2013 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .