---
schema_version: "1"
id: 8dc8cc71cf0c89f9fc69930f193351683f595cc23c57b91c703f0c7fc3157e35
title: Configure Writeback Nodes as JSON
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/dpe_configure_ctx_json_writeback.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.dpe_configure_ctx_json_writeback.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 92964833d4d39a846de2584444bfafa752ca1ccbbe52129a8f83166f0469a9e6
description: Configure a JSON output to send transformed context data to downstream processes in the required format and hierarchy.
products:
  - Cross Cloud
release: "264"
---
# Configure Writeback Nodes as JSON

Configure a JSON output to send transformed context data to downstream processes in the required format and hierarchy.

### 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>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d9446e60">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d9446e60 ">To perform writeback as JSON</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d9446e60 ">Customize Application, Modify All Data</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d9446e60 ">To run definitions on-demand:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d9446e60 ">Run Data Processing Engine Definitions On Demand</td>

          </tr>
        </tbody>
      </table>

1. In the Data Processing Engine (DPE) definition, create writeback nodes with the Target Type as **JSON** for each context node.
2. Provide the JSON name and select the JSON output format:
    
    - **Simple**: Use the default one-to-one JSON structure. Select this format when you must map standard Salesforce object data (for example, Account or Quote details) to a basic template-ready JSON structure without grouping or parent-child hierarchy logic.
    - **Group**: Use the Group By field to configure grouping. Select this format when you must categorize data by a specific field, such as price range or product selling model.
    - **Hierarchy**: Use Parent Identifier Field and Record Identifier Field to define parent-child relationships in the context definition and build a hierarchical path. Select this format when data must reflect explicit hierarchy relationships, such as Product Bundle or Quote Line Group hierarchies. DPE supports up to 5 hierarchy levels.
3. When a definition includes multiple JSON writeback nodes, you can save the definition, but activation requires a composite writeback node.
    
    Use a Composite Writeback node with Target Type as JSON to define a complete hierarchy by combining multiple JSON writebacks into a single nested output structure. For example, in Document Generation, to represent a Quote Line Group hierarchy, you can create separate JSON writeback nodes for each level (for example, Quote, Quote Line Group, and Quote Line Item).
    
    ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/images/icon_important.png)
    
    Important A Composite Writeback node used for hierarchy output must include only Writeback nodes with Target Type as JSON.
4. Save and activate the definition.
5. Run the definition and monitor the status in [Monitor Workflow Services](https://help.salesforce.com/s/articleView?id=ind.dpe_monitor.htm&language=en_US).
    
    ![Configuring a Json writeback with hierarchy structure](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_json_writeback_hierarchy.png) ![Configuring a JSON writeback with group](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_json_writeback_group.png)

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

Example

Sample DPE JSON showing a simple JSON writeback format for opportunity records.

```json
{
  "opportunities": [
    {
      "Amount": 2007,
      "ClosingDate": "10/21/23 12:00 AM",
      "ParentReference": "001SG00001DTMI6YAP",
      "Stage": "Needs Analysis",
      "IdPath": "/0000000a16ts121002917745213798306a0327d4a3f541b8b1d0cd87d7f1a03f/001SG00001DTMI6YAP/006SG00000Hc71xYAB"
    },
    {
      "Amount": 2007,
      "ClosingDate": "8/25/23 12:00 AM",
      "ParentReference": "001SG00001DTMI6YAP",
      "Stage": "Value Proposition",
      "IdPath": "/0000000a16ts121002917745213798306a0327d4a3f541b8b1d0cd87d7f1a03f/001SG00001DTMI6YAP/006SG00000Hc71wYAB"
    },
    {
      "Amount": 2007,
      "ClosingDate": "12/24/23 12:00 AM",
      "ParentReference": "001SG00001DTMI6YAP",
      "Stage": "Prospecting",
      "IdPath": "/0000000a16ts121002917745213798306a0327d4a3f541b8b1d0cd87d7f1a03f/001SG00001DTMI6YAP/006SG00000Hc71yYAB"
    }
  ]
}
```

Sample JSON generated from a definition with three writeback nodes: Accounts, Contacts, and Opportunities. A composite writeback node combines them into one output and defines the overall hierarchy. The output shows account hierarchy and groups contact records by title.

![Configure composite JSON writeback](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_json_composite_writeback.png)

```json
{
  "compwriteback": [
    {
      "AccountID": "001SG00001DTMI6YAP",
      "AnnualRevenue": 100000000,
      "BillingCity": "New York",
      "CreatedDate": "11/6/25 5:11 PM",
      "Name": "Acme",
      "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP",
      "children": [],
      "relatedRecords": [
        {
          "Title": "Buyer",
          "relatedRecords": [
            {
              "Email": "info@salesforce.com",
              "ParentReference": "001SG00001DTMI6YAP",
              "Phone": "(212) 555-5555",
              "Title": "Buyer",
              "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/003SG00000SH4iHYAT",
              "relatedRecords": [
                {
                  "Amount": 2007,
                  "ClosingDate": "8/25/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Value Proposition",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71wYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "10/21/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Needs Analysis",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71xYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "12/24/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Prospecting",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71yYAB"
                }
              ]
            }
          ]
        },
        {
          "Title": "President and CEO",
          "relatedRecords": [
            {
              "Email": "info@salesforce.com",
              "ParentReference": "001SG00001DTMI6YAP",
              "Phone": "(212) 555-5555",
              "Title": "President and CEO",
              "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/003SG00000SH4iGYAT",
              "relatedRecords": [
                {
                  "Amount": 2007,
                  "ClosingDate": "8/25/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Value Proposition",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71wYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "10/21/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Needs Analysis",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71xYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "12/24/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Prospecting",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71yYAB"
                }
              ]
            }
          ]
        },
        {
          "Title": "VP Customer Support",
          "relatedRecords": [
            {
              "Email": "info@salesforce.com",
              "ParentReference": "001SG00001DTMI6YAP",
              "Phone": "(212) 555-5555",
              "Title": "VP Customer Support",
              "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/003SG00000SH4iIYAT",
              "relatedRecords": [
                {
                  "Amount": 2007,
                  "ClosingDate": "8/25/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Value Proposition",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71wYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "10/21/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Needs Analysis",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71xYAB"
                },
                {
                  "Amount": 2007,
                  "ClosingDate": "12/24/23 12:00 AM",
                  "ParentReference": "001SG00001DTMI6YAP",
                  "Stage": "Prospecting",
                  "IdPath": "/0000000a16ts12100291774512321619f9f60d634ee04e579908df140565e3d0/001SG00001DTMI6YAP/006SG00000Hc71yYAB"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```