Configuration.
Table of Contents
- How to Configure SFDMU
- Basic Configuration: Upserting Accounts
- Advanced Configuration: Upserting Multiple Related SObjects
How to Configure SFDMU ⇧
SFDMU can be configured using a single JSON file named export.json. This file specifies the objects and fields to be migrated, focusing on fields that are updatable in the target metadata.
Basic Configuration: Upserting Accounts ⇧
To upsert accounts, structure your export.json file as follows:
{
"objects": [
{
"query": "SELECT Id, Name FROM Account",
"operation": "Upsert",
"externalId": "Name"
}
]
}
Advanced Configuration: Upserting Multiple Related SObjects ⇧
Below is the sample objects model:
For a data model with complex circular relationships between SObjects, where each record has a unique Name, you can maintain these relationships using the Name field as an External ID. Here’s how to configure export.json for such a scenario:
{
"objects": [
{
"query": "SELECT Id, Phone, TestObject3__c FROM Account WHERE Name LIKE 'TEST_ACC_%'",
"operation": "Upsert",
"externalId": "Name"
},
{
"query": "SELECT Id, Account__c, TestObject3__c, RecordTypeId FROM TestObject__c",
"operation": "Upsert",
"externalId": "Name"
},
{
"query": "SELECT Id, Account__c, TestObject__c FROM TestObject2__c",
"operation": "Upsert",
"externalId": "Name"
},
{
"query": "SELECT Id, TestObject2__c FROM TestObject3__c",
"operation": "Upsert",
"externalId": "Name"
}
]
}
Notes
- Ensure that object API names in your export.json queries are spelled correctly as they are case-sensitive.