DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Salesforce to Mule ESB in 7 Simple Steps

Salesforce to Mule ESB in 7 Simple Steps

It's easy to integrate Salesforce and Mule. As a Mule developer, you don’t need to worry about preparing XMLs. The Salesforce connector does it all for you.

Harish Kumar user avatar by
Harish Kumar
·
Feb. 20, 17 · Tutorial
Like (5)
Save
Tweet
Share
4.20K Views

Join the DZone community and get the full member experience.

Join For Free

Today, we will be integrating Salesforce and Mule ESB in seven simple steps.

It's easy to integrate Salesforce and Mule. Mule integrates with Salesforce without the need to worry about which mechanism to use. For example, Mule can integrate easily with XML APIs of Salesforce. As a Mule developer, you don’t need to worry about preparing XMLs. The Salesforce connector does it all for you.

At the end, I will share a video tutorial on how to do this. 

Step 1

The first step is to install Salesforce connector in your Anypoint studio. To do that, go to Help Menu > Install new software. Select Anypoint Connectors Suit and Standard (based on your license).

  • Salesforce Connector and click Next, accept terms & conditions and Install

screen-shot-2016-10-06-at-19-42-22

Step 2

To consume a service from Salesforce, you need Salesforce username, password, and security token (which can be generated in Salesforce). Please create a user for Mule to query Salesforce.

screen-shot-2016-10-06-at-19-48-03

Step 3

Create a new Salesforce Connector using the Global Elements tab in your flow. Provide your Salesforce username, password, and security token.

screen-shot-2016-10-06-at-19-44-58

It's recommended to use a property placeholder to read them from property files so that you externalize these.

Step 4

Create the flow (based on yours) and remove the echo and file component. Add the Salesforce endpoint. To query Salesforce for accounts, select the Salesforce endpoint in the flow, open the Mule properties view, and select Query in the drop down.

screen-shot-2016-09-19-at-7-11-19-pm

screen-shot-2016-09-19-at-7-00-16-pm

Step 5

To query Salesforce accounts, place your SOQL in Salesforce endpoint.

screen-shot-2016-09-19-at-7-01-19-pm

Step 6

You are nearly there! Add a logger component and print the payload #[payload]. Or, use object to JSON converter to send clean messages out to the caller.

Step 7

You can also refer to template projects given by Mulesoft in Anypoint studio. To get different sample projects, click on the gear icon below the File menu. Select an example template, such as Salesforce to Database.

screen-shot-2016-10-06-at-19-50-28Testing Application

screen-shot-2016-09-19-at-7-11-36-pmVideo Tutorial

Please do share your comments about your thoughts about this blog.

Enterprise service bus

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Event Driven 2.0
  • The Quest for REST
  • How to Secure Your CI/CD Pipeline
  • Remote Debugging Dangers and Pitfalls

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: