BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
10 / 278 · Module 2 — Building a Real Mule Flow · filtered: code← prev⊞ allnext →

2.4What happens when the request arrives?

For:

POST /customers
Content-Type: application/json
X-Correlation-ID: abc-123

{
  "customerId": "CUST-10042",
  "companyName": "Acme Corporation"
}

Mule creates a Mule Event.

Conceptually:

Mule Event

payload:
{
   customerId: "CUST-10042",
   companyName: "Acme Corporation"
}

attributes:
{
   method: "POST",
   requestPath: "/customers",
   headers: ...
}

vars:
{}

Therefore:

payload.customerId

returns:

CUST-10042

and:

attributes.headers."x-correlation-id"

could return:

abc-123