Update salesforce objects and listen to the salesforce objects via WSO2 Micro Integrator

Prerequisites: Salesforce Access Token Generation

Configuring Managed Application in Salesforce

  • Enable OAuth Settings
  • Add https://login.salesforce.com as the Callback URL
  • Select Manage user data via APIs, Manage user data via Web, Perform requests at any time
https://<INSTANCE>.salesforce.com/services/oauth2/authorize?response_type=code&client_id=<CONSUMER_KEY>&redirect_uri=https://login.salesforce.com
  • INSTANCE: “Instance Name” in my example it is “UM8”. You can get it by navigating to company information from the left toolbar
  • CONSUMER_KEY: Navigate to app manager and view your application. and under API(Enable OAuth Settings), you could see the “Consumer Key”

Scenario 1: Creating the Integration Project to Update Salesforce Objects

Download necessary connectors

  • Copy org.apache.synapse.salesforce.poll.class-2.0.1.jar file into <ProductHome>/lib folder.
  • Connector will be added to the integration project we create in the following stage

Create integration to connect with Salesforce REST API

Export the integration to Micro Integrator

Testing the scenario

Scenario 1: Create integration to listen to with Salesforce Objects

Setting up the PushTopic in Salesforce

Testing the PushTopic Channel

Reset Security Token

Configuring inbound endpoint to listen to the salesforce object

Testing the scenario

[2022-02-18 20:14:37,390]  INFO {LogMediator} - To: , MessageID: urn:uuid:460A228DA9E6CCC1381645195477388, Direction: request, Integration = salesforce listener, Payload: {"event":{"createdDate":"2022-02-18T14:44:36.545Z","replayId":4,"type":"created"},"sobject":{"Id":"0018d000006o1OPAAY","Name":"SA_EU2"}}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store