I am looking at transferring Contact records from Salesforce to a product called YayPay using their very restrictive api.
To get a record into YayPay I would need to invoke the following three steps:-
(1) api call to Start a Batch - returns a batch id.
(2) api call to create/update multiple Contacts (using the batch id as a parameter).
(3) api call to Finish the Batch (using the batch id as a parameter).
If I pass in 5 records from Salesforce that means the flow would invoke each of the three steps above for each record, but the api call in step 2 can handle receiving the 5 records together.
My question is : Is it possible to merge those 5 records from Salesforce into a single record with an array containing the data from the 5 records, so then it will only invoke each of the steps once, and send all 5 records in a single api call in step 2?
[NOTE: I can see a kind of way to do this, by having a Parent record with the Contacts as children in Salesforce, and then querying the Parent with a subquery of the children. but this means duplicating data in Salesforce which I dislike.]