Configuring Outbound Communication Between SAP Commerce Cloud and SAP Cloud Integration

Set up the outbound configuration to send data from SAP Commerce Cloud to the SAP Cloud Integration (SCPI) tenant.

Context

If you already set up this configuration in the essentialdata-OutboundDestinations.impex located within the sapcpiadapter extension, you can skip this procedure.

Procedure

  1. Log in to the Administration Console.
  2. Go to the Console tab and select the ImpEx Import option.
  3. Create an instance of OAuthClientDetails using:
    INSERT_UPDATE OAuthClientDetails; clientId[unique = true]; oAuthUrl; scope
    
    ; <sampleClientId> ; https://oauthasservices-${INSERT HERE}.hana.ondemand.com/oauth2/api/v1/token

    Where:

    • clientId is the name of the Oauth client configured in SCPI
    • oAuthUrl is the token endpoint URL from the SCPI cockpit
  4. Modify the existing instance of ConsumedOAuthCredential using the following script:
    INSERT_UPDATE {color:#DE350B}ConsumedOAuthCredential{color}; id[unique = true] ; oAuthClientDetails(clientId); oauthURL;clientSecret
    ;scpiOauthCredential;<sampleClientId>;<oAuthUrl>;<oAuthClientSecret>

    Where:

    • sampleClientID is the clientId of the OAuthClientDetails created in the previous step
    • oAuthUrl is the token endpoint URL from the SCPI cockpit
    • oAuthClientSecret is the secret from the SCPI cockpit
  5. Run the following ImpEx script:
    INSERT_UPDATE DestinationTarget; id[unique=true]
    ; scpiOutboundDestination
  6. Run the following script, replacing the specUrl for each scpi*Endpoint entry with the URL from the endpoint of the appropriate integration flow, and including the following modifications.
    INSERT_UPDATE Endpoint; id[unique = true]; version[unique = true]; specUrl; name
    
    ; scpiCustomerEndpoint ; unknown ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-B2C-CUSTOMER-FROM-SAP-COMMERCE-CLOUD-TO-ERP/$metadata;v=1/" ; scpiCustomerEndpoint
    
    ; scpiB2BCustomerEndpoint ; unknown ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-B2B-CUSTOMER-FROM-SAP-COMMERCE-CLOUD-TO-ERP/$metadata;v=1/" ; scpiB2BCustomerEndpoint
    
    ; scpiOrderEndpoint ; unknown ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-ORDERS-FROM-SAP-COMMERCE-CLOUD-TO-SAP-ERP/$metadata;v=1/" ; scpiOrderEndpoint
    
    ; scpiOrderCancellationEndpoint ; unknown ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-ORDER-CANCELLATIONS-FROM-SAP-COMMERCE-CLOUD-TO-SAP-ERP/$metadata;v=1/" ; scpiOrderCancellationEndpoint
    • Before ;v=1 at the end of each segment, insert /$metadata, as shown.
    • Add / to the end of the URL, as shown.
  7. Run the following script, with the following modifications:
    INSERT_UPDATE ConsumedDestination; id[unique = true]; url; endpoint(id, version); credential(id); destinationTarget(id); additionalProperties
    ; scpiCustomerDestination ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-B2C-CUSTOMER-FROM-SAP-COMMERCE-CLOUD-TO-ERP;v=1/SAPCpiOutboundCustomers" ; scpiCustomerEndpoint:unknown ; scpiOauthCredential; scpiOutboundDestination
    ; scpiB2BCustomerDestination ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-B2B-CUSTOMER-FROM-SAP-COMMERCE-CLOUD-TO-SAP-ERP;v=1/SAPCpiOutboundB2BCustomers" ; scpiB2BCustomerEndpoint:unknown ; scpiOauthCredential ;scpiOutboundDestination
    ; scpiOrderDestination ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-ORDERS-FROM-SAP-COMMERCE-CLOUD-TO-SAP-ERP;v=1/SAPCpiOutboundOrders" ; scpiOrderEndpoint:unknown ; scpiOauthCredential ;scpiOutboundDestination
    ; scpiOrderCancellationDestination ; "https://${URL HERE}.hana.ondemand.com/gw/odata/SAP/REPLICATE-ORDER-CANCELLATIONS-FROM-SAP-COMMERCE-CLOUD-TO-SAP-ERP;v=1/SAPCpiOutboundOrderCancellations" ; scpiOrderCancellationEndpoint:unknown ; scpiOauthCredential ;scpiOutboundDestination
    • Copy the Endpoint URL from the SCPI tenant to each scpi*Destination.
    • Append /${Entity} to each URL, where ${Entity} is the suffix that appears in the default template values.