2

As an AppExchange App developer, I want to be able to create an email service in user's (installer) org when they configure or install my app. I have looked into SOAP API for Partners but have found nothing yet.

Please note that I am aware that currently it is not possible to create Email Service (i.e. EmailServicesFunction record) via Apex. The question is about how to create it via APIs other than Apex such as SOAP, Rest and/or Metadata API.

Could you please help me with which API would allow me to do that and an examples you could provide?

closed as off-topic by Sebastian Kessel, Eric, Brian Mansfield, Mohith Shrivastava, Boris Bachovski Apr 11 '17 at 3:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Sebastian Kessel, Eric, Brian Mansfield, Mohith Shrivastava, Boris Bachovski
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Please take a moment to visit the help center, scroll through the tour, and read How to Ask. What have you tried so far? Where are you stuck? – Adrian Larson Apr 10 '17 at 19:12
  • 1
    Can I downvote or at least blame everybody who closed this as off-topic? This is plain wrong. It's actually a very precise and valuable question. – Robert Sösemann May 23 at 15:06
2

You will want to create an EmailServicesFunction record and the associated EmailServicesAddress records.

It appears it isn't possible to create these records directly in Apex - Ideas: Support DML for Email Services objects. Instead you will likely need to do so via one of the APIs.

Related Question on doing this via the Metadata API post install - Email Service via Metadata API fails to create from Managed Package

  • Thanks Daniel. I should have mentioned that I am aware that it is not possible to create Email Service (EmailServicesFunction) via Apex. However, I was wondering if it is possible by other means such as SOAP API. – DLight Apr 10 '17 at 20:25
  • The Soap API indicates that create/update/upsert are all supported on EmailServicesFunction. It would just be a matter of making that SOAP call. Do you need an example of how to do that? – Daniel Ballinger Apr 10 '17 at 20:30
  • You are right. I did see that SOAP API allows that. However, it still lacks example of creating that or any other object via that method. The other question is that it only allows that to happen via Enterprise SOAP API which is org specific. How can I make it org independent i.e. can create Email Service in any org where the SOAP call comes from (i.e. client's org). – DLight Apr 11 '17 at 12:39

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