Configuration.


Table of Contents



How to configure the SFDMU.

This Plugin is fully configurable with a single json file named export.json.

The array "objects" declares objects to include into a migration job.

All fields listed in the query string of the object (if they are declared as updateable in the target metadata) will be downloaded from the Source and the then uploaded to the Target.

Below find some examples of export.json configuraitons.

Example of basic configuration: upserting Accounts.

Create a new export.json file with the following format:

{
    "objects": [
        {
            "query": "SELECT Id, Name FROM Account",
            "operation": "Upsert",
            "externalId": "Name"
        }
    ]
}

Example of advanced configuration: upserting multiple related SObjects.

Assume you have the following data model with complex circular relationships between SObjects:

diagram

Let's say, each record has unique Name value, so you want to use Name field as an External ID field for all SObjects in that data model.

You can Upsert all records preserving relationships between SObjects.

Create a new export.json file with the following format:

{
    "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"
        }
    ]
}
Last updated on 29th Jan 2023