In this article, we are going to demonstrate how to subscribe to Salesforce events in Oracle Autonomous Integration Cloud (AIC). Once the events are received in AIC the data can be pushed into any on-premise / SaaS applications

In this blog, we’ll subscribe to the Salesforce Opportunity events and inserts the data into Oracle database. Same ways once the data received in AIC from SFDC the data can be synchronized into any SaaS application.

Below are some pre-requisites to complete this article

  • Salesforce instance subscription. If you don’t have please subscribe for the free trial from here
  • Oracle Authonous Integration Cloud instance subscription. If  you don’t have please subscribe for the free trial from here
  • Oracle Database and create below table
   (           “OPPORTUNITYID” VARCHAR2(200 BYTE),
                “OPPORTUNITYNAME” VARCHAR2(200 BYTE),
                “ACCOUNTNAME” VARCHAR2(200 BYTE),
                “AMOUNT” NUMBER,
                “STAGE” VARCHAR2(200 BYTE),
                “OWNER” VARCHAR2(200 BYTE)
  • Oracle AIC agent
  • Please read the article before starting this article as it will give you insights on how to create workflow rules and outbound messaging in SFDC
Let’s get started and see how to achieve the use case
  • Login into the Oracle AIC instance and move to the Integrations
  • Move to the Integrations and click on the Create button
  • Select App Driven Orchestration pattern
  • Enter Integration name as CreateOpportunity and click Create button
  • Click on the + sign and select SFDC adapter as a source
  • Enter endpoint name as GetOpportunity and click Next button
  • Select the Salesforce outbound WSDL using the Choose file button. This is the same WDL which we exported from the Salesforce in the blog. Once selected, click on Next button
  • Deselect the Send a Response checkbox and click Next
  • Click Done button
  • After this step, integration canvas will look this
  • Select DB adapter
  • Enter below information and click Next
    • What do you want to call your endpoint: Enter endpoint name of your choice. In this case, we have entered InsertOpportunityData
    • What operation do you want to perform: Select “Perform an Operation on a Table” and thereafter select “Insert” Operation
  • Select below information and click on Import Tables button
    • Schema: Since the table (Opportunity) in which data will be inserted resides under HR schema, so select HR schema
    • Table Type: TABLE
    • Table Name: Table name is “Opportunity”, so search the same and move to the Available pane
  • Select “OPPORTUNITYID” as the primary key column and click OK button
  • Select the Next button
  • Select the Done button
  • After this step, integration canvas will look like below
  • Edit the InsertOpportunityData mapper
  • Map the required columns as shown in the below image. Notification and Opportunity object both are repeated element so drag  Notification onto Opportunity object
    • Id –> OpportunityId
    • Name –> OpportunityName
    • AccountId –> accountname
    • Amount –> amount
    • StageName –> stage
    • OwnerId –> owner
  • Just validate the mapper and close
  • Enable Tracing
  • Integration is completed now. Just save the integration and activate. Once integration is successfully activated, notice the WSDL endpoint shown on the top
  • Click on the WSDL link which will open on the new tab. Copy the WSDL URL till last forward slash (/)
  • Go back to the SFDC and search the Outbound message which we create in the previous blog
  • Enter the AIC WSDL endpoint in the Endpoint URL and click Save button
  • Let’s create new Opportunity in SFDC. Navigate to the Opportunity object and click on New button
  • Enter Opportunity details and click Save button. Make sure the Stage is “Prospecting“. It is because during writing the workflow rules in SFDC we selected the criteria that the Outbound Message will be triggered only when Stage is equal to “Prospecting” 
  • Go back to the AIC Monitoring tab and see one instance should be triggered
  • Open database table and see the opportunity data should be inserted into the table

These ways the SFDC data can be pushed into any SaaS applications.