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

Introduction:

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.

Oracle Sales Cloud (OSC) is a SaaS application and is a part of the comprehensive CX suite of applications. Since OSC is usually the customer master and is the center for all Sales related activities, integration with OSC is often a requirement in most use cases

Although OSC provides useful tools for outbound as well as inbound integration, it is a common practice to use ICS as a tool to integrate OSC and other SaaS as well as on-premises applications. In this article, I will explore this topic in detail and also demonstrate the use of Event Handling Framework (EHF) in OSC to achieve the same.

Main Article:

Within ICS you can leverage the OSC adapter to create an integration flow. OSC can act both as source (inbound)  or as target (outbound) for integration with other SaaS or on-premises applications; with ICS in the middle acting as the integration agent. While the inbound integration flow is triggered by the source application, invoking the outbound flow is the responsibility of OSC.

InboundIntegration OurboundIntegration

In this article, I will discuss the outbound flow, where OSC acts as the source and other applications serve as the target. There are essentially 2 ways of triggering this integration:

  • Invoking the ICS integration every time the object which needs to be integrated is created or updated. This can be achieved by writing groovy code inside create/update triggers of the object and invoking the flow web service by passing in the payload.
  • Using the Event Handling Framework (EHF) to generate an update or create event on the object and notify the subscribers. In this case, ICS registers itself with OSC and gets notified when the event gets fired along with the payload

 

OSC supports events for most important business objects such as Contact, Opportunities, Partners etc. More objects are being enabled with EHF support on a continuous basis.

In this article, I will demonstrate how to use EHF to achieve an outbound integration. We will create a flow in ICS which subscribes to the “Contact Created” event and on being notified of the event, updates the newly created contact object. While this integration is quite basic, it demonstrates the concept. While we use Update Contact as a target for our integration, you can use another SaaS application (for example Siebel or Service Cloud) as the target and create a Contact there.

Integration

 

Detailed steps:

Before starting, let’s identify some URLs. For the example, we will need 2 URLs – One for CommonDomain and one for CRMDomain. You can find these out using from Review Topology under Setup and Maintenance

CRM_URL FS_URL

The URLs will be of the following form:

CommonDomain: https://<instance_name>.fs.us2.oraclecloud.com

CRMDomain: https://<instance_name>.crm.us2.oraclecloud.com

I will refer to these URLs as COMMON_DOMAIN_URL and CRM_DOMAIN_URL in the rest of the article.

Let’s now move on to configuring our environment and creating a example integration based on events.

The first step is to create a CSF key so that Sales Cloud can connect to ICS and invoke the subscriptions. In R12, this can be achieved through SOA Composer. To access SOA Composer, navigate to <CRM_DOMAIN_URL>/soa/composer

Inside SOA Composer, click on “Manage Security” to  open “Manage Credentials” dialog. The name of csf-key should be the same as identity domain on the ICS instance. Provide username and password of the user that OSC should use to invoke ICS subscriptions.

Note: Customers don’t have this ability in R10 and R11 and it has to be done by the operations team, so customers need to raise an SR.

001_CSF_Key

Login to ICS Console and and in the home page, click on Create Connections followed by Create New Connection

01_ICS_Home_Page

02_Connections

Click Select under Oracle Sales Cloud

 

03_Create_Connection

Provide a unique name and identifier for the connection. Optionally, provide a detailed description. Click Create

04_New_Connection

 

You will see the prompt that the connection was created successfully and will automatically go to the connection details page. It tracks your progress as well. Click Configure Connectivity

05_Connection_Created

In the Connection Properties page, provide details as follows:

OSC Services Catalog WSDL URL: <COMMON_DOMAIN_URL>/fndAppCoreServices/ServiceCatalogService?wsdl

OSC Events Catalog URL: <CRM_DOMAIN_URL >/soa-infra.

06_Connection_Properties

Click Configure Connectivity

07_Configure_Credential

Provide credentials of the service user that will be user for integration and click OK

08_Credentials

Connection details page shows the connection is 85% complete. The only step remaining at this point it to test the connection to make sure all the details provided are correct. Click on Test

09_Test

If all the provided details are correct, you will see message confirming the test was successful. Progress indicator also shows 100%. At this point, you Save and click Exit Integration.

10_Test_Successful

You see a confirmation that the connection was saved successfully. You can also see the new connection in the list.

11_Connections

The next step is to use this connection to create an integration. Click on Integrations followed by Create New Integration.

12_Create_Integration

In the Create Integration – Select a Pattern dialog, click Select under Map My Data. You may choose a different pattern based on your integration requirements but for this example, we will use Map My Data pattern.

