AddonManifestDefinition Object.

🡨 Go Back to Export.json File Overview

Table of Contents

AddonManifestDefinition Object Overview

The AddonManifestDefinition object in the SFDMU's export.json file is crucial for enhancing data migration. It can be linked as a child to either the Script or ScriptObject, allowing its settings to be broadly or specifically applied.

This object specifies custom add-ons that add functionalities like scripts or automated tasks, which can be used before, during, or after migrating specific Salesforce objects (sObjects) to enable complex and tailored data handling.

For further details on add-on integration and customization, refer to the SFDMU Add-Ons documentation.

Configuring Add-Ons

Add-ons are configured within a ScriptObject, where they can be specified to execute at various points like before or after migrations. Below is an example of how to include add-ons with additional properties such as command, path, and others:

  "objects": [
      "query": "SELECT Id, Name FROM Account",
      "operation": "Upsert",
      "externalId": "Name",
      "beforeAddons": [
          "module": "PreMigrationModule",
          "description": "Performs pre-migration data checks",
          "command": "sfdmu:run",
          "path": "./addons/preMigration",
          "args": {
            "param1": "value1",
            "param2": "value2"
      "afterAddons": [
          "module": "PostMigrationModule",
          "description": "Handles post-migration data cleanup",         
          "path": "./addons/postMigration",
          "args": {
            "cleanupLevel": "deep",
            "logResults": true
          "excluded": true

AddonManifestDefinition Object Properties

module (String)

Mandatory. Indicates the name of the module or script to be invoked as part of the add-on, which is central to the functionality of the add-on.

command (String)

Optional. Specifies the SF-CLI command that the plugin executes, triggering the Add-On execution. Typically, this command might be "sfdmu:run", used to trigger the add-on via the default sf sfdmu run command.

path (String)

Optional. Defines the directory path where the add-on module files or scripts are located. This helps in organizing and accessing the required scripts for the add-on.

description (String)

Optional. Provides a brief description of what the add-on does, helping users understand the purpose and effects of the add-on.

excluded (Boolean)

Optional. A flag indicating whether the add-on should be excluded from the execution, allowing it to be temporarily disabled without removing it from the configuration.

args (Object)

Optional. A dictionary of arguments that are passed to the module when the add-on is executed, allowing for dynamic parameterization of the script based on the migration context.

Last updated on 23rd Apr 2024