Create Preprocessor Classes for Interface Objects (Managed Package)

For the managed package runtime, to modify data before it is imported into an interface object, create an Apex class that implements the IDRPreprocess interface. This Apex interface runs before each insert to the Interface Object.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

Note
Note

Preprocessor classes aren't supported in Summer '21 and later releases.

  1. From Setup, click Develop, then click Apex Classes, and click New.
  2. Code the Apex class. Your class must implement the IDRPreprocess global interface, as shown in the following sample:
    global interface IDRPreprocess
    {
      // Performed once before iterating through all uploaded objects
      void bulkBeforePreprocess();
      
      // Performed on each object
      void preprocessObject(SObject so);
      
      // Performed once after iterating through all uploaded objects
      void bulkAfterPreprocess();
    }
  3. To configure an Omnistudio Data Mapper to use the preprocessor class:
    1. Go to the Data Mapper Object Interfaces (or Data Mapper Bundles) tab and select the Data Mapper that requires the preprocessor class.

    2. In the Preprocessor Class Name field, enter the name of the preprocessor class and click Save.