---
schema_version: "1"
id: 87dfa699624999d634333356b083891bffd5d8db98e1e3d41b0f8b97a045806b
title: Build Data Processing Engine Definitions in a JSON File
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/dpe_definition_json.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.dpe_definition_json.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ab71da795a6bc20bdea0ecdb781f53d9281fa1caea16e68ab6f4f9bcd0a63636
description: Build a Data Processing Engine definition in a JSON file and then upload it to the builder. You can also download the definition, make changes, and then upload the updated definition.
products:
  - Cross Cloud
release: "264"
---
# Build Data Processing Engine Definitions in a JSON File

Build a Data Processing Engine definition in a JSON file and then upload it to the builder. You can also download the definition, make changes, and then upload the updated definition.

### 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="d5891e63">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d5891e63 ">To create a definition:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d5891e63 "><span>
                <a href="https://help.salesforce.com/s/articleView?id=ind.dpe_setup.htm&amp;release=264.0.0&amp;type=5" title="Assign users system permissions, object access, and permission sets that they require to manage, run, and monitor Data Processing Engine (DPE) definitions. User permissions for Data Processing Engine vary based on the runtime platform your company uses to run definitions.">View permissions information.</a>
              </span></td>

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

Keep these things in mind when you upload and download definition JSONs:

- Upload a JSON with the status of the definition as inactive.
- A definition’s process type can’t be changed.
- A definition’s name can’t be changed.
- Ensure that the JSON file is structured in a way that’s supported by the [BatchCalcJobDefinition Metadata API](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/meta_batchcalcjobdefinition.htm).
- The JSON file size is 600 KB or less.
- The name of the JSON file contains only alphanumerics and underscores.

1. From Setup, in the Quick Find box, enter Data Processing Engine, and then select **Data Processing Engine**.
2. Click **New**.
3. Specify the name and the process type of the definition.
4. Click **Create**.
5. Click **New Data Source** and define the node.
    
    You can download definitions with at least one Data Source node.
6. Save your changes.
7. Click ![Download definition](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_download.png). The definition is downloaded as a JSON file in your local system.
8. Edit the downloaded JSON file.
9. Click ![Upload definition](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_upload.png)
10. Click **Upload File**.
11. Select the updated JSON file from your system.
12. Click **Upload**.

![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 If you name the definition as Test Definition JSON, specify the Process Type as Standard, and select the Order as the data source, here’s what the definition looks like.

```
{
	"FullName": "Test_Definition_JSON",
	"Metadata": {
		"processType": "DataProcessingEngine",
		"status": "Inactive",
		"label": "Test Definition JSON",
		"datasources": [
			{
				"name": "Order",
				"label": "Order",
				"sourceName": "Order",
				"type": "StandardObject",
				"fields": [
					{
						"name": "Id",
						"dataType": "Text",
						"displaySequence": 1
					},
					{
						"name": "Status",
						"dataType": "Text",
						"displaySequence": 1
					},
					{
						"name": "TotalAmount",
						"dataType": "Numeric",
						"displaySequence": 1
					}
				]
			}
		]
	}
}
```

Now, the downloaded JSON is edited to ensure that it writes back a discounted amount for orders that are in the Draft status. Here’s what the edited JSON looks like:

```
{
	"FullName": "Test_Definition_JSON",
	"Metadata": {
		"processType": "DataProcessingEngine",
		"status": "Inactive",
		"label": "Test Definition JSON",
		"isTemplate": false,
		"datasources": [
			{
				"name": "Order",
				"label": "Order",
				"sourceName": "Order",
				"type": "StandardObject",
				"fields": [
					{
						"name": "Id",
						"dataType": "Text",
						"displaySequence": 1
					},
					{
						"name": "Status",
						"dataType": "Text",
						"displaySequence": 1
					},
					{
						"name": "TotalAmount",
						"dataType": "Numeric",
						"displaySequence": 1
					}
				]
			}
		],
		"filters": [
			{
				"name": "Filter_Draft_Orders",
				"label": "Filter Draft Orders",
				"sourceName": "Order",
				"filterCondition": "1",
				"criteria": [
					{
						"sourceFieldName": "Status",
						"operator": "Equals",
						"value": "Draft",
						"sequence": 1
					}
				]
			}
		],
		"writebacks": [
			{
				"name": "Write_Back_Discounted_Amount_for_Orders",
				"label": "Write Back Discounted Amount for Orders",
				"sourceName": "Discounted_Amount",
				"targetObjectName": "Order",
				"operationType": "Update",
				"writebackSequence": 1,
				"writebackUser": "005RM000002CkavYAC",
				"fields": [
					{
						"sourceFieldName": "Id",
						"targetFieldName": "Id"
					},
					{
						"sourceFieldName": "DiscountedAmount",
						"targetFieldName": "Discounted_Amount__c"
					}
				]
			}
		],
		"transforms": [
			{
				"name": "Discounted_Amount",
				"label": "Discounted Amount",
				"sourceName": "Filter_Draft_Orders",
				"expressionFields": [
					{
						"expression": "{TotalAmount} * .8",
						"alias": "DiscountedAmount",
						"dataType": "Numeric",
						"length": 14,
						"decimalPlaces": 2
					}
				],
				"transformationType": "Expression"
			}
		]
	}
}
```