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 |
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.
Go to Settings, search for App, select App Manager > New Connected App.
Ā
Fill in the following fields and click Save.
Ā
Copy Consumer Key and Consumer Secret.
Ā
Create a Service User.
Connection Setup in PlatformManager
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
If needed, add the following user information:
Username
Password
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.
Related content
IntegrationManager version 6.0.0