BatchCalcJobDefinition defines a Data Processing Engine (DPE) pipeline: the configuration that reads data, transforms or aggregates it, and writes results to configured destinations. It is not a record of an individual job execution. Its fullName identifies the metadata component; data sources, filters, joins, transformations, forecasts, and writeback nodes are nested parts of that component.
The definition also records its execution platform, business process, runtime inputs, and writeback user context. Keep these settings separate: an active definition, an on-demand execution mode, a template designation, and permission to update a destination describe different aspects of the pipeline.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
Identifies the metadata component. Inherited from the base metadata type; it is separate from nested node names and display labels. |
status, definitionRunMode, isTemplate
|
status is Active or Inactive. definitionRunMode is Batch or OnDemand. isTemplate identifies a template. These are not interchangeable activation controls. |
processType |
Identifies the business process. Availability depends on the industry solution and permissions; an exposed value does not establish entitlement. ProviderSearch and AccountingSubledger are reserved for internal use. |
executionPlatformType |
Selects the execution platform: CRMA, CDP, or CORE. |
executionPlatformObjectType, dataSpaceApiName
|
Selects the object family used during reading, transformation, and writeback: CalculatedInsightsObject, DataLakeObject, DataModelObject, or None. dataSpaceApiName records the Data 360 data space context. |
datasources |
Defines input nodes. type supports Analytics, CalculatedInsightsObject, Context, CRMObject, CSV, DataLakeObject, DataModelObject, and StandardObject. |
filters |
Defines pipeline filtering. Static filters require criteria and filterCondition; dynamic filters receive criteria through filterParameterName at runtime. |
parameters |
Defines top-level runtime inputs and defaults. isMultiValue is supported only for parameters whose dataType is Text. |
transforms |
Defines Expression, ComputeRelative, or Slice transformations. The transformation-type element has a documentation naming discrepancy described below. |
writebacks.targetObjectName, writebacks.storageType, writebacks.operationType
|
Identifies the destination and data-changing operation. Operations are Insert, Update, Upsert, Delete, and Overwrite. Overwrite is documented only for DataLakeObject storage. storageType defaults to sObject. |
writebacks.writebackUser, writebacks.canWrtbckToNonEditableFields
|
The user record ID determines which target objects and fields can be updated. The separate mapping flag includes non-editable fields for Upsert and defaults to false. |
writebacks.fields |
Maps sourceFieldName to targetFieldName. runtimeParameter changes the source interpretation to a runtime parameter. A lookup mapping requires parentName when relationshipName is defined. |
writebacks.isExistingDataset, writebacks.shouldCreateTargetObject
|
Describes destination handling: whether a CRM Analytics dataset or Data Lake Object exists, and whether to create a target Data Lake Object or Salesforce object. |
writebacks.writebackSequence, atomicWritebacks
|
Controls target-update order and composite writeback nodes. Composite nodes have their own writebackSequence and parent-child writeback relationships. |
doesGenAllFailedRecords |
Controls error-file completeness. The default, false, records only the first instance of a failure. true records all failed records in the error file for the writeback node. |
Behavior and Constraints
Execution context and access
Access depends on Data Processing Engine product availability and required user permissions. The processType value can depend on the industry solution and assigned permission sets. Selecting a process value does not grant access to that process.
executionPlatformType selects where the definition runs. executionPlatformObjectType identifies the object family used across processing. Neither replaces an individual data source's type or a writeback's storageType.
currencyConversion specifies the definition's currency-conversion setting, with exposed values Disabled, Enabled, and None. targetCurrencyIsoCode records the target currency's ISO code.
Writeback operations, permissions, and output targets
A writeback is the part of the pipeline that changes destination data. Interpret its targetObjectName, storageType, operationType, field mappings, and user context together. The broader exposed storage enumeration does not establish which operations work with every destination; the documented restriction for Overwrite is storageType set to DataLakeObject.
writebackUser is a user record ID, not a metadata developer name. That user's permissions determine which target objects and fields can be updated. Keep this permission context distinct from canWrtbckToNonEditableFields, which controls inclusion of non-editable fields in mappings for Upsert.
Setting isChangedRow to true selects changed rows for writeback. externalIdFieldName identifies the target object's external ID field. targetObjectName alone does not establish whether the destination already exists: isExistingDataset distinguishes an existing CRM Analytics dataset or Data Lake Object from one that will be created, while shouldCreateTargetObject indicates creation of a target Data Lake Object or Salesforce object.
Each mapping connects sourceFieldName to targetFieldName. With runtimeParameter set to true, the source is interpreted as a runtime parameter; the default is false. For lookup mappings, parentName is required when relationshipName is defined. These lookup mappings are separate from composite writeback relationships.
A writeback's filterCondition filters dataset records for a user. Its sharingInheritanceObjectName identifies the object supplying row-level sharing inheritance settings. These access-related settings differ from a filter node's filterCondition, which controls which data continues through the pipeline.
writebackSequence specifies the order in which target objects are updated. Within atomicWritebacks, each composite node has its own writebackSequence. Its writebackObjectRelationships entries use parentWritebackObjectName and childWritebackObjectName to identify participating writeback nodes, not destination objects. parentWritebackObjectField, childWritebackObjectField, and relationshipName describe their linkage; sequenceNumber specifies the child node's sequence relative to its parent.
Error files are not necessarily complete inventories of failed records. With the default doesGenAllFailedRecords value of false, only the first instance of a failure is recorded. Set it to true to record all failed records in the writeback node's error file. This setting matters when reconciling an error file with run results.
Internal node connections and field aliases
A node is a processing step within the definition. Most processing-node sourceName values identify an upstream node, not a Salesforce object. Joins connect nodes through primarySourceName and secondarySourceName; append and custom nodes use sources.
An alias is an output field name used by later nodes. Aggregate fields, join-result fields, and calculated fields expose aliases. Renaming a node or alias changes what downstream references must use; it is not just a display-label change.
For object-backed data sources, datasources.sourceName identifies the source object, and datasources.fields.name identifies selected fields. Lookup field selections can traverse three child levels, and a lookup field requires alias. Other uses of sourceFieldName, groupBy, or similar names can identify derived pipeline fields instead of object fields.
customNodes adds custom actions identified by extensionName and extensionNamespace. Each custom node can specify source nodes and extension-specific parameter mappings. Its nested parameters are distinct from the definition's top-level input parameters.
Filtering and runtime inputs
When isDynamicFilter is false, both criteria and filterCondition are required. Each criterion's sequence supplies the identifier used in filter logic; it does not specify execution order.
When isDynamicFilter is true, criteria are supplied at runtime through filterParameterName, which names a parameter of type Filter. Metadata defaults therefore do not establish the filter used by a particular run. Top-level parameters support multiple values through isMultiValue only for the Text data type.
Joins, transformations, and hierarchy paths
-
joins.typesupportsLeftOuter,RightOuter,Inner,Outer, andLookup. For aLookupjoin,hasLookUpMultipleValuesdetermines whether the lookup returns multiple values. -
appendsperforms a union of source data. SetisDisjointedSchematotrueto permit datasets with no common fields. -
Expressiontransformations calculate from fields in the same record.ComputeRelativecalculates within a partition group:partitionBydefines groups, andorderBysorts records within them.Sliceremoves fields from source-node output. Record sorting is not node execution ordering. - Calculated
Numericfields require bothdecimalPlacesandlength. CalculatedTextfields requirelength. These settings define the calculated output. - Hierarchy paths derive a path from
selfFieldNameandparentFieldName.isSelfFieldValueIncludedcontrols inclusion of the self value.isAggregationRequired,aggregateFields, androllupPercentageFieldNamedescribe associated aggregation and rollup calculation.
CSV inputs and forecasting
For CSV data sources, fields.dataType specifies input field types. CSVDelimiter defaults to COMMA and also supports BACKQUOTE, CARET, PIPE, SEMICOLON, and TAB. The selected delimiter must not also occur within column values; that can cause parsing issues.
Forecasting combines dateFieldName, forecastPeriodType, and forecastPeriodCount to define the horizon. The count defaults to 1 and must be between 1 and 100. shouldExcludeLastPeriod defaults to false; setting it to true excludes the last source period when its data is incomplete.
For Date or DateTime forecast grouping fields, groupBy is required. It is a comma-separated list of time parts: Second, Second Epoch, Minute, Hour, Day, Day Epoch, Week, Month, Quarter, or Year. This differs from an aggregate node's groupBy, which lists fields.
Deployment and Retrieval
BatchCalcJobDefinition components use the .batchCalcJobDefinition suffix and reside in the batchCalcJobDefinitions folder. In package.xml, use the type name BatchCalcJobDefinition. The type supports the wildcard member *.
The deployment component is the definition identified by fullName. Its data sources, filters, transformations, forecasts, and writebacks are nested configuration, not separate metadata assets or execution records.
When moving a definition between orgs, writebackUser remains an org-specific user record reference, not a portable metadata developer name. The target user's permissions govern writeback access. Product availability, permissions, execution context, and destination handling remain separate concerns from the component's metadata identity.
Dependency resolution must follow the pipeline. Selected object fields, join keys, aggregate groupings, and writeback mappings can establish field dependencies, but names can also refer to derived output. A node rename or alias rename changes downstream references. Likewise, composite writeback names must resolve to writeback nodes rather than to targetObjectName values.
Static-filter requirements, calculated-field length and precision requirements, lookup-mapping requirements, and the Overwrite storage restriction are configuration constraints to preserve in deployed metadata. Exact serialization names also matter because the documentation and exposed structure differ in several places.
Relationships
Object and field associations depend on node context. Object-backed data-source selections and writeback destinations can point to Salesforce metadata, while processing-node names and derived aliases connect steps inside the definition. A node's name is not a field reference merely because a nested field-selection structure also uses an element named name.
References
-
CustomObject:sourceName,primarySourceName,secondarySourceName,targetObjectName,parentName,sharingInheritanceObjectName. Resolve source and join names through their node context; processing-node source names ordinarily identify nodes rather than objects directly. -
CustomField:name,sourceFieldName,targetFieldName,primarySourceFieldName,secondarySourceFieldName,groupBy,externalIdFieldName,parentWritebackObjectField,childWritebackObjectField. These establish field dependencies only where they identify object fields rather than node names, derived fields, or forecast time parts.
Referenced By
-
ActionableListDefinition:batchCalcJobDefinition. Connects the pipeline to list-building operations. -
AdvAccountForecastSet:generationDpeDefName,recalculateDpeDefName,regenerationDpeDefName,rolloverDpeDefName. Connects definitions separately to account-forecasting operations.
Changing a referenced pipeline can affect the corresponding list-building or account-forecasting operation.
Documentation Inconsistencies
The Metadata API documentation and exposed element structure differ on several exact names and enumerations. Do not treat the differing spellings as interchangeable aliases.
-
Transformation type: the exposed structure uses
transforms.transformationType, and the Metadata API XML example uses that spelling. The field table instead calls ittransformType. -
Filter operators: the exposed structure uses
GreaterThanOrEqualsandLessThanOrEquals. The Metadata API field table listsGreaterThanOrEqualandLessThanOrEqual. -
Population standard deviation: the exposed enumeration uses
StdP. The ordinary aggregate field table usesStdp, while the forecast aggregation table usesStdP. -
Hierarchy aggregation: under
hierarchyPaths.aggregateFields, the exposed structure usesaggregationFieldNameandaggregateFieldAliasName, withaggregateFunctionvaluesCountandSum. The Metadata API example uses those field names, but the field table describessourceFieldNameandaliaswith a broader aggregation-function list. -
Process types: the lists are not identical. For example, the Metadata API text lists
CollectionPlan, while the exposed enumeration includesCollectionsAndRecovery. The differing names do not establish that they represent the same process. -
Writeback storage types: the Metadata API field description lists
Analytics,DataLakeObject, andsObject. The exposed enumeration additionally includesCalculatedInsights,DataModelObject, andJson. This broader enumeration does not document operation compatibility for every destination.
Common Questions
How do I retrieve BatchCalcJobDefinition components?
Use BatchCalcJobDefinition as the type in package.xml; wildcard member * is supported. Components use the .batchCalcJobDefinition suffix in the batchCalcJobDefinitions folder.
Can I use Overwrite when storageType is sObject?
Overwrite is documented only when storageType is DataLakeObject. The default storage type is sObject, so the default does not meet that restriction.
Why can the writeback user not update a mapped field?
writebackUser identifies the user whose permissions determine which target objects and fields can be updated. canWrtbckToNonEditableFields is a separate mapping setting for Upsert; it does not replace that permission context.
Why does the writeback error file not include every failed record?
doesGenAllFailedRecords defaults to false, which records only the first instance of a failure. Set it to true to record all failed records in the writeback node's error file.
Can I determine a dynamic filter from retrieved metadata alone?
Not necessarily. When isDynamicFilter is true, criteria are supplied at runtime through the Filter parameter named by filterParameterName. Metadata defaults alone do not establish the filter used by a particular run.