Open Connectors is an SAP service that allows for 3rd party connectivity to over 170+ applications as well as the ability to create Connectors. This allows for native connectivity from various SAP products, such as Cloud Platform Integration, Workflows, Fiori Apps, and more.
Connectors provide more than just connectivity to 3rd party applications. They all offer harmonized, RESTful resources – and all responses are restful JSON. Authentication, querying, error codes and pagination are also harmonized. Bulk resources are provided if there is natively no support from the vendor. Additionally, Open Connectors offer the ability to caputure events, and then take an action on them. This blog post will focus on the events.
Img 1 – The SAP Open Connectors portal.
Events are changes in a 3rd party application. For example, when a contact is created in Salesforce, the Open Connector will be able to detect this and sync it to another application, if desired. Being able to detect events allows for integrations to sync in closer to real time than a pull every hour, nightly, etc. Some 3rd party applications will send out webhooks when a change occurs, which is usually a small JSON body that indicates what object changed, its ID, and if it was created, updated, etc. Most applications do not offer webhooks. In that case, the Open Connectors will poll on the objects you choose, at an interval as low as 1 minute. If changes are detected, that event is stored for a period of time in the Open Connectors platform and can be sent to a Callback URL.
Using the Salesforce Open Connector as an example, let’s enable events – this is done when creating the Open Connector Instance.
Img 2 – Enabling Events during the Creation of a Salesforce Open Connector Instance
First, you’ll notice that polling is specifically selected. Salesforce can actually deliver webhooks, but requires APEX classes to do so. Polling is the easiest route here. Most Connectors do not offer both options. Then, the Event Notification Callback URL is entered. The username and password fields give the option to include a Basic Authentication token in the header of the event that Open Connectors sends to the URL placed in the Event Notification Callback URL field. Finally, we’ll choose the objects to poll on and not pictured, the polling interval is set.
After adding a contact in Salesforce, we can see the collected events in the Activity logs (Activity -> Event Logs).
Img 3 – The Event Logs in Open Connectors
As an example, I could create a Cloud Platform Integration flow that is manually triggered. The URL endpoint looks as follows: https://p2xxxxx-iflmap.hcisbp.us3.hana.ondemand.com/http/demo.
If I enter this in the Event Notification Callback URL field and then my CPI username and password, the event from Open Connectors will trigger this flow to run. As long as I parse out the contents of the event in the flow I shoud be good to go.