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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Code and Connect: MCP + MuleSoft
  • MuleSoft MCP and A2A in Production: What 17 Recipes Reveal
  • MuleSoft IDP: Enhancing Efficiency and Accuracy in Data Extraction
  • From AI Chaos to Control: Building Enterprise-Grade LLM Gateways With MuleSoft Anypoint

Trending

  • Using LLMs to Generate Unit Tests and Review Pull Requests in Spring Boot
  • Crash-Proof Agents: Durable Execution for Long-Running AI Systems
  • Measuring AI Impact at the Team Level
  • Process Intelligence Landscape 2026: Mining, Orchestration, and the Agentic AI Shift

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Connecting Salesforce With MuleSoft

Connecting Salesforce With MuleSoft

Learn how you can fetch and view all chosen accounts objects from Salesforce in MuleSoft with this quick integration tutorial.

By 
dharani vp
·
Jun. 30, 17 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
21.9K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

As most of you know, Salesforce is a leader in CRM (Customer Relationship Management). Let's see how to connect to Salesforce from MuleSoft.

Use Case

To fetch all accounts objects from Salesforce in MuleSoft.

Steps

  1.  Create a new project in Mulesoft (File->New->Mule Project) and give the project a name. Click Finish.  
    Image title

  2. Create an account on developers.salesforce.com. After sign-in, in the home page top right corner under your name, go to My Settings. Image title

  3. Go to Personal Tab and select "Reset My Security Token." You will get the security token in the registered mail id.

  4. In Anypoint Studio, drag the HTTP component and configure the connector configuration. Select the host and enter the port number. Click OK.Image title

  5. Drag the Salesforce connector from the Mule Palette. Add a connector configuration and select Salesforce: Basic Authentication. Image title

  6. Provide your username, password, and security token. Click on Validate Configuration and check whether the test connection is successful.Image title

  7. Select the "Query" operation andset the Language as "DataSense Query Language." Click on Query Builder. Select Accounts Object and the necessary columns (in my case: AccountNumber, BillingCity, BillingCountry, BillingStreet, and Description) and click OK. The query is automatically generated, as below:Image title

  8. The outcome of the query operation in Salesforce is a consumerIterator object. In order to view the output in a readable form (like JSON), use the object to JSON transformer.

  9. Save the project and right click the project folder in the project explorer->Run As->Mule Application.Image title

  10. In the console, the status of the application can be seen as "DEPLOYED." Go to the browser (or Postman) and hit the endpoint (http://localhost:8081). The selected fields from the Account object are displayed.Image title

MuleSoft

Opinions expressed by DZone contributors are their own.

Related

  • Code and Connect: MCP + MuleSoft
  • MuleSoft MCP and A2A in Production: What 17 Recipes Reveal
  • MuleSoft IDP: Enhancing Efficiency and Accuracy in Data Extraction
  • From AI Chaos to Control: Building Enterprise-Grade LLM Gateways With MuleSoft Anypoint

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook