Prerequisite on SAP Business Technology Platform is the Kyma Runtime, as entire uses cases is based on Kyma, make sure that is enabled on your SAP BTP sub-account. User should be administrator on SAP BTP for Global Account where changes taking place. An SAP Sales Cloud tenant required as well.
These are the step to set up SAP Sales Cloud/Sales for Customer catalog service on BTP.
On SAP Business Technology Platform Cockpit under global account.
-
Select
System Landscape -> Systems
; Click theRegister System
button;- Give a name at your choice
- For type select from the list
SAP Cloud for Customer
-
Click the
Register
button. After registering a new record will come up inPending
status. -
Select
System Landscape -> Formations
; Click theCreate Formation
button;- Give a name at your choice
- Select the sub-account where the service extension will be created
- Select early created system.
Login into SAP Sales Cloud/Sales for Customer(C4C) portal using admin user and password, by using a similar URL https://myXXXXXX.crm.ondemand.com .
Navigate under Administrator -> General Settings -> Communication Systems
.
On the opened tab All Communication Systems
click the New
button from top right.
On the new form introduce all required information about the system including the ID of the system.
For current example gave the ID US_SALES_MIDDLEWARE_DEMO (feel free to give any name you want)
.
As value for Host Name field should be the Kyma host URL (https://console.XXc2fb6.kyma.shoot.live.k8s-hana.ondemand.com),
replace console with gateway , will become https://gateway.XXc2fb6.kyma.shoot.live.k8s-hana.ondemand.com.
System is in In Preparation
state/status. The target is to be into the Active
state/status.
Select the system record and activate it by clicking the Actions -> Set to Active
Navigate under Administrator -> General Settings -> Communication Arrangements
On the opened tab All Communication Arrangements
click the New
button from the top right. A wizard dialog will be opened.
- Select from
Communication Scenarios
, theOData Services for Business Objects
record. - Click the button
Next
from the bottom right. - For
System Instance ID
, Select the system created earlier for this exampleUS_SALES_MIDDLEWARE_DEMO
. - Click the button
Next
from the bottom right. - Select best fit
Authentication Method
; I selectedUser ID and Password
. TheUser ID
is autogenerated as_US_SALES__0
, can be changed, as well specify the password by clicking theEdit Credentials
button, we will need them later on. SelectServices Used
fitting to your uses case (selected areactivity, activityplanprocessing, contact
). - Click the button
Next
from the bottom right. - Review and click the button
Finish
from eth bottom right.
Now you should be able to see the created arrangements on the list.
Navigate under Administrator -> General Settings -> Event Notification
On the opened tab under All Consumers
click the Add
button from the top right.
-
For the field
Type
selectSAP BTP Extensions
. Give a convenient for you name, usedSALES_MIDDLEWARE_DEMO_KYMA
. -
For the field
Remote Environment URL
go to BTP Cockpit and take the token url. Copy the generated url token by click the key on registered early by you system. -
For the field
Callback User
take existent or create a new technical user into SAP Sales Cloud and specify here the username. -
For the field
Callback Password
take the password of chosen technical user. -
Click the button
Save
from bottom right. -
Click new created consumer record
SALES_MIDDLEWARE_DEMO_KYMA
and activate it by clickingActions -> Activate
; State should change fromInactive -> Active
-
Select consumer record
SALES_MIDDLEWARE_DEMO_KYMA
and add subscriptions on theSubscriptions
dialog and click the buttonAdd
. On popped dialog configure event subscription for which you are interested into to receive events on BTP Kyma Message broker or Cloud Foundry:- As
Business Object
selectAccount
- As
Node
selectRoot
- Enable
Created, Updated
- Click the button
Save
Keep adding as much as you consider the subscription for which you want to receive events.
- As
After these steps on BTP System Landscape -> Systems
, the registered system should be in Registered
state.
On Kyma Console/Cockpit click on Applications/Systems
, your should be able to see integrated early created
system under name mp-sap-cloud-for-customer-test
, and in state/status SERVING
.
Details should look like:
Bind this system to a specific K8S namespace by clicking + Create Binding
and select the K8S namespace,
where the service will be deployed, we are using "default" namespace.
Navigating to selected namespace into Service Management -> Catalog
. You should be able to see the service.
Details of created service:
Provision the Service Class in the selected (example is using default
) Namespace, by clicking the + Add
button,
and give a more friendly name.
Deploy the lambda function by following the guidance from deployments
To have calls from Kyma Function toward
SAP Sales Cloud OData API,
make sure that exist a service binding usage of your services c4c-address-verification
under created service instance.
Now is time to add triggers for events.
Using Kyma Console/Cockpit “Discovery and Network -> Services”
.
Select “c4c-address-verification”
service. Click on the button “+ Create Event Subscription”
,
select following events only: Account.Root.Created
and Account.Root.Updated
.
Check the logs of pod using Kyma Console/Cockpit or command line, seeing that everything is on green:
kubectl logs -f <name of pod instance> c4c-address-verification
As last step ensure that lambda function was deployed on Kyma Runtime without any errors, Event Subscription was attached to it. Operation on SAP Sales Cloud for Account could be done, by manipulating the addresses, and watching how the address is verified and updated.