Integrating Commerce Cloud using ICS and WebHooks

Introduction:

Oracle Commerce Cloud is a SaaS application and is a part of the comprehensive CX suite of applications. It is the most extensible, cloud-based ecommerce platform offering retailers the flexibility and agility needed to get to market faster and deliver desired user experiences across any device.

Oracle’s iPaaS solution is the most comprehensive cloud based integration platform in the market today.  Integration Cloud Service (ICS) gives customers an elevated user experience that makescomplex integration simple to implement.

Commerce Cloud provides various webhooks for integration with other products. A webhook sends a JSON notification to URLs you specify each time an event occurs. External systems can implement the Oracle Commerce Cloud Service API to process the results of a webhook callback request. For example, you can configure the Order Submit webhook to send a notification to your order management system every time a shopper successfully submits an order.

In this article, we will explore how ICS can be used for such integrations. We will use the Abandoned Cart Web Hook which is triggered when a customer leaves the shopping cart idle for a specified period of time. We will use ICS to subscribe to this Web Hook.

ICS provides pre-defined adapters, easy to use visual mechanism for transforming and mapping data, fan out mechanism to send data to multiple end points. It also provides and ability to orchestrate and encrich the payload.

Main Article:

For the purpose of this example, we will create a task in Oracle Sales Cloud (OSC), when the Idle Cart Web Hook is triggered.

The high level steps for creating this integration are:

  1. Register an application in Commerce Cloud
  2. Create a connection to Commerce Cloud in ICS
  3. Create a connection to Sales Cloud in ICS
  4. Create an integration using the 2 newly created connections
  5. Activate the integration and register its endpoint with Abandoned Cart Web Hook

Now let us go over each of these steps in detail

 

Register an application in Commerce Cloud

Login to Admin UI of commerce cloud. Click on Settings

01_CCDashBoard

 

 

 

Click on Web APIs

02_CCSettings

 

 

 

 

 

 

 

 

 

 

 

Click on Registered Applications

03_CCWebAPIs

 

 

 

 

 

 

 

Click on Register Application

04_CCWebAPIsRegisteredApps

 

 

 

 

 

Provide a name for the application and click Save

05_CCNewApp

 

 

 

 

 

A new application is registered and a unique application id and key is created. Click on Click to reveal to view the application key

06_CCNewAppKey1

 

 

 

 

 

Copy the application key that is revealed. This will later be provided while configuring connection to Commerce Cloud in ICS

07_CCNewAppKey2

 

 

 

 

 

You can see the new application is displayed in the list of Registered Applications

08_CCWebAPIsRegisteredApps2

 

 

 

 

 

Create a connection to Commerce Cloud in ICS

From the ICS Dashboard, click Connections to get to the connections section

01_ICSDashboard

 

 

 

 

 

Click Create New Connection

02_Connections

 

 

 

 

 

 

Create Connection – Select Adapter page is displayed. This page lists all the available adapters

03_ICSCreateNewConn

 

 

 

 

 

 

 

 

 

Search for Oracle Commerce Cloud and click Select

04_ICSNewConnCC

 

 

 

 

 

 

 

 

 

Provide a connection name and click Create

05_ICSNewConnCCName

 

 

 

 

 

 

ICS displays the message that connection was created successfully. Click Configure Connectivity

06_ICSNewConnCCCreated

 

 

 

 

 

Provide the Connection base URL. It is of the format https://<site_hostname>:443/ccadmin/v1. Click OK

07_ICSNewConnCCURL

 

 

 

Click Configure Security

08_ICSNewConnCCConfigureSecurity

 

 

 

 

Provide the Security Token. This is the value we copied after registering the application in Commerce Cloud. Click OK

09_ICSNewConnCCOAuthCreds

 

 

 

 

The final step is to test the connection. Click Test

10_ICSNewConnCCTest

 

 

ICS displays the message, if connection test is successful. Click Save

11_ICSNewConnCCTestResult

 

 

 

Create a connection to Sales Cloud in ICS

For details about this step and optionally how to use Sales Cloud Events with ICS, review this article

Create an integration using the 2 newly created connections

From the ICS Dashboard, click Integrations to get to the integrations area

01_Home

 

 

 

 

 

 

 

Click Create New Integration

02_CreateIntegration

 

 

Under Basic Map My Data, click Select

03_Pattern

 

 

 

 

 

Provide a name for the integration and click Create

04_Name

 

 

 

 

 

 

Drag the newly create Commerce Cloud connection from the right, to the trigger area on the left

05_SourceConn

 

 

 

 

 

Provide a name for the endpoint and click Next

06_EP1

 

 

 

 

 

 

Here you can chose various business objects that are exposed by the Commerce Cloud adapter. For the purpose of this integration, chose idleCart and click Next

07_IdleCartEvent

 

 

 

 

 

 

Review the endpoint summary page and click Done

08_EP1ConfigSummary

 

 

 

 

 

 

 

Similarly, drag and drop a Sales Cloud connection to the Invoke

09_TargetConn

 

 

 

 

 

Provide a name for the endpoint and click Next

10_EP2Name

 

 

 

 

 

Chose ActivityService and createActivity operation and click Next

11_CreateActivity

 

 

 

 

 

 

 

 

 

Review the summary and click Done

12_EP2Summary

 

 

 

 

 

Click the icon to create a map and click the “+” icon

This opens the mapping editor. You can create the mapping as desired. For the purpose of this article, a very simple mapping was created:

ActivityFunctionCode was assigned a fixed value of TASK. Subject was mapped to orderId from idleCart event.

22_ICSCreateIntegration

 

 

 

 

 

 

Add tracking fields to the integration and save the integration

25_ICSCreateIntegration

 

 

 

 

 

 

Activate the integration and register its endpoint with Abandoned Cart Web Hook

In the main integrations page, against the newly created integration, click Activate

26_ICSCreateIntegration

 

 

 

 

Optionally, check the box to enable tracing and click Yes

27_ICSCreateIntegration

 

 

 

 

ICS displays the message that the activation was successful. You can see the status as Active.

28_ICSCreateIntegration

 

 

 

Click the information icon for the newly activated integration. This displays the endpoint URL for this integration. Copy the URL. Remove the “/metadata” at the end of the URL. This URL will be provided in the Web Hook configuration of Commerce Cloud.

29_ICSCreateIntegration

 

 

 

 

In the Commerce Cloud admin UI, navigate to Settings -> Web APIs -> Webhook tab -> Event APIs -> Cart Idle – Production. Paste the URL and provide the ICS credentials for Basic Authorization

Webhook

 

 

 

 

 

 

By default, Abandoned cart event fires after 20 minutes. This and other settings can be modified. Navigate to Settings -> Extension Settings -> Abandoned Cart Settings. You can now configure the minutes until the webhook is fired. For testing, you can set it to a low value.

 

CCAbandonedCartSettings

 

 

 

 

 

 

 

 

This completes all the steps required for this integration. Now every time a customer adds items to a cart and leaves it idle for the specified time, this integration will create a task in OSC.

 

References / Further Reading:

Using Commerce Cloud Web Hooks

Using Event Handling Framework for Outbound Integration of Oracle Sales Cloud using Integration Cloud Service

Add Your Comment