Enter your keyword

post

Oracle Integration Cloud: CRUD Operation (Update) using Salesforce Adapter (Part-4)

This article in the continuation of the series in which we are performing CRUD operation.

In this fourth part of the series, we’ll demonstrate the Update employees details using Salesforce adapter in Integration Cloud.

Use Case: Expose a REST API in Integration Cloud which will update the employee details in SFDC

Others part of the Series
                                                                                                  

The integration will look like POST completion

Let’s get started and complete the PUT operation

  • Create an Integration and Select the App Driven Orchestration pattern
  • Provide the integration name as UpdateEmployee
  • Drop or Select the REST connection on the integration canvas as a Trigger point
  • Provide the information as below and click the Next button
    • What do you want to call your endpoint: UpdateEmployees
    • What is the endpoint’s relative resource URI?: /employees/{employeeid}
    • What action do you want to perform on this endpoint: PUT
    • Check the checkbox Configure  a request payload for this endpoint
  • Click the Next button without any change here
  • On the Request page, enter below information and click the Next button
    • Select JSON Sample from the request payload format drop-down, click << inline >> link and enter below sample JSON payload
{
         “EmployeeName”“”,

         “EmployeeEmailId”“”,

         “EmployeeAge”11,

         “EmployeeQualification”“”

}
  • Drop an SFDC adapter just below the REST adapter
  • Enter below information and click the Next button
    • What do you want to call your endpoint?: ModifyEmployee
    • Check the Standard applications delivered by Salesforce.com checkbox
  • Enter below information and click the Next button
    • Select CRUD, update operation from the Operation Type drop down
    • Search the SFDC object(employee) and move the Employee__c object to the selected pane
  • Edit the ModifyEmployee mapper and map the element as below
    • TemplateParameter (employeeid) –> id
    • EmployeeName –> Employee_Age__c
    • EmployeeEmailId –> Employee_Email_id__c
    • EmployeeName –> Employee_Name__c
    • EmployeeQualification –> Employee_Qualification__c
  • Integration is completed now. Save and Activate the integration
  • Let’s test the integration via the POSTMAN tool. Enter the REST endpoint URL and enter below request payload and Submit
{
         “EmployeeName”“Ankur_updated”,

         “EmployeeEmailId”“ankur@gmail.com”,

         “EmployeeAge”30,

         “EmployeeQualification”“MCA”

}
  • Open SFDC custom object and see the Employee should be updated

Leave a Reply

Your email address will not be published.