Configuring Outbound Sync to send outbound requests to SCI

Run the completed outbound sync to SAP Cloud Integration (SCI) scenario.

Context

Now that the system is configured and tested, load the ImpEx provided in this topic, then run the outbound sync scenario with a ConsumedDestination pointing to an SCI integration flow resource.

The following ImpEx provides the OAuth and CSRF token generation configurations. The OAuth configuration includes the client name and secret you created as well as the OAuth token URL. For the CSRF Token, the ImpEx uses the additionalProperties column in ConsumedDestination. The value of additional properties is a map. For CSRF configuration, provide the key csrfURL, where the value is the URL to fetch the token from. For example:

"csrfURL->https://c1203-iflmap.hcisb.int.sap.hana.ondemand.com/gw/odata/SAP/OUTBOUNDSYNC2SCPIEXAMPLE;v=1"

Procedure

  1. Load the following ImpEx.
    #******************************************#
    #************  OAuth CredentialS **********#
    #******************************************#
    INSERT_UPDATE OAuthClientDetails; clientId[unique = true]; oAuthUrl; scope
    ; pablo-test ; https://oauthasservices-w47eb78ee.int.sap.hana.ondemand.com/oauth2/api/v1/token
    INSERT_UPDATE ExposedOAuthCredential; id[unique = true]; oAuthClientDetails(clientId); password
    ; scpi-testOauthCredential ; pablo-test ; 
     
    ###############################################################
    # This sets up the endpoint called "local-hybris."
    # #############################################################
    INSERT_UPDATE Endpoint; id[unique = true]; version[unique = true]; name; specUrl
    ; local-hybris ; unknown ; local-hybris ; "https://c1203-iflmap.hcisb.int.sap.hana.ondemand.com/gw/odata/SAP/OUTBOUNDSYNC2SCPIEXAMPLE;v=1"
     
    ##############################################################
    # This sets up a ConsumedDestination called "outbound-sync-to-scpi."
    # It uses the Endpoint and BasicCredential created above. The user calls
    # the Outbound Service with the destination ID (e.g. "outbound-sync-to-scpi").
    # The Outbound Service looks up the details of the destination by ID,
    # so it knows where to send the data
    # ############################################################
    INSERT_UPDATE DestinationTarget; id[unique = true]
    ; stoutoutboundtest
     
    INSERT_UPDATE ConsumedDestination; id[unique = true]; url; endpoint(id, version); credential(id); destinationTarget(id)[default = stoutoutboundtest]; additionalProperties(key, value)[map-delimiter=|]
    ; outbound-sync-to-scpi ; "https://c1203-iflmap.hcisb.int.sap.hana.ondemand.com/gw/odata/SAP/OUTBOUNDSYNC2SCPIEXAMPLE;v=1/Catalogs" ; local-hybris:unknown ; scpi-testOauthCredential ; ; "csrfURL->https://c1203-iflmap.hcisb.int.sap.hana.ondemand.com/gw/odata/SAP/OUTBOUNDSYNC2SCPIEXAMPLE;v=1"
     
    # Set up a product stream that will detect changes made to the Product type and include it in the outboundSyncDataStreams OutboundSyncStreamConfigurationContainer
    # NOTE: The whereClause is an example of how to filter out Product changes that don't have catalogVersion.version as 'Online'
    INSERT_UPDATE OutboundSyncStreamConfiguration; streamId[unique = true]; container(id); itemTypeForStream(code); outboundChannelConfiguration(code); whereClause;
    ; productStream ; outboundSyncDataStreams ; Catalog ; outboundExample ;
     
    INSERT_UPDATE OutboundChannelConfiguration; code[unique = true]; integrationObject(code); destination(id)
    ; outboundExample ; OutboundProduct ; outbound-sync-to-scpi
  2. Execute the cronjob for outbound sync. If there are changes to the Catalog type, the Integration API takes care of authentication, fetches the CSRF token, and makes the POST request with the Catalog in the body.

    If the job runs and the synchronization completes successfully, then you correctly configured outbound sync to SCI.