Understand Salesforce-MuleSoft integration by learning how MuleSoft unleashes the power of Salesforce’s Customer 360 by unlocking, unifying, and securing data.
A powerful integration platform empowers everyone in your company from IT to line of business leaders, small businesses to enterprises, integration to API management — to unlock data and go digital faster.
Salesforce integration use cases are growing every day. MuleSoft helps you unleash the power of Salesforce’s Customer 360 by unlocking, unifying, and securing data from any system — whether it’s in Salesforce or any other system — to deliver truly connected experiences.
MuleSoft Anypoint Platform
Start fast and realize immediate value with a single, unified solution for integration and APIs.
Prerequisites for Salesforce-MuleSoft integration
The core project team generally consists of a MuleSoft and Salesforce team, with architects and developers from both. The MuleSoft team needs to be comfortable with Salesforce workbench and other basics, such as orgs, objects, properties, object parent-child relationship. The Salesforce team should have a basic understanding of MuleSoft, API-led connectivity, API reuse, and Salesforce integration patterns.
MuleSoft named a Leader in iPaaS.
Download a complimentary copy of the Gartner® Magic Quadrant™ for iPaaS, and see why MuleSoft has been named a Leader eight times in a row.
9 tips for Salesforce-MuleSoft integration
Want to ensure seamless integration between Salesforce and MuleSoft? Here are nine best practices for your business:
- Understand end-to-end business requirements
- Segregate responsibilities
- Finalize security settings between Salesforce and MuleSoft
- Map Salesforce orgs to the MuleSoft environment
- Create a property mapping document
- Define transformation logic responsibilities
- Determine where business logic lives
- Log key events
- Facilitate integration performance testing
1. Understand end-to-end business requirements
Plan discovery and requirement gathering sessions with the customer/business stakeholders, as well as the Salesforce and MuleSoft teams. In these sessions, work to understand the problem you’re trying to solve, business use cases, and integration use cases, expected SLAs, and agree on guiding principles of integration patterns.
You should define the items listed below during the planning and architect phase of the project, before the effort estimation work starts.
2. Segregate responsibilities
It is critical to understand which data and integration requirements are handled by Salesforce and which are handled by MuleSoft. Clearly define how data will flow and where data transformation will take place.
For example, MuleSoft will fetch data from a third-party system, transform x, y, z data elements, convert the data to JSON, and insert it into Salesforce objects. Meanwhile, Salesforce will automate further data processing on the data saved by MuleSoft.
3. Finalize security settings between Salesforce and MuleSoft
There are multiple ways to integrate Salesforce with MuleSoft, such as the Salesforce adapter provided by MuleSoft, or calling MuleSoft APIs within Salesforce, or platform events. Regardless of the method, be sure to choose the right security level per your org’s policy.
The below diagram shows an example of the security method needed for MuleSoft’s Salesforce connector. OAuth 2.0 provides better security/options security compared to basic authentication.
While calling MuleSoft API from Salesforce code, choose the highest possible security level as well. MuleSoft provides a variety of security options. The security aspects should be reviewed and approved by both the teams and the customer/infosec team. Rule of thumb? Choose the highest security level possible.
4. Map Salesforce orgs to the MuleSoft environment
Create a diagram that illustrates which Mule environments connect to which Salesforce orgs and other external systems. This clarifies data flow and exposes potential issues.
The below diagram illustrates a sample diagram — highlighting a problem where the customer had only three MuleSoft environments, but Salesforce external systems have four. Such a diagram will help map out a strategy for how the systems will interact with each other.
5. Create a property mapping document
Creating a mapping document that lists properties from external systems and Salesforce is one of the most critical steps. As shown in the diagram below, this mapping document defines MuleSoft scope, orchestrations, data/DataWeave transformations. This should be co-owned by both teams and approved by key stakeholders/customers. That will ensure the completeness and quality of the data.
6. Define transformation logic responsibilities
Define which transformation logic will be handled by MuleSoft and which will be handled by Salesforce. Decide whether the MuleSoft APIs will be reused by other systems. If they are, MuleSoft should handle the transformations instead of Salesforce. That way, all clients will receive a consistently transformed response, and it will be easier to replace external systems later on.
7. Determine where business logic lives
Given a choice between MuleSoft and Salesforce, any business logic should ideally reside in Salesforce. Placing it within MuleSoft might change the code/deployment if the business logic changes. If it is set in Salesforce, it can be managed in Salesforce Admin setup screens. Salesforce developers can also use its custom metadata to provide configurable interfaces. Configurable interfaces provide business users flexibility to modify the business logic without code changes.
Example of metadata setup in Salesforce: API-related (endpoints, URLs, versions, credentials, etc), timeouts, headers, content-type etc. They should be properly configured/externalized in Salesforce so they can be changed easily.
8. Log key events
Apart from regular MuleSoft logging (which is mainly for the technical team), it is beneficial to log key events in Salesforce. This is not the debug logs, but the key events/milestones that happen during API/batch flows. A common logging utility can be used that gets called from within the code to note key events. This includes receiving a request, calling external systems, saving the data in Salesforce, any error that happened in the process, and so on.
This helps Salesforce admins view the status, understand what actions were performed by MuleSoft API, see any issues that occurred, and in which stage of the flow they occured. Once recorded these events logs will be available in Salesforce under that customer’s account which can be viewed/monitored by non-technical resources.
9. Facilitate integration performance testing
Like any project or unit, integration performance testing is important. Check the response time to make sure SLA is met. Test with real data, also the batch process to test MuleSoft/servers performances. Automated testing, e.g. selenium testing, can be helpful.
Keep up with the latest trends, insights, and conversations.
See how companies are tackling today's economic challenges with digital transformation.
Read the insights from over 1,050 IT leaders in the “2024 Connectivity Benchmark Report.”
Salesforce-MuleSoft integration: 9 tips to remember.
Learn how MuleSoft unleashes the power of Salesforce’s Customer 360 by unlocking, unifying, and securing data.
Experience the future of AI and hyperautomation.
Watch how MuleSoft’s hyperautomation platform transforms employee and customer experiences.
Start your innovation journey with MuleSoft.
Begin your trial.
Try MuleSoft Anypoint Platform free for 30 days. No credit card, no installations.
Talk to an expert.
Tell us a bit more so the right person can reach out faster.
Stay up to date.
Get the latest research, industry insights, and product news delivered straight to your inbox.