13_Select_Pattern

In the New Integration – Information dialog provide the unique name and identifier for this integration, an appropriate version number, and optionally a package name and description.

14_Integration_Information

Drag and drop the connection that we created on the source. This opens the Configure Sales Cloud Endpoint wizard.

15_Integration_Created

In the Configure Sales Cloud Endpoint wizard, provide the name, and optionally a description of the endpoint. Click Next.

16_Configure_Sales_Cloud_EP

In section titled Configure a Request, choose With Business Events to create this integration using Business Events in OSC. For this example, we will use Contact Created Event which fires when a contact is created is OSC. Click Next.

17_Pick_Event

In the next screen under section titled Response Type, choose None and click Next.

18_Response

The wizard shows the endpoint summary. Review the details and click Done.

19_EP_Summary

Now we have to create a target endpoint. Usually this target will be another application that we are integrating with OSC. For our example, we will simply use OSC as a target application itself. Drag and drop the OSC connection we created earlier into the target.

20_EP1_Done

In the Configure Sales Cloud Endpoint wizard, provide the name, and optionally a description of the endpoint. Click Next.

21_Configure_Sales_Cloud_EP

Under section titled Select a Business Object find the Contact object and click on it. The drop down below the operations this object supports. For this example, choose updateContact and click Next.

22_Pick_Business_Object

The wizard shows the endpoint summary. Review the details and click Done.

23_EP2_Summary

Now we need to map the source payload to the target payload. Clicking on the Map icon followed by the “+” icon to create a mapping.

24_EP1_Done

In the mapping wizard, you can specify the appropriate mapping. For our example, we will use a very simple mapping to update the PreviousLastName with the value of LastName we received in the payload. This doesn’t add a lot of value, but serves the purpose of illustrating an end-to-end integration. Drag and drop PartyId to PartyId from source to target and LastName to PreviousLastName from source to target. Click Save and Exit Mapper.

25_Map1

The integration details page shows our integration is 77% complete. One final step is to add tracking fields which allow us to identify various instances of integration. Click on Tracking.

26_Tracking

Drag and drop appropriate fields from Source into tracking fields and click Done.

27_Tracking_Identifiers

Now our integration is 100% complete. We can optionally choose an action for the response and fault. For our example, we will skip this step. Click on Save followed by Exit Integration.

28_integration_Complete

ICS console shows the integration was saved successfully. Newly created integration also shows up in the list of integrations. Click to Activate to activate this integration.

29_Integration_Saved

In the confirmation dialog, click Yes.

30_Activation_Confirmation

Once the integration is active, a subscription for it is created in OSC. You can review this subscription, as well as all the other subscriptions by invoking the following URL from your browser:

<CRM_DOMAIN_URL>/soa-infra/PublicEvent/subscriptions

31_Subscriptions

You can now create a Contact in Sales Cloud and it will almost instantaneously be updated with the new value of Previous Last Name.

 

Comments

  1. Hi Team,

    1) We have to implement a integration between SAP (on-premise) to Fusion Cloud Product HUb and Customer HUB integrations. Please suggest us on which adapter to use in ICS to load data into Product/Customer HUB.
    2) Once the data is loaded into product hub, we need to subscribe to events in Product Hub and load the data to Sales Cloud and CPQ. Please suggest how can we subscribe to events in product and customer hubs.

    Thanks & Regards,
    praveen.

  2. Hi Team

    We have implemented the OSC events pattern as described above for account creation event. We could see the ICS subscription in OSC subscriptions URL. Everything looks fine. However, when we create a new customer, nothing happens in ICS.

    Can you please confirm if there’s anything else to be done in OSC for raising the events?

    Thanks
    AJ

    • Ajay,
      Enable the Trading Community Events profile option using the following steps:
      1. Log into Oracle Sales Cloud with system administrator privileges.
      2. Navigate to Setup and Maintenance, and then click the All Tasks tab.
      3. In the Search view, enter Manage Trading Community Common Profile Options, then in the Search Results, click Go to Task.
      4. In the Manage Trading Community Common Profile Options Overview page, select the following profile option: HZ_ENABLE_EVENT_TRACKING.
      5. In the HZ_ENABLE_EVENT_TRACKING: Profile Values page, set the Site level value to Yes, and then click Save and Close.
      6. In the Manage Trading Community Common Profile Options Overview page, select the following profile option: HZ_INVOKE_OBJ_WF_ON_TRACKING.
      7. In the HZ_INVOKE_OBJ_WF_ON_TRACKING: Profile Values page, set the Site level value to Yes, then click Save and Close.

Add Your Comment