11 / 18 · Module 14 — External Automated Testing of Mule Integrations · filtered: cheatsheet← prev⊞ allnext →
14.9A good reusable Salesforce helper
Conceptually:
async function findAccountByExternalId(
request,
customerId: string
) {
const soql = `
SELECT Id, Name, Phone
FROM Account
WHERE External_Customer_ID__c = '${customerId}'
`;
// Salesforce API query here
}
In real code, avoid unsafe string concatenation when user-controlled values are possible; encode/query appropriately.
The test intent is:
query target state directly