When creating a Mapping configuration for a Loop Element, you have three options for the Data Action. These are Upsert, Update and Create.
Select Upsert if the number of Loop iterations you have set is greater than the number of existing Related List records.
- If the number of loop iterations is less than or equal to the number of existing Related List records, then Upsert will behave in the same way as Update and no additional records will be created.
- If the number of loop iterations is more than the number of existing Related List records, Upsert will create new records for the surplus.
If you set a Loop Element to iterate 8 times for WorkOrderLineItem, but there are only 5 WorkOrderLineItems in Salesforce, the first five loops will update the existing records and then create new records for the remaining 3.
Select Create to make new Related List records.
- The Create action will never alter existing Related List records
Select Update to update existing Related List records only.
- Update will not create any new records, even if the Loop iterates for more times than there are existing records.