The Add Block adds child data into a parent record for zero to many relationships in datastores support hierarchical data. For example, if the source parent record Account, contains one or more Contact child records, you can use the Add Block to add Contact records to that Account record. When the Account record is complete, including its associated child records, it is written to the target datastore along with all of the child data, in a single operation. See Hierarchical Data.
Note: This Block is only available for Connections that support hierarchical data.
When working with Add Blocks, note the following:
- Add Blocks can only be used within a CreateWith Block, UpdateWith Block, orUpsertWith Block . You can use an Add Block inside a For Each Child Block as long as the For Each Child is inside a CreateWith, UpdateWith, or UpsertWith.
- If the Add Block is added to the Map directly inside a CreateWith, UpdateWith, or UpsertWith Block only related entities with one to one relationship with the parent entity can be accessed. In the image above, contact is the parent entity and has a one to one relationship with mailing address and a one to one relationship with billing address.
- If the Add Block is added inside a For Each Child Block, only related entities with a zero to many relationship with the parent entity can be accessed. In the image above, contact is the parent entity and has a zero to many relationship with accountusa and with accountemea.
- An Add Block must reference the same parent as the Block that contains it and any Add Blocks above it inside the same Block. For example, if the CreateWith Block parent entity is contact, the first Add Block might add a mailingaddress, the second Add Block might add a billingaddress, but both have the same parent entity as the CreateWith Block.
- Add Blocks must reference entities in hierarchical order. For example, if the hierarchy is Country, State, City and the CreateWith Block parent entity is Country, the first Add Block cannot be City, it must be State.
Note: The Add Block does not have any operation results that can be used in subsequent Blocks.
Note: Change Block Operation Type and Batch Processing are not supported for target Blocks associated with hierarchical data.
As part of configuring an Add Block, you:
- Select the child entity to use for this Add operation.
- Map the fields you want to add to the new records.
Note: This Add Block is specifically for use with hierarchical data and is not the Add Block displayed for some Connections with special Add operations, such as Connections to Salesforce Pardot or HubSpot. Refer to the Help for the specific Connector for a list of supported operations and data types.
Block Properties — General Tab
Use the Path field to select the child entity to be added. This field also shows you the relationships. In the image below you can see that country is the parent of state and state is the parent of city.
Block Properties — Fields Tab
From the Block Properties Fields Tab, you can:
- Create links between source and target data fields, including fields from the relationships that you specified in the Query Block or Fetch Block:
- Source fields from parent entities are available in all Blocks.
- Source fields from child entities are only available within a For Each Child Block for that child relationship
- Autolink one or more source and target fields that have the same name, compatible data types, and are not read-only. Fields for child entities do not Autolink. You may need to clear some fields linked by Autolink, such as any modifiedon or createdon datetime fields. See Autolinking.
- Create simple or complex formulas to transform source data. See Formula Editor.
- View detailed information about any field in your source or target using the Info icon .
When using the Fields tab, you can:
- Use column filters to find specific data in the source or target pane as described in Using The Filter Dialog.
- Select any column head to sort all fields in the pane by that column.
For detailed information about using the Fields tab, see Block Properties Fields Tab.
Note: When you first open the Fields tab, the icon displays and the Errors/ Warnings tab indicates that there are Errors and Warnings. This is expected behavior. Errors and Warnings display for the General and Fields tabs until all required data has been entered and the Validate button has been selected. See Block And Map Errors And Warnings.
Block Properties — Error Handling Tab
Use the Error Handling options to enable or disable processing this record when a Block operation encounters a problem. For the Add Block, errors can be logged when an operation fails. See Block Properties Error Handling Tab for additional information.
Note: For most runtime errors, the error handling setting on the CreateWith, UpdateWith, or UpsertWith Block supersedes the error handling set on any Add Blocks within it, even if the problem is generated by one of the fields in the Add Block.
If this setting is checked, an error from any part of the data, parent or child, generates a record error and no more Blocks execute for that record. If the setting is unchecked, no error is written to the log and the Map continues running with the text of the error available in the Result Fields.
Block Properties — Errors And Warnings Tab
If there are any errors or warnings for this Block, the Errors and Warnings tab displays the number of errors or warnings in the tab name. See Block And Map Errors And Warnings.
Once you have corrected the errors, select the Validate button to update the Errors and Warnings tab.