SlideShare a Scribd company logo
Salesforce connector Example
Connect with Salesforce
Mulesoft application uses pre-packaged tools to connect with Salesforce.
Based on a simple use case, the application takes a CSV file of contacts and uploads
the contact information into Salesforce user account.
It uses Data Mapper Transformer to map and transform data.
Example:
The application accepts CSV files which contain contact information name, phone
number, email.
By using the CSV file upload them into a Salesforce account.
CSV file Salesforce view after uploading
Need salesforce account and Anypoint studio.
Salesforce:
Create a developer salesforce account and Log in to your Salesforce account.
From the account menu, select Setup.
In the left navigation bar, under the Personal Setup heading, click to expand the My Personal Information folder.
Click Reset My Security Token. Salesforce resets the token and send the new token to your registered email.
Copy the new token from the mail
Anypoint Studio:
Open and Create the new project in Anypoint Studio.
Create the flow :
Configuring File connector• Drop a File connector into your application, completing the simple configuration to enable it poll a specific folder for input
files.
Configuring Salesforce• Next, add a Salesforce Connector to the flow. At this point, you can configure the connector with your Salesforce
account-specific details and test the connection to Salesforce.
• Modify the display name for the connector, if you wish, then click the plus sign next to the Config Reference drop-
down to create a new Global Element.
• Select the Salesforce global element, then click OK.
• Enter values in the Username, Password and Security token fields, then click OK.
Salesforce connection test• When you click Test Connection, Mule tests the connection to Salesforce with a valid username, password and
security token, the connection test results in success and Mule saves your global element configurations. If any
of the values are invalid, the connection test results in failure, and Mule does not save the global element,
prompting you to correct the invalid configurations.
Configure create account in salseforce
• In Salesforce connector properties editor, use the drop-down menus to select the Operation and sObject Type.
Because the DataSense activity has gathered metadata about Salesforce's operations and data sObject types,
Mule is able to present a list of Salesforce-specific values in the drop-down menus for each of these fields
• Having defined the Salesforce output, you can then drop a DataMapper between
the elements in the flow to map CSV input fields to Salesforce output fields.
Because DataSense has already acquired the operation and sObject information
from Salesforce, the DataMapper demands that you configure only the input
values . In this example application, we used an existing CSV example to define
the input fields in DataMapper.
DataMapper Configuration
• Having defined the Salesforce-friendly output, you can then drop a DataMapper between the elements in the
flow to map CSV input fields to Salesforce output fields. Because DataSense has already acquired the
operation and sObject information from Salesforce, the DataMapper demands that you configure only the
input values (below, left). In this example application, we used an existing CSV example to define the input
fields in DataMapper (below, right).
• Click the edit icon next to Type in the Input panel
to change the input type to CSV.
• Use the radio buttons to select User Defined, the
click Create/Edit Structure.
• Define the fields in the CSV file from which
DataMapper will draw its input values. Click OK.
• When you click Create mapping, Mule maps input fields to output. Where the input and output fields have identical
names, DataMapper intelligently, and automatically, maps input to output, as with the fields in this example
application. Otherwise, you can quickly map input to output manually by clicking and dragging input fields to output
fields in the Data Mapping Console.
The configuration now complete, you can save, then run the application.
Output: Check in salesforce account
<?xml version="1.0" encoding="UTF-8"?>
<mule version="EE-3.5.0" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:data-
mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/file
http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<sfdc:config doc:name="Salesforce" name="Salesforce" password="password" username="salesforceuser@email.com">
<sfdc:connection-pooling-profile exhaustedAction="WHEN_EXHAUSTED_GROW" initialisationPolicy="INITIALISE_ONE"/>
</sfdc:config>
<data-mapper:config doc:name="DataMapper" name="datamapper_grf" transformationGraphPath="datamapper.grf"/>
<flow doc:description="Upload a csv file of contact information into Salesforce as new contacts." doc:name="Contacts_to_SFDC"
name="Contacts_to_SFDC">
<file:inbound-endpoint doc:name="File Input" moveToDirectory="src/test/resources/output" path="src/test/resources/input"
pollingFrequency="10000" responseTimeout="10000"/>
<data-mapper:transform config-ref="datamapper_grf" doc:name="DataMapper"/>
<sfdc:create config-ref="Salesforce" doc:name="Salesforce" type="Contact">
<sfdc:objects ref="#[payload]"/>
</sfdc:create>
</flow>
</mule>
• Mulesoft website
Salesforce connector Example

More Related Content

PPTX
Munit junit test case
PPTX
Mocking with salesforce using Munit
PDF
Murach : How to develop a single-page MVC web
PDF
Murach : How to work with session state and cookies
PDF
Murach: How to transfer data from controllers
PDF
Murach: How to validate data in asp.net core mvc
PPTX
Murach : HOW to work with controllers and routing
DOC
Wheels
Munit junit test case
Mocking with salesforce using Munit
Murach : How to develop a single-page MVC web
Murach : How to work with session state and cookies
Murach: How to transfer data from controllers
Murach: How to validate data in asp.net core mvc
Murach : HOW to work with controllers and routing
Wheels

What's hot (20)

PDF
JPQL/ JPA Activity 2
 
PDF
Automation Anywhere Examples
PDF
2011 02 wfa_web_services_primer_rev_1_9
PDF
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
PDF
Automation anywhere Training Materials
PDF
Responsive Design and Bootstrap
DOC
Cis407 a ilab 6 web application development devry university
PPTX
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
PPT
Less10 2 e_testermodule_9
PPTX
Mule using Salesforce
PDF
Murach: ASP.NET Core MVC, How To Work With Razor Views
PDF
Mob x in react
PPTX
Test automation in Loris
PPTX
ASP.Net MVC 4 [Part - 2]
DOCX
Cis 407 i lab 6 of 7
PPT
E learning excel vba programming lesson 1
PPTX
ASP.MVC Training
PPT
IMPACT/myGrid Hackathon - Introduction to Taverna
DOC
Cis407 a ilab 5 web application development devry university
DOC
Coding standards
JPQL/ JPA Activity 2
 
Automation Anywhere Examples
2011 02 wfa_web_services_primer_rev_1_9
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Automation anywhere Training Materials
Responsive Design and Bootstrap
Cis407 a ilab 6 web application development devry university
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
Less10 2 e_testermodule_9
Mule using Salesforce
Murach: ASP.NET Core MVC, How To Work With Razor Views
Mob x in react
Test automation in Loris
ASP.Net MVC 4 [Part - 2]
Cis 407 i lab 6 of 7
E learning excel vba programming lesson 1
ASP.MVC Training
IMPACT/myGrid Hackathon - Introduction to Taverna
Cis407 a ilab 5 web application development devry university
Coding standards
Ad

Similar to Salesforce connector Example (20)

PPT
Dataweavewithflowreflookup
PPT
Mule data weave with flowref lookup
PDF
Anypoint Salesforce Connector With Mulesoft
PPTX
Connecting to salesforce and using database in mule
PDF
How to integrate salesforce data with azure data factory
PPTX
Salesforce Integration using Mule ESB
PDF
Salesforce Tableau Integration Guide
PPTX
Step by Step ServiceNow Integration with Salesforce.pptx
PDF
Salesforce Integration | Outlook Sync Guide
DOCX
Document Generation in Dynamics CRM 2016
PPT
Mule addcontactsintosalesforce
PPTX
iQuoteXpress - Salesforce Integration
PPTX
Guide to How Salesforce and Stripe Integration.pptx
PPT
Mule add contacts into salesforce
PDF
Découverte d'Einstein Analytics (Tableau CRM)
PPTX
Detail Guide on Salesforce Integration with Excel.pptx
PDF
Document generation
PPTX
Send to Salesforce
PPTX
Salesforce nonprofit integration with donorbox donation form
DOCX
Informatica cloud Powercenter designer
Dataweavewithflowreflookup
Mule data weave with flowref lookup
Anypoint Salesforce Connector With Mulesoft
Connecting to salesforce and using database in mule
How to integrate salesforce data with azure data factory
Salesforce Integration using Mule ESB
Salesforce Tableau Integration Guide
Step by Step ServiceNow Integration with Salesforce.pptx
Salesforce Integration | Outlook Sync Guide
Document Generation in Dynamics CRM 2016
Mule addcontactsintosalesforce
iQuoteXpress - Salesforce Integration
Guide to How Salesforce and Stripe Integration.pptx
Mule add contacts into salesforce
Découverte d'Einstein Analytics (Tableau CRM)
Detail Guide on Salesforce Integration with Excel.pptx
Document generation
Send to Salesforce
Salesforce nonprofit integration with donorbox donation form
Informatica cloud Powercenter designer
Ad

More from prudhvivreddy (20)

PPTX
About Mule execution units
PPTX
Working with components
PPTX
About mule transformers
PPTX
About jms
PPTX
Webservices
PPTX
Generating the mule flow as html document
PPTX
Sftp connector
PPTX
Imap connector
PPTX
Ftp connector
PPTX
Hdfs connector
PPTX
Ajax connector
PPTX
Basic example using vm component
PPTX
Basic example using until successful component
PPTX
Basic example using message properties component
PPTX
Basic example using for each component
PPTX
Basic example using database component
PPTX
Basic example using choice component
PPTX
Basic example using file connector in anypoint studio
PPTX
Basic example using quartz component in anypoint studio
PPTX
Mule fundamentals
About Mule execution units
Working with components
About mule transformers
About jms
Webservices
Generating the mule flow as html document
Sftp connector
Imap connector
Ftp connector
Hdfs connector
Ajax connector
Basic example using vm component
Basic example using until successful component
Basic example using message properties component
Basic example using for each component
Basic example using database component
Basic example using choice component
Basic example using file connector in anypoint studio
Basic example using quartz component in anypoint studio
Mule fundamentals

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Business Ethics Teaching Materials for college
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Complications of Minimal Access Surgery at WLH
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Classroom Observation Tools for Teachers
PDF
RMMM.pdf make it easy to upload and study
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
O7-L3 Supply Chain Operations - ICLT Program
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Business Ethics Teaching Materials for college
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Renaissance Architecture: A Journey from Faith to Humanism
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Supply Chain Operations Speaking Notes -ICLT Program
Complications of Minimal Access Surgery at WLH
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Classroom Observation Tools for Teachers
RMMM.pdf make it easy to upload and study
Anesthesia in Laparoscopic Surgery in India
2.FourierTransform-ShortQuestionswithAnswers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Basic Mud Logging Guide for educational purpose
102 student loan defaulters named and shamed – Is someone you know on the list?

