4 min readUpdated Mar 2, 2026

deleteRecord Documentation

Overview

The deleteRecord logic is designed for the Vantage analytics and data platform, specifically for deleting records from the contacts application or any specified data set. It allows users to remove records based on provided identifiers either from direct input or from an upstream data source. This functionality is critical in maintaining data integrity and managing data lifecycle effectively within the platform.

Settings

The deleteRecord logic includes several configurable settings that dictate its behavior and define how data is processed. Below is a detailed explanation of each setting:

1. recordId

2. idColumn

How It Works

The deleteRecord logic executes asynchronously and processes requests as follows:

  1. Context Validation: It checks for the presence of a clientId. If this is absent, the function exits early, returning an error.
  2. Adapter Initialization: Using the client ID and application type, an app data adapter is created, which connects to the respective storage provider defined in the app configuration.
  3. Input Handling: The logic takes inputs from various sources, prioritizing inputs.data, followed by inputs.input1?.data, and finally interpreting a single input as an array if necessary.
  4. Record Deletion:
    • If a recordId is provided, it deletes that specific record.
    • If no static ID is available, it iterates through the provided input data, extracting IDs based on the idColumn and performing deletions as needed.
  5. Output Generation: After deletions, it returns a structured output indicating which records were successfully deleted.

Expected Data

The deleteRecord function expects input data in the following format:

Example input object:

json
{
    "data": [
        {"id": "123"},
        {"id": "456"}
    ]
}

Or:

json
{
    "data": {"id": "789"}
}

Use Cases & Examples

Use Case 1: Batch Record Deletion

A company regularly cleans its customer database by deleting inactive or outdated contact records. They can utilize the deleteRecord logic to specify a list of record IDs and automate the deletion process based on criteria defined in their upstream data.

Use Case 2: Single Record Management

A user requires the capability to remove a single contact record when a request to delete is made. The user can employ the recordId setting to specify the unique identifier of the contact they wish to delete.

Use Case 3: Integrating with an Upstream Data Pipeline

In a data pipeline scenario, when tracking, a downstream process generates a list of user engagements that require deleting outdated records. By mapping the engagement data to the idColumn, Vantage can automate the deletion of specified records efficiently.

Concrete Example Configuration

Scenario: Automate the deletion of multiple outdated contacts based on an uploaded dataset.

Configuration:

json
{
    "inputs": {
        "data": [
            {"email": "oldcontact1@example.com"},
            {"email": "oldcontact2@example.com"}
        ]
    },
    "config": {
        "idColumn": "email"
    },
    "context": {
        "clientId": "client-123",
        "userId": "user-456",
        "nodeType": "contacts/deleteRecord"
    }
}

In this example:

By employing this configuration, users can efficiently manage their contacts within the Vantage platform, ensuring that outdated records are purged promptly.