ݺߣ

ݺߣShare a Scribd company logo
Cook Book to create SFDC Configuration Project in Mule 3.6 and Above Using
Query Builder.
Purpose :This documentHelpsbeginnerstoconnectthe SalesforceviaMule SFDCconnectorbyusing
the newData SensesQueryLanguage andQueryBuilder.
Pre-requisites:
1. Salesforce DeveloperAccount( with SystemAdministratorAccess)
2. AfterSuccessful Login,ToKnowyourprofile Goto ?My profile ? LoggedUser? Role
3. Note:With SystemAdministratorAccess,Youcansee ResetSecurityTokenoption.
4. Go to ?My settings ? Personal? ResetMySecurityToken
5. WhenResetMy SecurityTokenpressedthenNew securitytokensenttoregisteredemail.
1. Create A Mule projectinAnypointStudio.
Mule-SFDC-cook book
2. Create Global configurationforthe salesforce connector andHTTPListener(mule 3.6and
above).ConfigureSalesforce UserID, Passwordandthe securityToken.(Received inemail)
3. TestConnectionuntil itgetssuccessful.( Bestpractice isto give reference variablesratherthan
hardcodingthe valuesforfuture changes)
Configure HTTPconfiguration
Configure Salesforce component: Addthe reference tothe global SFDCconnector.
Clickon the QueryBuilder:Selectthe Type youtryingtobuildthe Query.Itenablesthe fieldstobe
selected.
In additiontothe Queryfieldswe canaddthe filters,OrderBy,Limit,Directionandoffset.
Simple Salesforce configuration
<?xml version="1.0"encoding="UTF-8"?>
<mule xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"version="EE-3.6.1"
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-current.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/sfdc
http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
http://www.mulesoft.org/schema/mule/json
http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
<sfdc:configname="Salesforce__Basic_authentication"username="gdssrao@gmail.com"
password="xxxxxx"securityToken="yq2RUzVxdJsCWV5DFYDgFfjt"doc:name="Salesforce:Basic
authentication"/>
<http:listener-configname="HTTP_Listener_Configuration"host="localhost"port="8065"
basePath="sfdcdemo"doc:name="HTTPListenerConfiguration"/>
<flowname="sfdc_demoFlow">
<http:listenerconfig-ref="HTTP_Listener_Configuration"path="/"doc:name="HTTP"/>
<sfdc:queryconfig-ref="Salesforce__Basic_authentication"query="dsql:SELECT
AccountNumber,Id,Name FROMAccountORDERBY AccountNumberASCLIMIT5 OFFSET1"
doc:name="Salesforce"/>
<json:object-to-json-transformerdoc:name="ObjecttoJSON"/>
</flow>
</mule>
Run Project.
SFDC SOQLQueryResult:inWebbrowser
Thank You
GDS SashidharRao
gdssroa@gmail.com
Twitter:Gdssrao

More Related Content

Mule-SFDC-cook book