Note: All the functionality presented here are subject to change and may be changed by SAP at any time for any reason without notice.
Note: The source code of this example is in the cdp-extension subfolder of this repository.
SAP_API_HUB_API_KEY
SAP_API_HUB_API_KEY
- This is the API Key of SAP API Business Hub. Login to api.sap.com. Then, go to your profile settings and click on Show API Key to get the value for this variable.DATA_CENTER
with the Data Center that is closest to you. As an example, the US Data Center is us1.gigya.com
. For other locations, check Finding your Data Center.BUSINESS_UNIT_ID
with your Business Unit ID, which can be located in your SAP Customer Data Platform console URL after /business-unit/
.cdp
.kubectl create namespace cdp
Note: As a prerequisite, please follow the steps listed in the following tutorial: Download the Kyma Runtime kubeconfig
kubectl apply -f ./kyma-runtime-extension-samples/cdp-extension/k8s/function.yaml
kubectl apply -f ./kyma-runtime-extension-samples/cdp-extension/k8s/api-rule.yaml
Note: As a prerequisite, please follow the steps listed in the following tutorial: Download the Kyma Runtime kubeconfig
The resources are represented as declarative YAML objects. Applying the resources will perform the following steps:
- Deploy the Kyma serverless function
- Expose the serverless function using a Kyma API Rule with JWT Access strategy that will serve as the SAP Customer Data Platform Extension endpoint
Note: If you already have some custom fields, then only add the phoneNumberDetails and contactPersonBPID fields listed in the JSON below.
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "primaryEmail": { "type": "string" }, "primaryPhone": { "type": "string" }, "masterDataId": { "type": "array", "items": { "type": "string" } }, "crmId": { "type": "array", "items": { "type": "string" } }, "ciamId": { "type": "array", "items": { "type": "string" } }, "emails": { "type": "array", "items": { "type": "string" } }, "phones": { "scopes": [], "type": "array", "items": { "type": "string" } }, "cookieId": { "type": "array", "additionalItems": true, "items": { "type": "string" } }, "searchHistory": { "type": "array", "additionalItems": true, "items": { "type": "string" } }, "phoneNumberDetails": { "type": "object", "additionalProperties": false, "properties": { "phoneNumber": { "type": "string" }, "phoneNumberExtension": { "type": "string" }, "phoneNumberType": { "type": "string" } } }, "contactPersonBPID": { "type": "string" } } }
{ "type": "array", "items": { "type": "object", "properties": { "customerBPID": { "type": "string" }, "relationshipNumber": { "type": "string" }, "relationshipCategory": { "type": "string" } } } }
Go to Dashboard --> Connect --> Sources --> Connect Application --> Select connect within AWS S3 (under Cloud Storage).
Enter the connection details and your AWS credentials as depicted in the screenshots below.
Then, click on Create New Event.
In the Settings screen, enter the settings as per the screenshots below and click Next.
{ "type": "object", "additionalProperties": true, "properties": { "profile": { "type": "object", "additionalProperties": true, "properties": { "UID": { "type": "string" }, "email": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } } }, "data": { "type": "object", "additionalProperties": true, "properties": { "phoneNumber": { "type": "string" }, "phoneNumberExtension": { "type": "string" }, "internationalPhoneNumber": { "type": "string" }, "phoneNumberType": { "type": "string" }, "contactPersonBPID": { "type": "string" }, "groups": { "type": "array", "additionalItems": true, "items": { "type": "object", "additionalProperties": true, "properties": { "customerBPID": { "type": "string" }, "relationshipNumber": { "type": "string" }, "relationshipCategory": { "type": "string" } } } } } } } }
EVENT SCHEMA | CUSTOMER SCHEMA |
---|---|
profile.UID | PROFILE.ciamId |
profile.email | PROFILE.primaryEmail |
profile.firstName | PROFILE.firstName |
profile.lastName | PROFILE.lastName |
data.phoneNumber | PROFILE.phoneNumberDetails.phoneNumber |
data.phoneNumberExtension | PROFILE.phoneNumberDetails.phoneNumberExtension |
data.internationalPhoneNumber | PROFILE.primaryPhone |
data.phoneNumberType | PROFILE.phoneNumberDetails.phoneNumberType |
data.contactPersonBPID | PROFILE.contactPersonBPID |
data.groups | GROUPS |
Click Next. Finally, in the Scheduled Polling screen, click on Extensions.
Under Pre-mapping, enter the name and URL of the extension, which is the host URL of the cdp-extension API Rule. Set the Timeout to 10 seconds, select Stop as the Failure Policy.
input_20211119_001.json
file (located in the ./kyma-runtime-extension-samples/cdp-extension/input
folder of the cdp-extension repo) to the input folder of your AWS S3 bucket.Note: The input_20211119_001.json
file contains mock email addresses that are currently used by the SAP S/4HANA Cloud Business Partner (A2X) microservice for Business Partner, Supplier, and Customer master data in SAP S/4HANA Cloud system.
Go to Dashboard --> Connect --> Sources --> aws-cdp-integration --> Load users from AWS S3 --> Ingest Now.
To see the logs of a specific function, open the function in the Kyma console (Go to Workloads > Functions > cdp-extension) and you will see the logs in an expandable window at the bottom of the page.
Alternately, go to Workloads > Pods in the Kyma Console (within the cdp namespace) to see the list of all running pods. Then, click on the three dots to the right of the running pod of the cdp-extension function, and click on Show Logs to see the logs of the pod.
kubectl get pods -n cdp
kubectl logs <pod-name> -n <namespace-name>
kubectl logs cdp-extension-jqckp-57787d8cd4-d54nw -n cdp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
11 | |
10 | |
7 | |
7 | |
7 | |
7 |