---
schema_version: "1"
id: 4ba103d358aa01d0b8b9f4568913f41c7e3486b1057025be5c9082cf1b51bf9b
title: Write Related Records from Multiple Objects Together
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/dpe_write_related_records_together.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.dpe_write_related_records_together.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dd7deae342337cafc5edd03cf9151a03b2bfbcff65f65b8e7e6f8aaa2da51080
description: Use the composite writeback node in your Data Processing Engine definition to collate related records from multiple writeback objects. Then write back all the interrelated records together to the target objects, so that you maintain data integrity and avoid any inconsistencies in case of failures.
products:
  - Cross Cloud
release: "264"
---
# Write Related Records from Multiple Objects Together

Use the composite writeback node in your Data Processing Engine definition to collate related records from multiple writeback objects. Then write back all the interrelated records together to the target objects, so that you maintain data integrity and avoid any inconsistencies in case of failures.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=ind.dpe_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported editions and availability for Data Processing Engine (DPE).">View supported editions</a>.</td></tr></tbody></table>

## Write Related Records by Using Group By Field

To group records from two or more parent writeback nodes based on a common mapped field, use the Group By field, and then write back the related records together by using a composite writeback node.

Specify the **Group By** field in the Level 1 writeback node.

1. In the node canvas, click **New Node** and select **Composite Writeback** as the node type.
2. Enter a name for your composite writeback node. The API name automatically populates from the name. Optionally, enter a description.
3. Save the node. The composite writeback node appears on the node canvas.
    
    ![Composite writeback node for the Account and Contact writeback nodes.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_wb_cwb_invoice_nodes.png)
4. On the Configuration tab, in **Writeback Sequence**, specify a whole number to indicate the processing order for the composite writeback node when the definition is run.
5. Select **Edit Configuration**. The Create Composite Writeback Flow page appears.
6. Under **Start of the Flow**, click the plus sign (![Plus sign](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_add.png)) to add a Level 1 writeback node.
    
    ![Click the plus sign on the Create Composite Writeback Flow page.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_composite_wb_flow.png)
7. In the Level 1 node, select a writeback node in **Writeback Node** and select a group by field in **Group By Field**. Click **Confirm** to save the Level 1 node.
    
    The Group By field is optional if you have only one Level 1 node.
    
    ![Select Group By field.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_cwb_groupby.png)
8. Repeat step 6 again to add another Level 1 writeback node.
9. In the Level 1 node, select a writeback node in **Writeback Node** and select a reference field in **Reference Field**. Click **Confirm** to save the Level 1 node.
    
    ![Select Reference field.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_cwb_reference.png)
10. To add one or more writeback nodes at the same level, repeat steps 6 and 7.
11. Click **Done** to save the composite writeback flow.
12. Save the composite writeback node.

## Write Related Records by Using Relationship Name

To write back related records of two or more writeback nodes that have a parent-child relationship, use the relationship name in the child writeback node of your composite writeback configuration.

Specify the source node field, relationship name, parent object, and target field in the Related Field Mapping section of the child writeback node.

![Composite Writeback relationship field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_composite_wb_relationship.png)

1. In the node canvas, click **New Node** and select **Composite Writeback** as the node type.
2. Enter a name for your composite writeback node. The API name automatically populates from the name. Optionally, enter a description.
3. Save the node. The composite writeback node appears on the node canvas.
    
    ![Composite writeback node for the Account and Contact writeback nodes.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_wb_cwb_nodes.png)
4. On the Configuration tab, in **Writeback Sequence**, specify a whole number to indicate the processing order for the composite writeback node when the definition is run.
5. Select **Edit Configuration**. The Create Composite Writeback Flow page appears.
6. Under **Start of the Flow**, click the plus sign (![Plus sign](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_add.png)) to add a Level 1 writeback node.
    
    ![Click the plus sign on the Create Composite Writeback Flow page.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_composite_wb_flow.png)
7. In the Level 1 node, select the parent writeback node in **Writeback Node** and select a group by field in **Group By Field**. Click **Confirm** to save the Level 1 node.
    
    The Group By field is optional if you have only one Level 1 node.
    
    ![Level 1 writeback node.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_create_cwb_level1.png)
8. Click the plus sign (![Plus sign](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_add.png)) under the parent writeback node at Level 1 to add a child writeback node at Level 2.
9. In the Level 2 node, select the child writeback node in **Writeback Node** and select the relationship name in **Relationship**. Click **Confirm** to save the Level 2 node.
    
    ![Level 2 writeback node.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/dpe_create_cwb_level2.png)
10. If you need to add child writeback nodes at Level 3 or Level 4, repeat steps 8 and 9.
11. Click **Done** to save the composite writeback flow.
12. Save the composite writeback node.