---
schema_version: "1"
id: 4cf84934ef8634d947594b80fe599551b7149953e4a86b29ff3ed87b2751611b
title: rules.json Attributes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_wave_templates/guides/reference/bi-templatesdev-rules-json-attributes.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/guide/bi-templatesdev-rules-json-attributes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6ab518c4050705123c6030fcfd723f1dd08d5cbdba701733f4369f71eadfd017
products:
  - Analytics Templates Developer Guide
  - analytics
---

# rules.json Attributes

The `rules.json` file attributes are:

| Attribute                               | Required                                                                                                   | Description                                                                                                                          |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `constants`                             | No                                                                                                         | Container attribute only - array of constants to be defined, can be empty if no constants are needed                                 |
| `constants` --> `name`                  | No                                                                                                         | Unique name for a constant, used to reference the constant in other places                                                           |
| `constants` --> `value`                 | No                                                                                                         | Value of the constant                                                                                                                |
| `rules`                                 | No                                                                                                         | Container attribute only - array of rules to be defined, can be empty if no rules are needed                                         |
| `label`                                 | No                                                                                                         |                                                                                                                                      |
| `rules` --> `name`                      | Yes                                                                                                        | Unique name for a rule                                                                                                               |
| `rules` --> `condition`                 | No                                                                                                         | If condition is met, then the rule will run, if the condition is not met, the rule will not run.                                     |
| `rules` --> `appliesTo`                 | Yes                                                                                                        | Container attribute only - array of assets the rule should be be applied to (dashboards, dataflow, recipes, schemas, XMDs)           |
| `rules` --> `appliesTo` --> `name`      | No. Best practice is to specify `name`. If null, defaults to `*`, and rule applies to all template assets. | Name of asset (can be \* in case of dashboards for all dashboards); must match the “name” defined in the template-info for the asset |
| `rules` --> `appliesTo` --> `type`      | No. Best practice is to specify `type`. If null, defaults to `*`, and rule applies to all asset types`*`   | Type of asset (dashboard, workflow, lens, schema, xmd)                                                                               |
| `rules` --> `actions`                   | Yes                                                                                                        | Container attribute only - array of actions the rule should invoke (one or more action is necessary)                                 |
| `rules` --> `actions` --> `action`      | Yes                                                                                                        | Type of action - set, add, delete, put, replace                                                                                      |
| `rules` --> `actions` --> `description` | No                                                                                                         | Description of the rule action - for maintainability                                                                                 |
| `rules` --> `actions` --> `path`        | Yes                                                                                                        | JSONPath to take the action on                                                                                                       |
| `rules` --> `actions` --> `value`       | No                                                                                                         | Value needed for set/add/put, defines the value to put in the JSONPath                                                               |
| `rules` --> `actions` --> `index`       | No                                                                                                         | Index needed for add action only                                                                                                     |
| `rules` --> `actions` --> `key`         | No                                                                                                         | Key needed for put action only                                                                                                       |

**See Also**

- [Edit Rules Files](https://developer.salesforce.com/docs/analytics/bi-dev-guide-wave-templates/concept/bi-templatesdev-edit-rules-json.md)
