Skip to Content
Technical Articles
Author's profile photo Jamie Cawley

SAP Cloud Platform Extension Factory – Connecting to SAP Commerce Cloud

NOTE: As detailed in this blog, this functionality to provision Kyma and connect systems will be removed from the SAP C/4HANA cockpit and be replaced by the SAP Cloud Platform Extension Factory, Kyma runtime.  For more information about the SAP Cloud Platform Extension Factory, Kyma runtime see “Get a fully managed runtime based on Kyma and Kubernetes” and “How to get started”.  To register new system see the help.

 

One of the key components of the SAP Cloud Platform Extension Factory Kyma runtime is the Application Connector.  The Application Connector provides a mechanism to simplify the connection between external systems and Kyma in a secure manner.  Once the initial connection has been established, the registration of the external Events and APIs of the external system takes place. The Events and APIs are then available within the Kyma Service Catalog.  The events can be consumed asynchronously with services and lambdas (serverless functions) deployed within Kyma.  Additionally, the Application Connector provides monitoring and tracing capabilities to facilitate operational aspects.

In this blog, we will explore the steps to connect SAP Commerce Cloud to a Kyma runtime using the Application Connector. If you haven’t already configured your Kyma runtime, please refer to this blog.

First, open the SAP C/4HANA Cockpit and navigate to the Extensibility menu to display the Runtime.  Next, select the Display Name of the desired Runtime.

This will bring you to the Runtime Details where you can initiate the system registration by choosing the Add button found i,n the Registered Systems list

Provide a Name for the System and choose Register to save the entry.

Choose the Copy key button, which will place the URL needed to connect the systems to your system’s clipboard.

With the key copied you can now proceed to the SAP Commerce Cloud system to complete the system connection.  Open the backoffice application of the SAP Commerce Cloud system.

Connecting SAP Commerce Cloud – 1811

In the Filter Tree entries box, use the text “consumed” to filter the results and the choose the Consumed Certificate Credential option.  Choose the kyma-cert credential Id and then choose the Receive Certificate Action button.

Enter the copied url into the Retrieve Certificate dialog text box and choose Retrieve Certificate

NOTE: If any webservices are not successfully registered, check that the defined urls in the Exposed Destination and Endpoint menu options are correct for each of the named services.

Connecting SAP Commerce Cloud – 1905

SAP Commerce Cloud – 1905 added a template based approach to allow multiple system registrations for added flexibility. In the Filter Tree entries box, use the text “api” to filter the results and the choose the Destination Targets option.  Select the Default_Template option in the table and the choose the Register Target Destination Action option.

Enter the copied url into the Token URL field and provide a value for the New Destination’s Id field. choose Register Destination Target to complete the step.

Which results in an additional entry in the table.

NOTE: If any webservices are not successfully registered, check that the defined urls in the Exposed Destination and Endpoint menu options are correct for each of the named services.

Verifying the Configuration

Once the events and services have been successfully configured, we can verify the configuration within the Kyma console.  Open the SAP C/4HANA Cockpit and choose the Extensibility menu option.  Within the desired Runtime, choose the Kyma Console link.

Choose the Applications menu option and then choose commerce

You should now find the list of Provided Services and Events

You can now bind the Application to a namespace and start creating your extensions!

To learn how to trigger a lambda function from an event see this blog or to trigger a microservice from an event see this blog.

