Skip to Content
Technical Articles
Author's profile photo Divya Mary

Part 10: Introducing Common Resources in SAP Cloud Platform Open Connectors

SAP Cloud Platform Open Connectors simplifies and accelerates connectivity to third-party cloud applications. It provides robust, feature rich, pre-built connectors to an extensible library of over 160 of the most popular third-party cloud applications. Customers can easily build API compositions across the different connectors and can wrap multiple operations in a single request.

With common resource (common objects), you can transform fields provided by your service providers to a single, normalized resource. This allows you to take advantage of our one-to-many integration approach where you write to a single common object to integrate the transformed resources from your various service providers. In this blog, we would showcase a simplified common resources for companies harmonizing the response from customers or accounts resources from two different third-party applications.

For more blogs on SAP Cloud Platform Open Connectors , ref the blog series.

Prerequisites

Note:- In this blog, we have used a third-party application from the CRM hubs which is HubSpot and Financial Hubs which is QuickBooks Online. You are free to use any other third-party application of your choice for this exercise.

In the blog Simplified connectivity to third-party financial hubs application, detailed steps to connect to QuickBooks Online connectors has been covered and in the blog Simplified connectivity to third-party CRM hubs application, detailed steps to connect to HubSpot tenant has been covered. These blog can be followed to create an authenticated connections to your QuickBooks Online tenant and HubSpot using SAP Cloud Platform Open Connectors.

Creating Common Resources in SAP Cloud Platform Open Connectors

In this section, steps to create a common resources named mycompanies with field properties like name, city, country, postalCode, phone has been covered. This mycompanies resource would then be mapped to the responses returned from QuickBooks online and HubSpot connectors via SAP Cloud Platform Open Connectors. SAP Cloud Platform Open Connectors is available for test, explore and try out in SAP Cloud Platform trial. If you have not enabled SAP Cloud Platform Open Connectors in your trial tenant, refer this blog to enable it.

 

  • From the services tab, search and select Open Connectors tile and click on the Go to Service link.

 

  • You would be navigated to SAP Cloud Platform Open Connectors Home or Landing page.

 

 

  • Click on the Common Resources tab to create a common resource. In this blog, the common resources for mapping the companies entity from QuickBooks Online and HubSpot is covered and therefore the name of the common resources was given as mycompanies.

  • The mycompanies resources has field or properties as described in the table below.

Field Name

Display Name

city

City

country

Country

postalCode

Postal Code

phone

Primary Phone number

name

Company Name

 

  • To add fields, click on the + button next to the Account Level Fields and then enter the value for Field Name and Display Name. After all the properties are added , click on the Save button to persist the changes.

 

  • With this common resources named mycompanies would be created. The next step would be to map this common resources to the actual response from HubSpot or QuickBooks online.

 

Mapping Common Resources to pre-built connectors

In this section steps to map the newly created common resources to pre-built connectors of HubSpot and QuickBooks online is covered.

  • For this click on the Create New Transformation tile.

 

  • In the Select a connector instance dialog, select the connector instances created for myhubspot and then click on the + button.

 

 

  • In case of HubSpot, the name of the resources is companies and therefore select + button next to the companies resource.

 

  • Once the resources is selected , the field like city from mycompanies field can be mapped to the actual response from the HubSpot companies resources.  In this blog, the fields were mapped as provided in the table below.  In case you are using a different third-party application then change the mapped property name as provided by the selected third-party application.

Field Name

Mapped Property Name

city

properties.city

country

properties.country

postalCode

properties.zip

Phone

properties.phone

Name

properties.name

 

  • In the Advanced Settings pane, toggle the switch to Remove Unmapped Fields and click on the Save button to persist the changes.

 

 

  • Click on the Save button to persist all the changes done on the mapping so far.
  • The mapping of the mycompanies to the HubSpot connector can be tested from SAP Cloud Platform Open Connectors for this click on the try out  or play button .

 

  • Both the transformed response and raw response can be viewed in the test pane.

 

 

  • Click on Transformation to create a new mapping to QuickBooks Online.

 

  • Next the mapping to QuickBooks online would be created and for this click on the Create New Transformation tile.

 

  • In the Select a connector instance dialog, select the connector instances created for myquickbooks and then click on the + button.
  • QuickBooks online has the resource named customer which would be used for mapping into the mycompanies common resources. Click on the + button to select the customer resource.

 

  • Once the resources is selected , the field like city from mycompanies field can be mapped to the actual response from the QuickBooks online customer resources.  In this blog, the fields were mapped as provided in the table below.  In case you are using a different third-party application then change the mapped property name as provided by the selected third-party application.

