---
schema_version: "1"
id: d37d7bf161ea0a52dd2c856b8b80ac800c9eb38ce8e4e649b8540117ef72fc28
title: AnimationRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_animationrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_animationrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 73807ee6bd1eea6204c1c97f8cba069abb825695bfa653c42cc5e12b364ba356
description: Represents criteria for determining when an animation is displayed to Path users.This type extends the Metadata metadata type and inherits its fullName field.
---
# AnimationRule

Represents criteria for determining when an animation is displayed to Path users.This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## File Suffix and Directory Location

AnimationRule components have the suffix animationRule and are stored in the animationRules folder.

## Version

AnimationRule components are available in API version 46.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d135640e91">Field Name</th>

              <th class="featureTableHeader  " id="d135640e94">Field Type</th>

              <th class="featureTableHeader  " id="d135640e97">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">animationFrequency</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">picklist</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. The frequency with which an animation is displayed when a user
                selects the designated picklist values in a path. Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">always</samp></li>

                  <li class="li"><samp class="codeph nolang">often</samp></li>

                  <li class="li"><samp class="codeph nolang">sometimes</samp></li>

                  <li class="li">
                    <samp class="codeph nolang">rarely</samp>
                  </li>

                </ul>
                A value of <samp class="codeph nolang">always</samp> triggers an animation
                every time. The values <samp class="codeph nolang">often</samp>, <samp class="codeph nolang">sometimes</samp>, and <samp class="codeph nolang">rarely</samp> trigger an animation progressively less frequently.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">developerName</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">string</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. The developer name for the animation rule.
                <div class="box message info">
                  <div class="inner">
                    <div class="bd">
                      <div class="media">
                        <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png" alt="Note">
                        <div class="mediaBd">
                          <h4 class="mbs">Note</h4>
                          <p>Only users with View DeveloperName OR View Setup and Configuration permission
                            can view, group, sort, and filter this field.</p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">isActive</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">boolean</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. Indicates whether the animation rule is active (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">string</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. The label for the animation rule.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">recordTypeContext</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">picklist</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. An enum to track whether this AnimationRule applies to all record
                types for the associated sObject, or only to a single or
                main
                record type. Valid values are <samp class="codeph nolang">All</samp>, <samp class="codeph nolang">Master</samp>, or <samp class="codeph nolang">Custom</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">recordTypeName</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">reference</td>

              <td class="entry" headers="d135640e97" data-title="Description">The record type selected for the sObject in which the animation is
                displayed.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">sobjectType</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">string</td>

              <td class="entry" headers="d135640e97" data-title="Description">The object on which the animation rule is run.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">targetField</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">string</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. Name of the field used to determine when to display an
                animation.</td>

            </tr>

            <tr>
              <td class="entry" headers="d135640e91" data-title="Field Name"><span class="keyword parmname">targetFieldChangeToValues</span></td>

              <td class="entry" headers="d135640e94" data-title="Field Type">string</td>

              <td class="entry" headers="d135640e97" data-title="Description">Required. Values used to determine when to display an animation. When a user
                selects a value in <span class="keyword parmname">targetField</span> that matches a value stored in
                <span class="keyword parmname">targetFieldChangeToValues</span>, the animation is
                displayed.
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of an AnimationRule component.

<?xml version="1.0" encoding="UTF-8"?>
<AnimationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <animationFrequency\>Always</animationFrequency\>
    <developerName\>AnimationRule\_DeveloperName</developerName\>
    <isActive\>true</isActive\>
    <masterLabel\>AnimationRule Label</masterLabel\>
    <recordTypeContext\>All</recordTypeContext\>
    <recordTypeName\>\_\_MASTER\_\_</recordTypeName\>
    <sobjectType\>Opportunity</sobjectType\>
    <targetField\>StageName</targetField\>
    <targetFieldChangeToValues\>Delivered, Negotiating, Closed Won</targetFieldChangeToValues\>
</AnimationRule\>

The following is an example package.xml that references the AnimationRule component.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>PathAssistant</members>
        <name>Settings</name>
    </types>
    <types>
        <members>AnimationRule\_Developer\_Name</members>
        <name>AnimationRule</name>
    </types>
    <version>46.0</version>
</Package>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).