Integrating SAP CX AI Toolkit with SAP Commerce Cloud

Objective

After completing this lesson, you will be able to perform the essential steps to configure the integration of SAP CX AI Toolkit with SAP Commerce Cloud

Prepare SAP Commerce Cloud

Once you complete the initial login to the SAP CX AI Toolkit as an admin user, it’s time to set up the integration between the SAP CX AI Toolkit tenant and SAP Commerce Cloud.

First, prepare SAP Commerce Cloud for integration by completing these three essential tasks:

  1. Prepare the manifest.json file.
  2. Validate and configure the settings of the necessary integration objects.
  3. Create the OAuth client for authentication with the SAP CX AI Toolkit.

Task 1: Prepare the manifest.json File

To prepare the SAP Commerce Cloud server for integration with the SAP CX AI Toolkit, include the necessary extensions in the manifest.json file.

Code Snippet
12345678910111213
inboundservices integrationbackoffice integrationbackofficetest integrationmonitoringbackoffice integrationservices odata2services odata2webservices outboundservices outboundsync outboundsyncbackoffice webhookbackoffice webhookservices

Additionally, ensure the odata2webservices service is configured in one of the nodes in the manifest.json file, as shown in the following example:

Code Snippet
12345678910111213
"aspects": [ { "name": "backoffice", "properties": [ ... ], "webapps": [ ..., { "name": "odata2webservices" }, …], … } ]

The odata2webservices component facilitates communication between SAP Commerce Cloud and the SAP CX AI Toolkit. Determine which server node will host the odata2webservices service. In this example, the backoffice node will host it for demonstration purposes, but the API node is typically more suitable.

Finally, trigger a build based on the prepared manifest.json file and deploy the successful build to the designated SAP Commerce Cloud environment.

Task 2: Validate and Configure the Settings of the Necessary Integration Objects

In the successfully deployed SAP Commerce Cloud environment, ensure that the following predefined integration objects are correctly configured:

  • IntegrationService
  • ScriptService
  • OutboundChannelConfig

Specifically, we need to:

  1. Ensure all listed integration objects are OAuth-enabled.
  2. Validate that the exposed attributes of the integration objects align with the required attributes for future communication with the SAP CX AI toolkit.
  3. Ensure the OAuthUrl attribute is exposed as part of the ConsumedDestination attribute in the OutboundChannelConfig object.

Watch the following video for a step-by-step guide on how to perform these tasks:

For the final step demonstrated in the video, use the following ImpEx script as a reference:

Code Snippet
123
INSERT_UPDATE IntegrationObjectItemAttribute;integrationObjectItem(integrationObject(code), code)[unique = true];attributeName[unique = true];attributeDescriptor(enclosingType(code),qualifier) ;OutboundChannelConfig:ConsumedOAuthCredential;oAuthUrl;ConsumedOAuthCredential:oAuthUrl;

Task 3: Create OAuth Client for Authentication with SAP CX AI Toolkit

To enable the CX AI Toolkit to obtain authentication and authorization keys for data communication with SAP Commerce Cloud, create an OAuth Client. Watch the following demo to learn how to create one.

With these tasks completed, the SAP Commerce Cloud server is now ready for integration.

Configure SAP CX AI Toolkit for the Integration

With the prepared SAP Commerce Cloud server, we are ready to set up the integration with the SAP CX AI Toolkit. Watch the following video to cover the essentials.

Now that you've set up the integration in the SAP CX AI Toolkit tenant, let's move on to the next step: validating the connection and synchronizing the data.

Verify the Integration

In this step, our aim is to confirm:

  • The necessary integration components have been created in SAP Commerce Cloud through the previously introduced setup.
  • Data synchronization from SAP Commerce Cloud to the SAP CX AI Toolkit has begun.

Watch the following video for more details.

Note

The initial synchronization process may take several hours to complete, depending on the volume of data, as it continues until all CronJobs have been successfully executed. While not recommended, you can manually trigger the product catalog CronJobs by selecting the Run CronJob action button for the specific CronJob.

Log in to track your progress & complete quizzes