Soft deleting custom object records


Administrators and data managers can soft-delete custom object records using a data maintenance job. When records are deleted, the associated sub-objects and relationship objects are also deleted or inactivated. The data maintenance job soft-deletes the records, so you can update downstream systems if records were previously exported before you hard delete them in Network. The data maintenance job deletes custom object records by object type.

Note: To hard delete custom object records in order to remove the custom object from your Network instance, see Hard deleting custom object records.

Soft delete behavior

When you soft delete custom object records, the following behavior occurs:

  • Record state of the main object is set to DELETED.

  • Record state of associated sub-objects and relationship objects are set to DELETED.

    If the relationship object is owned by the other main object in the relationship, its record state is set to INVALID.

  • All custom keys are inactivated.

  • Pending tasks will be rejected and removed from the inbox.

    Pending tasks on Merged_Into records remain in the inbox until Data Stewards click the task.

Deleted objects cannot be reversed.

Supported custom object records

All main custom object records can be deleted. Sub-objects and relationship object records cannot be deleted on their own.

Exceptions

Main objects cannot be deleted if the record state is MERGE_INTO or PARENT_MERGED.

Create a data maintenance job

To create a job to delete custom object records:

  1. In the Admin console, click System Interfaces > Data Maintenance Subscriptions.

  2. Click Add Subscription.

  3. In the Add Subscription dialog, expand the list and choose Delete Custom Object Records.

    The subscription page displays.

  4. In the Details section, provide the following:

    • Name - Type a meaningful name for the subscription.

    • Action - Identifies the job that you chose. This cannot be changed.

    • Delete Records for Object - Expand the list and select a custom object. All of the enabled custom objects in your Network instance display.

      The affected sub-objects and relationship objects display below the selected object.

    • Description - Provide a meaningful description.

    • Status - New subscriptions are Enabled by default. They can be disabled when they are no longer needed.

  5. In the Settings section, select the job options for the subscription.

    • Allow File Reprocessing - Process the feed again, even if the files in the feed were previously processed. When this option is set, all files in the source folder will be loaded, regardless of whether or not they have previously been loaded. This setting is enabled by default.

    • Job Error Log - Export the error log for the source subscription to your FTP server.

  6. In the Record Deletion section, choose the records that you want to delete for the custom object:

    • Delete all records for the selected object - All records for the custom object will be deleted.

      If you choose this option, a table displays the objects that will be deleted by the subscription job. A count of the records that will be impacted and the update to the record_state__v field displays.

    • Delete records from file - Specific records that are defined in a .csv file will be deleted.

      When you select this option, create a .csv file that contains a one-column list of Network entity IDs (VIDs) that you want to delete. Network entity IDs and object type are validated during the delete job.

      Store the file on your FTP server so it can be retrieved during the job.

      In the fields, type the FTP path and .csv file name.

  7. In the Job Schedule & Triggers section, you can create a job or email trigger. For example, when the job complete, you could trigger a target subscription to update your downstream systems.
  8. Save your data maintenance configuration.
  9. Click Start Job to run the subscription.

Job details

When the job completes, the Job History section is updated. Click the ID column to open the Job Details page.

The Job Details displays the counts of all main object, sub-object, and relationship object records that were deleted, invalidated, and inactivated (custom keys).

Change requests

When you delete objects, any pending tasks are automatically rejected and removed from the inbox and the My requests page.