RecordsFilter Core Add-On Module.


Table of Contents



Overview

The core:RecordsFilter module enhances data transfer capabilities by offering advanced filtering options for source records before they are uploaded to the target system.

It enables precise selection and management of data, ensuring that only relevant records are transferred, optimizing both process efficiency and data integrity.

Example of Module Setup

To utilize the RecordsFilter Core Add-On Module within SFDMU, declare the module in your export.json as shown below:

{
     "objects": [
     {
         "operation": "Upsert",
         "externalId": "LastName",
         "query": "SELECT LastName, Description FROM Contact",
         "filterRecordsAddons": [
            {
                "module": "core:RecordsFilter",
                "args" : {
                    "filterType": "BadWords",
                    "settings" : {
                        "badwordsFile": "./badwords.json",
                        "detectFields": [
                            "Description"
                        ],
                        "highlightWords" : true,
                        "outputMatches": true
                    }
                }
            }
         ]
     }
 ]
}

This configuration employs the BadWords filter, which is activated by the OnFilterRecords event.

RecordsFilter Module Setup

Below is the full list of args properties relevant to the core:RecordsFilter module.

filterType (String)

Mandatory. Specifies the type of filter to be applied within the core:RecordsFilter add-on module. This property determines the behavior of the filter and the required settings in the settings object.

settings (Object)

Mandatory. Contains configuration specific to the filterType selected. The structure and contents of the settings object vary depending on the filterType. For example, in the provided configuration example, the settings are tailored for the "BadWords" filter, including properties like badwordsFile, detectFields, highlightWords, and outputMatches. However, these specific settings would differ if another filter type were used. Each filter type requires its unique configuration within this object to function correctly.

Available Filters

Below find the currently implemented filters. New filters are expected to be released periodically.

Additional Notes

  • The only suitable event to incorporate the core:RecordsFilter module is the Object OnFilterRecords Event, because its purpose is precisely to filter records. Binding the RecordsFilter Add-On to any other event will result in a runtime error.

    For additional details, see also Supported Add-On Api Events

  • You can mix between filters and even execute multiple filters of the same type. Include all desired filters in the filterRecordsAddons array.

Last updated on 11th May 2024