Salesforce Configurations

This page describes how to connect to your Salesforce instance and how to get data from the Salesforce instance to Pricefx and vice versa.

Authentication type

OAuth2

PlatformManager compatible connections

REST OAuth2

API dev guide

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_resources.htm

Connection

You can instantiate the connection in two ways – in PlatformManager or in camel-context.xml (programmatic approach).

Connection Setup in Salesforce

For the Salesforce – PlatformManager connection, a “Connected App” needs to be created in Salesforce.

  1. Go to Settings, search for App, select App Manager > New Connected App.

     

  2. Fill in the following fields and click Save.

     

  3. Copy Consumer Key and Consumer Secret.

     

  4. Create a Service User.

Connection Setup in PlatformManager

  1. Fill in the connection fields as shown below. The following parameters need your custom values:

    • Name – Name your connection

    • Client ID – Consumer Key from Salesforce

    • URL – https://<<yourbox>>.salesforce.com

    • Auth URL – https://<<yourbox>>.salesforce.com/services/oauth2/token

    • Client secret – Consumer Secret from Salesforce

  2. If needed, add the following user information:

    • Username

    • Password

  3. Once done, deploy the connection.

 

For details on connections see the PlatformManager documentation.

Connection Setup in Platform Manager – Programmatic Approach

The same connection can also be created programmatically:

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <bean id="my-salesforce-connection" class="net.pricefx.integration.component.rest.domain.connection.OAuth2Connection"> <property name="clientId" value="3MVG98_Psg5cppyZ2_RommSclCNGMExKPRJOYaUFW7s74rofoU1UM_23KhwmfoNMmSUy"/> <property name="clientSecret" value="mySecret"/> <property name="authUrl" value="https://login.salesforce.com/services/oauth2/token"/> <property name="url" value="https://pricefx-dev-ed.my.salesforce.com"/> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring" useMDCLogging="true"> <contextScan/> </camelContext> </beans>

Using this way, the connection my-salesforce-connection will be available in connection pools in your IntegrationManager instance.

IntegrationManager version 5.8.0