# core.customizeDefinitionSearchFilters

Add custom search filters for a given definition that will restrict all user queries.

# Usage:

core.customizeDefinitionSearchFilters(<definition-name>, [filter1, filter2, ...]);

Arguments:

Argument Description Required
definition-name Refers to the name of the specific definition to which you want to apply the customization. YES
filters An array of filter that will restrict the query results YES

`filter` object structure:
Argument Description Required
label The label of the filters YES
query The partial query to restrict the results YES
selected If it should start checked or not YES

# Examples:

The next code snippet, we are configuring a filter that will restrict by default to only include open tickets

cob.custom.customize.push(function(core, utils, ui) {
  const DEFINITION = "Tickets";

  core.customizeDefinitionSearchFilters(DEFINITION, [
    { label: "Tickets Open", query: "-state:done", selected: true },
  ]);
});