---
schema_version: "1"
id: 9b88d08f27645710124bac2fd86c2876317b655fe03c4b5dfa596b61bedf46b5
title: Use the Apex WaveTemplateConfigurationModifier Class
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_wave_templates/guides/concept/bi-templatesdev-apex-class.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/guide/bi-templatesdev-apex-class.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 51d0039e9dda85d59ee14c527066878b1a66ff54a4fa142ab2f6de078428f921
products:
  - Analytics Templates Developer Guide
  - analytics
---

# Use the Apex WaveTemplateConfigurationModifier Class

The `WaveTemplateConfigurationModifier` class checks an org’s data. Also, to simplify app creation, it can modify the template configuration wizard accordingly.

Apex is the object-oriented Salesforce programming language that allows developers to execute flow and transaction control statements on the Lightning Platform server along with calls to the API.

Using `WaveTemplateConfigurationModifier` in a smart wizard simplifies standard app creation in these ways:

- Checks if the org has data required to create the app.
- Checks if security settings enable app creation. For example, it determines if the Analytics Integration User has access to all fields required to create the app.
- Checks the org’s fiscal year start date. Based on the outcome, the wizard can use a default setting, such as January 1, or require the user to choose a fiscal year start date for use in the app.
- Hides or exposes a wizard question (variable) based on the org data. For example, say that your wizard includes a question about opportunities. The smart wizard can check an org for the Opportunity object and, if it detects use of the object., display the question.
- Sets the values included in a wizard question’s answer field. The smart wizard can include or exclude specific fields and expand or limit the number of values displayed.

The `WaveTemplateConfigurationModifier` can also be used with embedded apps to check the org’s data and security settings. In this use case, you can fail app creation with a clear message for the Auto-Install request. You can also set template variables based on org settings to be used in app creation.

Declare the class in `template-info.json`.

If you implement the modifier and unit test classes in your Visual Studio project, include your classes in the `classes` directory along with the class metadata files.

For complete details about Apex, see [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm).

- **[WaveTemplateConfigurationModifier Interfaces](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/reference/bi-templatesdev-apex-class-overview.md)**


    The main class is `WaveTemplateConfigurationModifier` with these supporting classes and their methods.

- **[WaveTemplateConfigurationModifier Methods](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/guide/bi-templatesdev-apex-class-methods.md)**


    Extend `WaveTemplateConfigurationModifier` with the following methods.

- **[WaveTemplateConfigurationModifier Apex Examples](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/reference/bi-templatesdev-apex-class-examples.md)**


    Examples include setting computed values for questions, hiding a question, managing enum values, working with array type variables, and more.

- **[TemplateApexException Apex Examples](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/reference/bi-templatesdev-apex-class-error-examples.md)**


    Use the `TemplateApexException` class to handle errors cleanly and provide clear information to template users.

- **[TemplateInterruptException Apex Example](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/reference/bi-templatesdev-apex-class-error-examples2.md)**


    Use the `TemplateInterruptException` class to handle template runtime errors cleanly and provide clear information to template users.

- **[Test WaveTemplateConfigurationModifier](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/reference/bi-templatesdev-apex-class-testing-examples.md)**


    Test the `WaveTemplateConfigurationModifier` before deploying a template that uses it.
