---
schema_version: "1"
id: 3bdddae802c8f933b6ad1064ee1233d4509ad9f0eeec58a29ee539db08524167
title: Create Preprocessor Classes for Interface Objects (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_preprocessor_classes_for_interface_objects.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_preprocessor_classes_for_interface_objects.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 12a02400cd538ded0afc4c0b9491d5efbb579d9c4b66b64cee0c72ab748188c0
description: 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.
products:
  - Omnistudio
release: "264"
---
# 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

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.