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?

2
  • 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, 2017 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. May 23, 2019 at 15:06

1 Answer 1

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

3
  • 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, 2017 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? Apr 10, 2017 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, 2017 at 12:39

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