Salesforce connector Example

  • 2. Connect with Salesforce Mulesoft application uses pre-packaged tools to connect with Salesforce. Based on a simple use case, the application takes a CSV file of contacts and uploads the contact information into Salesforce user account. It uses Data Mapper Transformer to map and transform data.
  • 3. Example: The application accepts CSV files which contain contact information name, phone number, email. By using the CSV file upload them into a Salesforce account. CSV file Salesforce view after uploading
  • 4. Need salesforce account and Anypoint studio. Salesforce: Create a developer salesforce account and Log in to your Salesforce account. From the account menu, select Setup. In the left navigation bar, under the Personal Setup heading, click to expand the My Personal Information folder. Click Reset My Security Token. Salesforce resets the token and send the new token to your registered email. Copy the new token from the mail Anypoint Studio: Open and Create the new project in Anypoint Studio. Create the flow :
  • 5. Configuring File connector• Drop a File connector into your application, completing the simple configuration to enable it poll a specific folder for input files.
  • 6. Configuring Salesforce• Next, add a Salesforce Connector to the flow. At this point, you can configure the connector with your Salesforce account-specific details and test the connection to Salesforce. • Modify the display name for the connector, if you wish, then click the plus sign next to the Config Reference drop- down to create a new Global Element. • Select the Salesforce global element, then click OK. • Enter values in the Username, Password and Security token fields, then click OK.
  • 7. Salesforce connection test• When you click Test Connection, Mule tests the connection to Salesforce with a valid username, password and security token, the connection test results in success and Mule saves your global element configurations. If any of the values are invalid, the connection test results in failure, and Mule does not save the global element, prompting you to correct the invalid configurations.
  • 8. Configure create account in salseforce • In Salesforce connector properties editor, use the drop-down menus to select the Operation and sObject Type. Because the DataSense activity has gathered metadata about Salesforce's operations and data sObject types, Mule is able to present a list of Salesforce-specific values in the drop-down menus for each of these fields
  • 9. • Having defined the Salesforce output, you can then drop a DataMapper between the elements in the flow to map CSV input fields to Salesforce output fields. Because DataSense has already acquired the operation and sObject information from Salesforce, the DataMapper demands that you configure only the input values . In this example application, we used an existing CSV example to define the input fields in DataMapper.
  • 10. DataMapper Configuration • Having defined the Salesforce-friendly output, you can then drop a DataMapper between the elements in the flow to map CSV input fields to Salesforce output fields. Because DataSense has already acquired the operation and sObject information from Salesforce, the DataMapper demands that you configure only the input values (below, left). In this example application, we used an existing CSV example to define the input fields in DataMapper (below, right).
  • 11. • Click the edit icon next to Type in the Input panel to change the input type to CSV. • Use the radio buttons to select User Defined, the click Create/Edit Structure. • Define the fields in the CSV file from which DataMapper will draw its input values. Click OK.
  • 12. • When you click Create mapping, Mule maps input fields to output. Where the input and output fields have identical names, DataMapper intelligently, and automatically, maps input to output, as with the fields in this example application. Otherwise, you can quickly map input to output manually by clicking and dragging input fields to output fields in the Data Mapping Console. The configuration now complete, you can save, then run the application.
  • 13. Output: Check in salesforce account
  • 14. <?xml version="1.0" encoding="UTF-8"?> <mule version="EE-3.5.0" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:data- mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd 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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> <sfdc:config doc:name="Salesforce" name="Salesforce" password="password" username="salesforceuser@email.com"> <sfdc:connection-pooling-profile exhaustedAction="WHEN_EXHAUSTED_GROW" initialisationPolicy="INITIALISE_ONE"/> </sfdc:config> <data-mapper:config doc:name="DataMapper" name="datamapper_grf" transformationGraphPath="datamapper.grf"/> <flow doc:description="Upload a csv file of contact information into Salesforce as new contacts." doc:name="Contacts_to_SFDC" name="Contacts_to_SFDC"> <file:inbound-endpoint doc:name="File Input" moveToDirectory="src/test/resources/output" path="src/test/resources/input" pollingFrequency="10000" responseTimeout="10000"/> <data-mapper:transform config-ref="datamapper_grf" doc:name="DataMapper"/> <sfdc:create config-ref="Salesforce" doc:name="Salesforce" type="Contact"> <sfdc:objects ref="#[payload]"/> </sfdc:create> </flow> </mule>