Technical Articles
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
- SAP Cloud Platform trial tenant
- SAP Cloud Platform Open Connectors tenant
- Test or Sandbox tenant in QuickBooks Online or any other finance application that you would like to connect to from SAP Cloud Platform Open Connectors.
- Test or Sandbox tenant in HubSpot or any other third-party application that you would like to connect to from SAP Cloud Platform Open Connectors.
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.
- Logon to your SAP Cloud Platform trial and Navigate to the Neo Environment.
- 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.
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
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 :-
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
Hello Divya,
Thanks for your Blog series, they were very informative.
Quick question
Your inputs are much appreciated.
Regards,
KishoreJoga.
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
Thank You. Divya.
Regards,
KishoreJoga.
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