Skip to main content

Custom Helpers Reference

Collate provides 23 custom helpers to format and manipulate event data. These are in addition to standard Handlebars features. Use these helpers to transform data in your notification templates.
Combine multiple helpers to create powerful template logic. For example, use filter to show only failed tests, then limit to display only the first 5 items.

Data Extraction

pluck - Extract properties from objects

Extracts a specific property from each object in an array. Syntax:
Example:
Extracts the tagFQN property from each tag object, resulting in a simple list of tag names.

filter - Filter lists by property value

Filters array items based on property values. Syntax:
Example:
Filters test results to show only failed items.

split - Split strings into arrays

Splits a string by a delimiter into an array of parts. Syntax:
Example:
Splits a qualified name like database.schema.table into individual parts for display. Advanced Example - Nested Field Parsing: When parsing hierarchical field names like columns.columnName.tags, combine with lookup:

limit - Limit array items

Limits the number of items displayed from an array. Syntax:
Example:
Shows first 5 items and mentions count of remaining items.
Combine limit with other helpers to prevent large notifications:

lookup - Access array element by index

Accesses a specific element in an array by its index (0-based). Syntax:
Example:
Useful for accessing specific parts after using split helper to parse hierarchical names.

String Operations

camelCaseToTitle - Convert camelCase to Title Case

Converts camelCase strings to Title Case format. Syntax:
Example:
Converts testCase to Test Case, dataAsset to Data Asset.

startsWith - Check string prefix

Checks if a string starts with a specific prefix. Syntax:
Example:
Useful for identifying specific field types in change descriptions.

endsWith - Check string suffix

Checks if a string ends with a specific suffix. Syntax:
Example:
Useful for identifying specific field types in change descriptions.

textDiff - Show text differences

Displays the difference between old and new text with strikethrough and highlighting. Syntax:
Example:
Renders old text with strikethrough and new text highlighted, making changes easy to spot. Optional Parameters: You can customize the HTML tags used for insertions and deletions:
  • insTag: HTML tag for inserted text (default: "b")
  • delTag: HTML tag for deleted text (default: "s")

Comparison & Logic

eq - Equality check

Checks if two values are equal. Syntax:
Example:

gt - Greater than

Checks if first value is greater than the second. Syntax:
Example:

and - Logical AND

Combines multiple conditions with logical AND. Syntax:
Example:
Shows content only if both conditions are true.

or - Logical OR

Combines multiple conditions with logical OR. Syntax:
Example:
Shows content if any condition is true.

not - Logical NOT

Inverts a condition. Syntax:
Example:

Collection Operations

groupEventChanges - Group changes into categories

Organizes field changes into separate categories: updates, additions, and deletions. Syntax:
Example:

hasFieldInChanges - Check if field was modified

Checks if a specific field was modified in the change description. Syntax:
Example:
Must be used with changes from groupEventChanges

length - Get array/string length

Returns the number of items in an array or characters in a string. Syntax:
Example:

Formatting

formatDate - Format timestamps

Converts timestamps to human-readable date and time format. Syntax:
Example:
Converts timestamps to format like: 2025-11-13 14:30:00 Creates a clickable URL that opens the entity in Collate UI. Syntax:
Example:
Generates a link like: https://your-Collate/entity/table/database.schema.table Extracts entity information from entity link strings. Syntax:
Example:
Converts @mention syntax to clickable user profile links. Typically used with user-entered descriptions or comments that may contain @mentions to team members. Syntax:
Example:
Converts @john.doe in text to a link to that user’s profile.
Use three curly braces {{{ to render HTML output without escaping.

resolveDomain - Resolve domain references

Displays domain names even when passed as object references. Syntax:
Example:
This helper gracefully handles multiple input types:
  • Domain object references: {{resolveDomain domain}}
  • Already-resolved domain strings: {{resolveDomain "domain-name"}}
  • Null/undefined values: Returns empty string

Math Operations

math - Perform calculations

Performs mathematical operations on numbers. Syntax:
Supported Operators:
  • + - Addition
  • - - Subtraction
  • * - Multiplication
  • / - Division
  • round - Round to decimal places
Example:
Calculates: (passedTests ÷ totalTests) × 100, rounded to 2 decimal places. More Examples:

Next Steps