6 min readUpdated Mar 2, 2026

Message Search Documentation

Overview

The messageSearch module is a powerful data transformation tool used within the Vantage analytics and data platform. Its primary purpose is to filter and search through messages based on flexible criteria such as keywords, regex patterns, sender information, channels, and date ranges. This logic does not integrate with any AI capabilities or make external API calls, focusing solely on processing the provided input data.

Settings

The messageSearch configuration includes several settings that determine how the search operates. Each setting is critical to tailoring the functionality of the search according to specific needs. Below is a detailed explanation of each setting:

1. searchColumns

2. keyword

3. regexPattern

4. channelFilter

5. channelColumn

6. senderFilter

7. senderColumn

8. dateColumn

9. dateFrom

10. dateTo

11. matchMode

How It Works

The messageSearch logic processes an input dataset, filtering messages based on the specified configuration. It follows these steps:

  1. Input Data Validation: The logic checks if the input data exists and if it is an array. If there's no data, it returns an empty output.
  2. Keyword Processing: Keywords are split and trimmed, creating an array that is used for filtering.
  3. Regex Compilation: If a regex pattern is provided, it compiles the regex for use in filtering.
  4. Date Parsing: The dateFrom and dateTo settings are parsed into Date objects for comparison.
  5. Filtering Logic: Each message in the input data is checked against the specified searchColumns, channelFilter, senderFilter, and date constraints.
  6. Return Results: Messages that meet the filtering criteria are collected and returned as output.

The processing is logged to the console at various stages for transparency in execution.

Use Cases & Examples

Use Case 1: Customer Support Analysis

A customer service department wants to analyze messages sent by their support agents on a specific communication platform (e.g., email). They need to filter messages containing specific keywords related to product issues.

Use Case 2: Compliance Monitoring

A compliance team needs to examine messages to ensure that all communications adhere to regulations. They want to filter by channel and date range, focusing on messages sent by specific employees.

Use Case 3: Marketing Campaign Review

A marketing team wishes to review all messages related to a recent campaign to ensure that team members followed up as planned. They want to filter out messages based on keywords and the campaign's specific timeframe.

Example Configuration

For the purpose of effectively monitoring compliance in a financial firm, the following configuration can be used:

json
{
  "searchColumns": ["body", "subject"],
  "keyword": "confidential, terms",
  "channelFilter": "email",
  "senderFilter": "john.doe",
  "dateFrom": "2023-01-01T00:00:00Z",
  "dateTo": "2023-12-31T23:59:59Z",
  "matchMode": "all"
}

Explanation of the Configuration:

This configuration helps the compliance team review only the relevant messages, facilitating easier monitoring of communication practices.