Skip to content
Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Mule Application entry
How-to guide

How to build a basic Mule application

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.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Jun 16, 2026

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Project namerequired

The name of the Mule project and its resulting artifact. It identifies the application in Anypoint Runtime Manager once deployed.

Source (flow trigger)required

Every flow needs a source, such as an HTTP Listener, queue consumer, scheduler, or file poll, to start processing when an event arrives.

Connector configurationrequired

A global configuration element holding the connection details (for the Salesforce Connector, the auth credentials and instance URL) referenced by the connector operations.

Deployment targetrequired

Where the packaged JAR runs: CloudHub, CloudHub 2.0, Anypoint Runtime Fabric, or an on-premises Mule runtime.

Gotchas
  • 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.

See the full Mule Application entry

Mule Application includes the definition, worked example, deep dive, related terms, and a quiz.