4.16Parent → child creation
Let's revisit:
Account
↓
Contact
Input:
{
"customerId": "C001",
"company": "Acme",
"contacts": [
{
"id": "P001",
"firstName": "John",
"lastName": "Smith"
}
]
}
Flow:
Transform Account
↓
Upsert Account
↓
obtain Salesforce Account.Id
↓
Transform Contacts
↓
Upsert Contacts with AccountId
Contacts:
vars.original.contacts map (contact) -> {
External_Contact_ID__c: contact.id,
FirstName: contact.firstName,
LastName: contact.lastName,
AccountId: vars.accountId
}
This is basic Salesforce relationship orchestration.