Assigned Tags

      21 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Kevin Alcock
      Kevin Alcock

      Hi Jamie

       

      Thanks for the great Blog!

      How do we connect a C4C system to a runtime?

      Thanks

      Kevin

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Hi Kevin,

      Take a look at

      https://storage.googleapis.com/faros-stage-base-xf-bundles/installation/c4c.html

      Regards,

      Jamie

      Author's profile photo Kevin Alcock
      Kevin Alcock

      Thanks Jamie, much appreciated

      Author's profile photo Prashanth Rai
      Prashanth Rai

      Hi Jamie,

      I followed the instructions to connect C4C. However encountered an issue while adding the Remote Environment URL in C4C Event notification setting.

      Error message: SAP Cloud Platform Extension Factory setup failed with error "Native SSL error"

      Adding the certificate before this step was successful. I'm attaching the screenshot of the issue for your reference.

       

      Thanks.

      Prashanth

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Hi Prashanth,

      Can you please create a new question in the question an answers area to address this?

      Thanks,

      Jamie

      Author's profile photo Andrei Vishnevsky
      Andrei Vishnevsky

      Hi Jamie Cawley and Prasanth Rai,

      I haven't found this question raised but I'm experiencing the same right now. Here is my question: https://answers.sap.com/questions/12869112/sap-cloud-platform-extension-factory-setup-failed.html

      Cheers, Andrei

      Author's profile photo Dmitry Bez
      Dmitry Bez

      Thank you for the awesome Article.

       

      How we can create connection between GKE/GCP Kyma and local hybris?

       

      Regards,

      Dmitry

       

       

       

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      The local hybris would have to be made available to the internet, the steps should be the same if this is the case.  Please post questions in a new thread instead of adding as a comment to a blog.  This will provide more visibility to your question.

      Jamie

      Author's profile photo Dmitry Bez
      Dmitry Bez

      Hey,

       

      Why i haven't the button?

       

      Regards,

      Dmitry

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Hi Dmitry,

      What version are you using?

      Jamie

      Author's profile photo Tiago Martins
      Tiago Martins

      Hello Jamie,

       

      I'm using the version 1811, and i cannot see the button for retrieving the certificate:

       

       

      Can you help? There is another way to do this?

       

      Regards,

      Tiago

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Hi Tiago,

      Please check that you have the extensions installed noted in the architecture box

      https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/1811/en-US/033a3080ab4a4bd0bdb80b7afe381145.html

      You can check in

      https://<commerce url>/hac/platform/extensions

      Regards,

      Jamie

      Author's profile photo Tiago Martins
      Tiago Martins

      Hi Jamie, thanks for the reply,

       

      We checked the extensions in Hybris console, and we didn't find the kyma extensions.

       

      Therefore, we are assuming that we should add them by following these page's steps:

      https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/1811/en-US/cdd6c450a2f24f56961c02edb070f1c4.html

       

      We don't know how to configure this in an SaaS environment, do you know how to do this or can you point us some references to do so ?

       

      Regards,

      Tiago

       

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      See

      https://help.sap.com/viewer/9056bcacb3f342228dfa0b547f149dff/SHIP/en-US/4bf7e0a592b34a0888e4a8239fe567f8.html

      Regards,

      Jamie

      Author's profile photo Aashik Meeran
      Aashik Meeran

      Hi Jamie Cawley

      I am running into couple of errors when I try to register the destination target my CCV2 cloud.

       

       

      1. "timeMillis":1578807133902,"thread":"kyma-acc-mdni1::de.hybris.platform.apiregistryservices.jalo.DestinationTargetCronJob","level":"ERROR","loggerName":"de.hybris.platform.cronjob.jalo.Job","marker":{"name":"FATAL"},"message":"Caught throwable I/O error on GET request for "https://gateway.extend.cx.cloud.sap/v1/applications/management/info": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://gateway.extend.cx.cloud.sap/v1/applications/management/info": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification

      2. The second issue is below

       

      {https://mykyma.hybris}]; reason : [{I/O error on GET request for \"https://mykyma.hybris\": mykyma.hybris: Name or service not known; nested exception is java.net.UnknownHostException: mykyma.hybris: Name or service not known}

      DO you have any ideas?

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      What versions are you using and is anything installed locally?

      Regards,

      Jamie

      Author's profile photo Aashik Meeran
      Aashik Meeran

      Hi Jamie

       

      I am using SAP Commerce Cloud 1905 CCV2 in Azure and Kyma version is 1.9.0 in cx cloud.

       

      Couple of questions.

      What value shud I set for this property. ccv2.services.api.url.0 ?

      I have also installed the SSL certificate for  *.cx.cloud.sap, added it to the trust store in CCV2 , added a deployment config and did a deployment as well. But still I am seeing the PKIX error. Do you have the SSL certificate for CX cloud portal?

       

       

       

       

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Do have the following extensions enabled?

      "kymaintegrationbackoffice"

      “kymaexternalservices”

      “kymaexternalservicesbackoffice”

      You shouldn’t have to modify any of the local.properties.

      Regards,

      Jamie

      Author's profile photo Aashik Meeran
      Aashik Meeran

      Hi Jamie

       

      I had kymaintegrationbackoffice already.

       

      I tried adding the following.

       

       

      But my CCV2 build is failing with the following error

       

      Extension 'kymaexternalservices' doesn't specify a path and no scanned extension was matching the name.

       

      Author's profile photo Aashik Meeran
      Aashik Meeran

      Hi Jamie

       

      I had kymaintegrationbackoffice already.

       

      I tried adding the following.

      “kymaexternalservices”

      “kymaexternalservicesbackoffice”

       

      But my CCV2 build is failing with the following error

       

      Extension ‘kymaexternalservices’ doesn’t specify a path and no scanned extension was matching the name.

      Author's profile photo Jamie Cawley
      Jamie Cawley
      Blog Post Author

      Sorry that may have been a mistake.  For the setup please refer to

      https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/1905/en-US/cdd6c450a2f24f56961c02edb070f1c4.html

      Regards,

      Jamie