6.17Scatter-Gather example
Requirement:
GET
/customer-profile/C001should return Salesforce Account details, outstanding billing balance, and loyalty status.
Flow:
HTTP Listener
↓
Scatter-Gather
┌───────┼─────────┐
↓ ↓ ↓
Salesforce Billing Loyalty
Query API API
└───────┼─────────┘
↓
Aggregate result
↓
DataWeave
↓
Response
Output:
{
"customerId": "C001",
"companyName": "Acme",
"balance": 4725.50,
"loyaltyLevel": "Gold"
}