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

View supported editions.
User Permissions Needed
To perform writeback as JSON Customize Application, Modify All Data
To run definitions on-demand: Run Data Processing Engine Definitions On Demand
  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
    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.
    Configuring a Json writeback with hierarchy structure Configuring a JSON writeback with group
Example
Example

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

{
  "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
{
  "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"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}