---
schema_version: "1"
id: 210f10b3017762bd4898de3c1438c769fc4652298d87226c9405a5d82382351a
title: TemplatesSearchOptions Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Wave_TemplatesSearchOptions.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Wave_TemplatesSearchOptions.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6ceff8823a6a17d44ae19683a3deb8448942aee02e70072579190fe40973f4f8
description: The TemplatesSearchOptions class provides optional properties to filter the template collection.Specifies the Connect API filter group for CRM Analytics template search options.Specifies the template visibility option to filter the CRM Analytics template collection by.Sets the template type to filter the CRM Analytics template collection by.
---
# TemplatesSearchOptions Class

The TemplatesSearchOptions class provides optional properties to filter the template collection.

## Namespace

[Wave](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_wave.htm "The classes in the Wave namespace are part of the CRM Analytics Analytics SDK, designed to facilitate querying CRM Analytics data from Apex code.")

## Usage

Use TemplatesSearchOptions with Wave.Templates class to filter the CRM Analytics template collection returned. For example:

public static void List<String\> getAppTemplates() {
  Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions();
  tsOptions.type = 'app';
  
  Map<String, Object\> o = Wave.Templates.getTemplates(tsOptions);
  List<Object\> appTemplates = (List<Object\>) o.get('templates');
  List<String\> names = new List<String\>();
  for (Object templateObj : appTemplates) {
    names.add((String) ((Map<String, Object\>) templateObj.get('name'));
  }
  return names;
}

- **[TemplatesSearchOptions Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Wave_TemplatesSearchOptions.htm#apex_Wave_TemplatesSearchOptions_properties)**

## TemplatesSearchOptions Properties

The following are properties for TemplatesSearchOptions.

- **[filterGroup](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Wave_TemplatesSearchOptions.htm#apex_Wave_TemplatesSearchOptions_filterGroup)**  
    Specifies the Connect API filter group for CRM Analytics template search options.
- **[options](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Wave_TemplatesSearchOptions.htm#apex_Wave_TemplatesSearchOptions_options)**  
    Specifies the template visibility option to filter the CRM Analytics template collection by.
- **[type](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Wave_TemplatesSearchOptions.htm#apex_Wave_TemplatesSearchOptions_type)**  
    Sets the template type to filter the CRM Analytics template collection by.

### filterGroup

Specifies the Connect API filter group for CRM Analytics template search options.

#### Signature

public String filterGroup {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

Uses the [ConnectFilterGroupEnum](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/intro_filter_groups.htm) values.

#### Example

Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions();
tsOptions.filterGroup = 'small';

### options

Specifies the template visibility option to filter the CRM Analytics template collection by.

#### Signature

public String options {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

Uses the ConnectWaveTemplateVisibilityOptionsEnum values. Valid values are CreateApp, ViewOnly, and ManageableOnly.

#### Example

Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions();
tsOptions.options = 'ViewOnly';

### type

Sets the template type to filter the CRM Analytics template collection by.

#### Signature

public String type {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

Uses the ConnectWaveTemplateTypeEnum values. Valid values are app, dashboard, embedded, and lens.

#### Example

Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions();
tsOptions.type = 'app';