Skip to content

Validation Settings

Dan Grossen edited this page Jul 3, 2024 · 5 revisions

The Assurance UI provides an interface to configure settings for each validation.

Getting Started

  1. Create or open an Assurance Session.
  2. Click the Settings button in the upper right section.
  3. Select Manage Validations in the left sidebar of the new window.

Here you will find a list of all validations organized by category.

Defaults

Settings can be configured for your organization, your user, and your session. This is controlled by selecting the respective tab in the Settings window.

Severity Level

Validations can be configured to have a severity level of error, warn, or off. By default, all validations are set to an error severity level. You can change the level in the dropdown on the right side of the validation.

Advanced Options

Arguments

Enter a semicolon delimited list of arguments. The function will be executed for each item. It is up to the validation function to parse each value.

Example

Function

function (events, params) {
  let args;
  try {
    args = JSON.parse(params);
    const { count, type } = args;
    const matched = events.filter(event => event.payload.ACPExtensionEventType === type);
    const uuids = matched.map(event => event.uuid);
    if (matched.length >= count) {
      return {
        events: uuids,
        message: `The number of events with type ${type} was found ${count} or more times`,
        result: 'matched'
      }
    }

    return {
      events: uuids,
      message: `The number of events with type ${type} was found less than ${count} times`,
      result: 'matched'
    }
  } catch (e) {
    console.log(e);
    return {
      events: [],
      message: 'There was a problem executing this validation.',
      result: 'unknown'
    }
  }
}

Arguments {"count":5,"type":"com.adobe.eventtype.generic.track"};{"count":5,"type":"com.adobe.eventtype.lifecycle"}

Clone this wiki locally