You build a Mule application in a MuleSoft IDE, not in Salesforce Setup. Here is the shape of creating a basic application that listens for a request and returns data. You need an Anypoint Platform account and either Anypoint Studio or Anypoint Code Builder installed.
- Create the Mule project
In Anypoint Studio or Code Builder, create a new Mule project. The IDE scaffolds the folder structure (src/main/mule, src/main/resources, src/test/munit) and gives you one empty flow to start from.
- Add a source to the flow
Drag an HTTP Listener onto the flow as its source and point it at a global HTTP Listener configuration with a host, port, and path. The Listener is what triggers the flow when a request arrives.
- Add processors and a connector
Add the processing steps. For a Salesforce read, drop in the Salesforce Connector, choose an operation such as Query, and set its connection in a global configuration element so credentials stay out of the flow.
- Transform with DataWeave
Add a Transform Message component and write a DataWeave script to shape the connector output into the JSON or XML your caller expects. DataSense shows the payload structure so you can map fields directly.
- Test, package, and deploy
Run the app locally to confirm the flow works, write MUnit tests, then package it with mvn clean package into a JAR and deploy it to CloudHub 2.0, Runtime Fabric, or an on-premises runtime.
The name of the Mule project and its resulting artifact. It identifies the application in Anypoint Runtime Manager once deployed.
Every flow needs a source, such as an HTTP Listener, queue consumer, scheduler, or file poll, to start processing when an event arrives.
A global configuration element holding the connection details (for the Salesforce Connector, the auth credentials and instance URL) referenced by the connector operations.
Where the packaged JAR runs: CloudHub, CloudHub 2.0, Anypoint Runtime Fabric, or an on-premises Mule runtime.
- Keep credentials and environment values in secure or external properties, not hardcoded in flows, so one artifact can move from sandbox to production by swapping property values.
- Connector and runtime versions must be compatible. An application declares the Mule and connector versions it was built against, and mismatches surface at deploy time.
- Do not over-layer small jobs. API-led layering pays off at scale, but a single-purpose integration is often clearer as one flat flow.