ScriptOrg Object.


🡨 Go Back to Export.json File Overview

Table of Contents



ScriptOrg Object Overview

The ScriptOrg object within the SFDMU's export.json file is a child of the Script object. It serves a crucial role in providing connection details for Salesforce organizations involved in the migration.

This configuration is particularly important when the Salesforce orgs are not connected through Salesforce CLI on the local machine executing the job.

Example Configuration with orgs Section

Here is how to specify connection details in the export.json file for a migration job involving specific Salesforce orgs:

{
  "orgs": [
    {
      "name": "source@example.com",
      "instanceUrl": "https://my.source.instance.salesforce.com",
      "accessToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    {
      "name": "target@example.com",
      "instanceUrl": "https://my.target.instance.salesforce.com",
      "accessToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
  ],
  "objects": [
    // Object definitions go here...
  ]
}

During migration, SFDMU uses this information to connect to the Salesforce orgs, as specified in the command sfdx sfdmu:run --sourceusername source@example.com --targetusername target@example.com, by retrieving connection details from the orgs array.

ScriptOrg Object Properties

name (String)

Mandatory. This property specifies the username used for connecting to the Salesforce org. It is essential for identifying which user account to use during the connection process.

instanceUrl (String)

Mandatory. Defines the Salesforce instance URL associated with the org. This URL is critical for directing the migration tool to the correct Salesforce instance.

accessToken (String)

Mandatory. This is the token used for authentication and establishing a connection to the Salesforce org. The access token must be secured and correctly configured to ensure successful and secure connections.

Notes:
  • Security Reminder: Keep the export.json file, especially the orgs section, secure. It includes sensitive connection information that if exposed, can compromise the security of the Salesforce orgs involved.
Last updated on 23rd Apr 2024