4

Using Generic Connector On SAP Customer Data Platform

 1 year ago
source link: https://blogs.sap.com/2022/12/07/using-generic-connector-on-sap-customer-data-platform/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
December 7, 2022 4 minute read

Using Generic Connector On SAP Customer Data Platform

SAP Customer Data Platform (CDP) has a vast number of connectors available for integration with different types of applications, as a source or destination of data. Despite of this, we may face some cases the client has applications that still do not have an OTB(Out-of-the-box) CDP connector, or the application version is not compatible with the current CDP connector.

During a CDP implantation, the current version of the client’s SAP CAR was not compatible with the was not compatible with the CDP connector. As the client was implementing CPI, I used a simple solution provided by CDP, the generic connector provided by CDP and CPI so that CDP could ingest the data from the source.

Below I am going to show the steps I followed to configure the generic connector and how I tested the API calls to the endpoint provided by the connector.

How To Set Up The Generic Connector In CDP

As the application is being configured to send activity data to CDP, on the menu go to Connect then Sources and click on the button Connect Application.

The Application Library will prompt, choose the Server Application under custom applications category.

CDP%20OTB%20Connectors

A window prompts so you can define the name of the connector, the fields Description and Data Quality Rank are optional.

Connector%20Settings

After clicking on Create button, the new connector is available under Sources:

Generic-Connector2.jpg

And the user key and secret key for the connector is generated, the combination of them is used to authenticate the application that makes the API calls to CDP. All requests are conducted over HTTPS when using user and secret keys to authenticate the API calls.

UserSecreKeys.png

After the connector was ready, I created the event which was used to ingest the data of a specific activity into CDP. To do this, click on the button Create New Event in the connector area.

NewEvent.png

Creating The Event

To create a new event, a name and data type are required in the first step, Settings.

NewEventSettings-1.png

In the step 2, Model, I created the schema of the activity that is be ingested, in this case Order activity. Every time you create a new event in a connector, you need to create the activity schema or create the schema from a JSON file.

Model.png

On the step 3, Mapping, the Model fields were mapped with the customer identifier fields in Profile schema and Order activity schema as the data of this activity will be ingest through the event PostEvent created.

Mapping1.png
Mapping2.png

In the last step the event listener is generated for the event. It is endpoint that will be used by SAP CPI for integration.

Listener.png

After this, the event was created and is enabled so it can be used:

Connector.png

Using CDP APIs To Test The Connector

I used the CDP APIs to simulate the integration of CPI and CDP using Postman. This helped on verifying the payload that need to be send to CDP and anticipated any issue that could occur during the integration and assist the CPI architect with the correct format of the JSON.

On Postman, I used the method POST and copied the URL provided in the event on the step 4, Listener. The URL indicates which CDP domain will be reached depending on where the Business Unit was created:

  • For Business Units in EU: cdp.EU5-prod.gigya.com
  • For Business Units in US: cdp.US5-prod.gigya.com

We can ingest one or multiple activities using the following CDP APIs:

  • For one activity: /api/businessunits/{businessUnitId}/applications/{applicationId}/dataevents/{dataEventId}/event
  • For multiple activities: /api/businessunits/{businessUnitId}/applications/{applicationId}/dataevents/{dataEventId}/events

For both CDP APIs you need to send, in the body of the API call, the payload with the data of one or multiple activities, respectively, observing the structure of fields and field types defined in the step 2, Model, of the event.

After the data ingestion, you can check the events processed in the connector status.

In this case, six events were processed indicating the integration with the CDP connector is working.

ConnectorAfterIngestion.png

For more information about how to integrate CDP using API calls see the SAP Help Portal Server Applications: API Integrations and about the CDP APIs.

Feel free to add a comment if you have a feedback or suggestion.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK