Add-On API Overview.
Table of Contents
- Overview
- Why Do You Need the Add-On API?
- Two Types of Add-On Modules
- Add-On Module Configuration Skeleton
- How to Create and Run Your Own Custom Add-On Module
- List of Currently Available Core SFDMU Add-On Modules
Overview ⇧
The SFDMU Add-On Engine is a powerful tool that enhances SFDMU functionality. It enables the use of custom and third-party Add-On modules to extend its capabilities.
Additional Resources:
Why Do You Need the Add-On API? ⇧
Sometimes, you may find the out-of-the-box (OOTB) functionality of SFDMU insufficient for your needs. For example:
- You want to trigger custom actions on the target records after the plugin has completed its data migration process.
- You want to send an email message containing a report about the failed tasks.
- You want to run an Apex job or a Process Builder / Flow from the plugin.
- You have other specific requirements...
With the SFDMU Add-On, you have a great opportunity to bridge these gaps and extend the SFDMU Plugin Core with unlimited additional features according to your needs.
Two Types of Add-On Modules ⇧
'Core SFDMU Add-On module':
- Provided by us and built using the standard Core SFDMU Add-On API.
- Each Core Module extends SFDMU with features not included in the original plugin implementation.
- New Core Modules will be released periodically.
'Custom SFDMU Add-On module':
- Written by you, based on the Custom SFDMU Add-On API.
- You have the freedom to create and manage your modules.
- Custom modules are loaded directly from the local file system and executed during the data migration process.
The Custom Add-On API is derived from the Core Add-On API but is not exactly the same. The Custom API is a limited version of the Core API and exposes only the most crucial features that are useful and helpful for the end user.
Add-On Module Configuration Skeleton ⇧
The configuration skeleton below illustrates how to structure the setup for add-on modules within the SFDMU. This setup is especially useful for defining actions or behaviors that are triggered by specific lifecycle events. Each component within the configuration allows for modular extensions of functionality, enhancing the SFDMU's flexibility and adaptability.
Sample Configuration ⇧
This sample structure provided in the Object.afterAddons
event array.
{
"objects": [
{
// ... rest of object definition
"afterAddons": [
{
"module": "ModuleName",
"description": "Description of what the module does and how it should be used",
"args": {
// Arguments to configure the module, can vary based on module requirements
}
}
]
}
]
}
Understanding the Configuration ⇧
module
(String)
⇧
- Definition: Specifies the name of the add-on module.
- Purpose: Identifies the module to be loaded and executed by the SFDMU. This dynamic loading facilitates modular development and allows for easy updates and maintenance of the SFDMU's functionalities.
description
(String)
⇧
- Definition: A string that provides a detailed description of the add-on module.
- Purpose: Helps explain the purpose, functionality, and usage of the module. This is particularly useful for documentation purposes and for developers or administrators who need to understand what the module does and how it fits into the overall SFDMU.
args
(Object)
⇧
- Definition: A dictionary that contains configuration settings or parameters needed by the module.
- Purpose: Allows for the customization of the module's behavior by providing necessary parameters. This flexibility ensures that the module can perform its intended function in a variety of different scenarios or environments.
How to Create and Run Your Own Custom Add-On Module ⇧
All you need is to write a simple TypeScript module by implementing the set of special TS interfaces included in the distributed API package, or use an existing module. Then, configure your export.json to call your module at runtime.
See the quick tutorial here: Creating and Running a Custom Add-On Module
List of Currently Available Core SFDMU Add-On Modules ⇧
- The ExportFile Core Add-On Module allows you to transfer Salesforce Files (ContentVersion, ContentDocument, ContentDocumentLink) attached to the records.
- The RecordsTransform Core Add-On Module enables complex transformations and mapping of the source records before they are uploaded to the Target.
- The RecordsFilter Core Add-On Module provides advanced filtering of source records before their upload to the Target.