Skip to Content

How To Connect Your Own Email Service Provider to SAP Hybris Marketing

From SAP Hybris Marketing On Premise release 1508 onwards, it is technically possible to connect custom service providers (e.g. for email, text messages, messengers etc.) by implementing a custom provider adapter.

We created a series of documents that describe how this can be achieved in detail using a concrete example for developers. We use SendGrid as an example as it offers the possibility to request a test account for free. Thus, everyone should be able to repeat the described steps here and learn by doing.

We have splitted this example into three different documents that deal with different aspects of the connection and an appendix that contains the complete coding:

  1. Sending Emails
  2. Collecting Bounces/Feedback
  3. Specific Integration related topics
  4. Appendix: Complete Example Adapter Implementation

Looking forward to your feedback in order to improve the documents and make it easier to for you to connect your Email Service Provider to SAP Hybris Marketing.

You must be Logged on to comment or reply to a post.
  • Dear Frank

    Thank you for this very clear and very helpful description.

    As you write this approach cannot be used for the cloud version of hybris marketing because as far as I understood there is no way to add custom classes on the hybris server in that case.

    Is there any alternative extension interface that could be used in the cloud version for such example? For example, could offer a standardized rest-based interface to the cloud version of hybris marketing and in that way offer an interface to other external email providers?

    Thanks a lot


  • Dear Frank,

    First, Can you please explain in more details how to add the Certificate Authority for the API endpoint in PSE system using STRUST. I used the certificate provided by GoDaddy, where it is the only document I found referring to this issue.

    Second, would you please explain how to redefine the Constructor method. I am trying to redefine. however, it always asks for an access key to edit in the superclass CL_CUAN_MKT_EXEC_EMAIL.

    Thanks in advanced,


    • Hi,

      At least for testing purposes, I typically download the SSL certificate using a browser for endpoint You have to upload that in STRUST for the PSE that is referred to in the RFC destination in transaction SM59 under 'Security Options'.

      Not sure, what piece of information is missing regarding he constructor here. In the appendix, the complete coding that I used is available
      Could you please provide more details?

      Best regards,


  • Hi Frank,

    Thank you for the well written blog. I have a question, regarding interface method


    Do we have to manually override the method to send email packages from the target groups?


    • Hi,

      If you only want to use another ESP, then you don not need to override this method. You just have to follow the steps described in this blog.

      If you would like to change/enhance additional logic during the campaign email execution then you can override this method and introduce for example additional checks or changes to the personalization.

      How to do this is described in the extensibility guide, chapter 7.4

      Best regards,


  • Hi Frank,

    Can you please update whether external email services integration (like Send Grid) is possible for cloud version 1705 ?


    Thanks and regards,


    • Hi,

      As mentioned in the introduction, this blog is only about the on premise deployment.

      In the 1705 cloud version there is no integration of external ESPs beside AMAZON SES and SAP Mobile Services Intelligent Notifications supported. As soon as there is an integration of external email services also for the cloud version, we will add a dedicated blog.

      Best regards,



  • Frank:

    Quick question doing some follow up for a client, does SAP integrate officially with any ESP or do all integrations require custom development work to connect API's between the two in order to populate an ESPs database?



    • Hello,

      Yes, SAP Hybris Marketing Cloud comes with an out-of-the-box integration with SAP Digitial Interconnect/SAP Mobile Services and AMAZON Simple Email Services for sending emails.

      No custom development is needed here (This also applies to the on premise version).

      For details see here

      Best regards,


  • Dear Frank,

    Thank you a lot for this helpful blog. I did all the suggested steps with the related configuration. Thankfully I got a working Email provider and configured sender profile as you can see in the following picture.

    However, when I run the campaigns whether Email campaigns or Triggered-based ones I have the problem of assigning an action to the start automation and the Application log shows many errors. as you can see in the following picture.

    When I tried the IMG "Define Categories and actions" in order to customize the "Send_Email" action but it didn't help

    can you please help

    Thanks a lot in advance and best regards,


    • Hi,

      Looks like all the error messages are related to the other providers that you did not configure completely. Try to remove all the other providers in the customizing 'Provider Configuration' and test again.

      Best regards,


      • Hello Frank,

        I have found the below error message:

        Error during sending (sender profile ZMLE): API error: Code “401”, Reason: “Unauthorized”, Message: “{“errors”:[{“message”:”Permission denied, wrong cr”

        while execution of standard email campaign configuration report. Can you please help...


  • Hello Frank,

    I am finding few issues while configuring and developing the steps followed the blog, I hope u can clarify the steps mention below:

    1) can you confirm while using transaction SM59 for RFC destination the connection test HTTP  status should be 200 or 405?

    I found connection status as 405 in my case as below:


    2) I have implemented the same code provided by you in the link: with the API key generated on my account and domain name I have passed under method

    METHOD if_cuan_mkt_exec_email~retrieve_verified_senders.

    *   specify verified domain

        APPEND < Target Host+ Path prefix (i.e> TO et_domains.


    3) Activated successfully and executed report: CUAN_MKT_EXEC_CHECK_CONFIG to check email configuration then found a pop-up window username and password as below:

    I passed sendgrid account credentials 3 consecutive times.Please suggest what should be the user name and pwd?



    Sender profile :ZMLE.

    Can you suggest what might cause this API error code 401 issue?

    Stuck here need your valuable inputs.

    Thanks in Advance.


  • Hi Frank,

    To add a  point..


    Error during sending (sender profile ZMLE): API error: Code "401", Reason: "Unauthorized", Message: "{"errors":[{"message":"Permission denied, wrong cr"


    Found the above error while execution of standard email campaign configuration report

    • Hello Shrim,

      I’ll try may best to answer your questions:


      1) Yes, 405  should be OK. ‘Method Not Allowed’ is raised as the RFC connection test is a GET request, but the API endpoint expects a POST request. Nevertheless it is reachable and no SSL issues seem to occur.

      2) You should append your sending domain here, e.g. ‘’, not the sendgrid domain.

      3) In the RFC destination you should select 'Do not use a user’ and in addition maybe the lines from the example coding are missing:

        METHOD if_cuan_mkt_exec_http_outbound~get_parameters.

          APPEND VALUE #( param_name = ‘API_KEY’

      param_value = <your API key here> )

                 TO rt_parameters.


      Make sure that you entered your API key there.


      Hope this helps,



      • Thanks Frank for providing the solution.

        In my case, user role was not activated after activating it and providing right API key. it worked and later I didn't get any popup window for the user credentials.

        Now I found a new issue the emails are not received at sendgrid inbox even after triggering custom adapter class while executing from front-end application. In detail explained in the below.

        Thanks & Regards,


  • Thanks Frank for the help it got resolved by activating a role.

    Now the check configuration of campaign execution has no errors displaying and the outgoing emails to sendgrid are working fine when executed CUAN_MKT_EXEC_CHECK_CONFIG program.

    But the issue is when I execute from the front end campaign marketing its getting successful message but no email is triggering to sendgrid inbox.


    I have debugged hours on this issue but couldn't find why the emails are not triggering to  Sendgrid inbox. Need ur valuable inputs is there any functional config needs to do or code has to modify?

    Thanks in advance..


  • Hi Frank,

    Hope you are doing great!

    I need your valuable inputs for the custom adapter class copy of standard class for the email(CL_CUAN_MKT_EXEC_EMAIL) and SMS (CL_CUAN_MKT_EXEC_SMS_SYBASE365).

    1. a) Email custom adapter class works well with the logic provided by you when testing with pgm "CUAN_MKT_EXEC_CHECK_CONFIG" and out going mails got triggered to sendgrid. But it's not working the same when executed thru  Fiori launchpad campaign marketing after click on complete..  The  methods CONSTRUCTOR and IF_CUAN_MKT_EXEC_HTTP_OUTBOUND~GET_PARAMETERS are triggering and rest of the methods CHECK_CONNECTION, BUILD_REQUEST... are not triggering.

    b) I have  a query here... In which method email address and body from OData services(

    campaign marketing provider details) is triggering.

    2. I have used the copy of class CL_CUAN_MKT_EXEC_SMS_SYBASE365 for SAP SMS text to

    send campaign marketking messages. Here can you provide the logic and explaination for

    outgoing texts. Because i find similar issue  as i have mentioned in  1. a ..only working with

    test configuration program but getting suppressed at check connection method and other

    methods are not triggered.  Help needed.

    Thanks in Advance.


    • First of all, when it works using the program most of the work is done. Only minor things seem to be missing.

      1 a) The adapter methods when sending in a running campaign execution are triggered from class CL_CUAN_MKT_EXEC_HTTP_OUTBOUND method SEND_REQUESTS. If you put a breakpoint there you should be able to analyze what is happening.

      1 b) I didn't get the question. OData is not involved here.

      • Thanks for the reply.

        Whatever you have mentioned(code) is working fine. The steps that I followed for execution ESP was not correct it seems. so, the emails got suppressed.Then our team tried a different navigation/functional approach. It got resolved for the time being.


  • hi Frank - Thank you for great explanation. We are implementing 1709 version of Hybris Marketing on premise for our business solutions(campaign execution). Could you please confirm on below questions-

    1. We have gone through provided doc to enable email campaigns execution and need to confirm if 'SAP Intelligent Notification 365, email API & service' is a inbuilt product offering as part of hybris marketing out of the box or do we need to procure the licence separately.( We are talking about email service provider).

    2. Is the product name is 'SAP Intelligent Notification 365, email API & service' or SAP Digital interconnect. This will help us confirm what product we need to procure.

    3. Whether the email service provider is a on cloud or on premise offering.

    4. Is SAP mobile service different above two products mentioned ( 'SAP Intelligent Notification 365, email API & service' , 'Digital interconnect')


  • Hello Vega,

    thanks for your questions and let me answer on behalf of Frank.

    1. Intelligent Notification 365, email API is technically integrated and part of hybris Marketing. The SAP Hybris Marketing Cloud Contract covers all components of the Email solution.

      For users of the on premise version of SAP Hybris Marketing a separate agreement is needed to cover the E-mail consumption, IP's and Sub-Domains. The Email engine itself does not require any additional license.

    2. The product name is SAP Intelligent Notification 365, email API. SAP Digital Interconnect is the name of our business unit.
    3. It is a cloud solution.
    4. SAP Mobile Services is the retired name of our business unit and got replaced by SAP Digital Interconnect.

    Let me know if you have further questions or if we can support with onboarding, IP warming etc.

    Thanks and regards,


    • Thanks Felix.

      Require few more clarifications please -

      Does this email engine means ESP? Also, can this be used for text campaigns.

      If we want to procure licensing for the ESP product what will be the product name we have to refer for Hybris marketing on premise solution.


    • Hi Felix Heckmann or Former Member ,

      Thanks for the info it helped us a lot to identify this product to meet our business needs.

      We are planning to implementing on premise version of SAP Hybris Marketing and we are looking for some clarification before choosing “SAP Intelligent Notification 365, email API” product as our Email service provider.

      Can we call “SAP Intelligent Notification 365, email API” as Email service Provider(ESP) and Email Engine ?

      1. Does this product (“SAP Intelligent Notification 365, email API”) provides both Email and as well SMS capability ?
      2. Do we need to take separate license for both Email and SMS capabilities ?
      3. Does “SAP Intelligent Notification365” support SMTP interface for outbound multi-channel email notifications ?
      4. Does “SAP Intelligent Notification365” supports global suppression rules based on Bounce rate ?
      5. Does this product “SAP Intelligent Notification365” have capability to retrieve below KPI’s after marketing outbound communication executed to consumers/customers ? If not all can you provides us the KPI’s it can retrieve ?
      • Number of Interactions
      • Number of Missing Marketing Permissions
      • Number of Missing Communication Data
      • Number of Sent Messages
      • Number of Delivered Messages
      • Number of Bounces
      • Number of Hard Bounces
      • Number of Soft Bounces
      • Number of Unopened Messages
      • Number of Opened Messages
      • Number of Total Clicks
      • Number of Unique Clicks
      • Bounce Rate
      • Rate of Unopened Messages
      • Rate of Opened Messages
      • Unique Click Rate
      • Click to Open Rate



      Rajesh N


  • Hi Experts,

    Error while configuring Generic Email and Text Message Interface in marketing cloud

    I have followed the steps as per the blog given for email configuration (Setting Up a Generic Email and Text Message Interface) in Marketing cloud, but I struck up at the last step i.e. configure the sender profile to complete by giving the sender mail id and sender name.

    While giving some email id and name, system is not allowing to save. Can someone help from where and how will get the details of sender email id and name.



    Sudhakar Y.