Field Name

Mapped Property Name

city

shipAddr.city

country

shipAddr.country

postalCode

shiipAddr.postalCode

Phone

primaryPhone.freeFormNumber

Name

displayName

 

  • As before the un-mapped fields can be removed and for this click on setings button and from the Advanced Settings pane, toggle the switch to Remove Unmapped Fields and click on the Save button to persist the changes.

 

  • Click on the Save button to persist all the changes done on the mapping so far.
  • The mapping of the mycompanies to the QuickBooks online connector can be tested from SAP Cloud Platform Open Connectors for this click on the try out  or play button .

  • Both the transformed response and raw response can be viewed in the test pane.

 

With this we have successfully created a common resource named mycompanies with fields like city, country, phone,name and then mapped it to the response from third-party application like QuickBooks online and HubSpot.

More blogs on SAP Cloud Platform Open Connectors available in SAP Community.

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jan Almkvist
      Jan Almkvist

      Thanks Divya,

      A very informativ blog as always. The idea with Common Resources is just great. I have struggled to find out how to consume a Common Resources transformation from within API Management.

       

      Is this even possible?

       

      Many Thanks

      Janne

      Author's profile photo Divya Mary
      Divya Mary
      Blog Post Author

      Hi Jan,

       

      Thanks for your kind words on the blog series.

      Common resources are like REST APIs in themselves and therefore they can be very easily consumed from API Management like any other rest APIs. The simplest way to show the integration with API Management + Common resources are as follows :-

      1. Create an API Proxy to the Open Connectors endpoint as shown in the blog here to your non-SAP application to which you have also created the common resources for.  In the blog Hubspot was used as an example.
      2. After the proxy is created & deployed , you can also access the common resource of your non-SAP app ( HubSpot) that you had created in the blog by appending /mycompanies to your HubSpot API Proxy base path https://{your_apimanagement_proxy_endpoint}/mycompanies mycompanies was then name of the common resource created in the blog .

      Full blog series captured here https://blogs.sap.com/2019/03/06/building-enterprise-digital-application-using-sap-cloud-platform-integration-suite/ .

      Thanks and Best Regards,

      Divya

      Author's profile photo Kishore Joga
      Kishore Joga

      Hello Divya,

       

      Thanks for your Blog series, they were very informative.

      Quick question

      1. Do we have the concept for Open Connectors for ECC based with SCP.
      2. In order to use Open Connectors with the On premise systems (ECC) connect to SCP through Cloud Connector and then get connected to one of the Open Connector based systems..Is that an option available, have tried any of those.

      Your inputs are much appreciated.

       

      Regards,

      KishoreJoga.

      Author's profile photo Divya Mary
      Divya Mary
      Blog Post Author

      Hi Kishore,

      SAP Cloud Platform Open Connectors focuses on cloud based non-SAP applications. For connecting to SAP ECC you could use SAP Cloud Platform Integration service.  In order to connect to an on-Premise endpoint via SAP Cloud Connector, if you have the SOAP or an OData API you can use SAP Cloud Platform API Management to first securely expose the data from SAP Cloud Connector and then later create your custom connector using the connector builder.

      Thanks and Best Regards,

      Divya

      Author's profile photo Kishore Joga
      Kishore Joga

      Thank You. Divya.

       

      Regards,

      KishoreJoga.

      Author's profile photo Kevin Alcock
      Kevin Alcock

      Hi Divya

       

      Thanks for the great blog!

      Do you recommend CPI or Open Connectors (or both?!) when connecting SAP Cloud Solutions to non-SAP, for example SAP Sales Cloud with Hubspot?

       

      Thanks

      Kevin