# Substitute Training Requirements (Training Management)

<a href="/en/gr/55180/">QualityOne Vaults</a> allow you to assign an alternate, or substitute, _Training Assignment_ to a Learner in place of a required, or primary, _Training Assignment_ using Training Admin-defined _Substitute Training Rule Sets_. You can accomplish this by marking _Training Requirements_ as substitutes, and then defining sets of rules for when they should be substituted.

Training Administrators can use Substitute Training to accommodate a wide variety of training needs. For example, you can define substitute _Training Requirements_ and rules to provide training materials in a [locale-specific language][1]. You could also define rules which give Learners credit for [multiple training documents with a single e-learning course][2], or substitute an [instructor-led classroom training with an externally-offered training course][3]. While these are simple examples, you can define large sets of substitute rules to accommodate the potentially complex training needs of your organization.

Depending on Admin's configuration, object, field, and section labels may appear differently than the labels mentioned in this article.

## About Substitute Training {#about}

Understanding the difference between primary and substitute _Training Requirements_ or _Training Assignments_ is key to understanding the Substitute Training feature:

* **Primary**: A primary _Training Requirement_ is one (1) that does not have the _Is A Substitute Training Requirement_ field checkbox selected.
* **Substitute**: A substitute _Training Requirement_ is one (1) that has the _Is A Substitute Training Requirement_ field checkbox selected.
* **Substitution Rules**: A group of _Substitute Training Rule Sets_ that govern which _Training Requirement_ to assign to a Learner. You can define one (1) or more _Substitute Training Rule Sets_ on a substitute _Training Requirement_ or a primary _Training Requirement_.

### Substitute Training Objects {#objects}

QualityOne uses the following objects and object types to support Substitute Training:

* **Substitute Training Rule Set** (`substitute_training_rule_set__v`): This _Training Rule Set_ object type represents a set of rules for a _Training Requirement_. A primary _Training Requirement_ can have only one (1) _Substitute Training Rule Set_ record.
* **Substitute Training Rule** (`substitute_training_rule__v`): This _Training Rule_ object type represents individual substitution rules. Each _Substitute Training Rule Set_ can have one (1) or more _Substitute Training Rules_.
* **Related Training Assignments** (`related_training_assignments__v`): This object represents the link from the substitute _Training Assignment_ to the related primary _Training Assignment_.

### About Substitution Rules {#about-sub-rules}

Substitution rules define the timeframe and conditions under which a substitute _Training Requirement_ will fulfill one (1) or more primary _Training Requirements_. These rules are defined in the _Substitute Training Rule Set_ object page layout section on either substitute or primary _Training Requirements_. Vault stores individual rules as _Substitute Training Rule Set_ and _Substitute Training Rule_ records.

When the _Update Training Assignment_ job runs, it evaluates substitution rules for each primary _Training Requirement_ it processes. If the rule is valid for the Learner, the substitute _Training Assignment_ is assigned and, if not, Vault assigns the primary _Training Assignment._

### Substitute Assignments {#sub-assign}

When Vault creates a substitute _Training Assignment_, it also creates a primary _Training Assignment_ in the _Pending Substitute Completion_ lifecycle state. If multiple rules are valid, Vault uses the rule with the lowest _Priority_ number to assign the _Training Assignment_.

### Rule Rechecking {#rule-rechecking}

After Training Management issues a _Training Assignment_ for a _Training Requirement_, Vault rechecks rules each time the _Training Assignment_ is opened by a Learner, to ensure that all substitution rules are still applicable. If the rules are found to be non-applicable, Training Management assigns a new _Training Assignment_, following the currently-applicable substitution rules. This may result in Vault issuing a new substitute _Training Assignment_, or defaulting to the primary _Training Assignment_.

### Substitution Rule Fields {#sub-rule-fields}

Substitution rules include the following definition fields:

* **Duration**: Defines the date range for which the substitution will occur. If the current date, based on the Vault's timezone, is not within the date range, Vault considers the rule invalid and assigns the primary _Training Requirement_.
* **Substitutes**: Indicates the primary _Training Requirement_ or _Training Requirements_ to substitute when the rule triggers. This field appears in substitute _Training Requirement_ substitution rules.
* **Substituted by**: Indicates the substitute _Training Requirement_ or _Training Requirements_ to substitute in place of the primary _Training Requirement_ when the rule triggers. This field appears in primary _Training Requirement_ substitution rules.
* **Conditions**: Defines conditional statements. This definition further sets the requirements for the substitution to trigger. You can use any field value on the associated _Person_, _Learner Role_, or _Curriculum_ record as a condition. Conditions are linked using an AND operator, meaning that all conditions for a given rule must be met for the rule to evaluate as true. You can add up to five (5) conditions on each rule.

### Example Substitution Rule {#example-sub-rule}

For example, consider the following substitution rule for the "Code of Conduct – Japanese" substitute _Training Requirement_:

`From 01/01/2021 to 31/12/2021, this training requirement is a substitute for Code of Conduct if:`

* `Learner Role > Facility equals Kawasaki-B, AND;`
* `Person > Language equals Japanese`

This substitution rule triggers only during the period between January 1st, 2021 and December 31st, 2021, and if the Learner's _Person_ record has a _Language_ value of Japanese, and if one (1) of their _Learner Roles_ has a _Facility_ value equals "Kawasaki-B". If those criteria are met, the _Training Assignment_ issued from the "Code of Conduct" _Training Requirement_ by the nightly Training Management job will be based on this substitute "Code of Conduct – Japanese" requirement, rather than the primary _Training Requirement_.

### Completing Substitute Training Assignments {#complete-sub-ta}

When a Learner completes a substitute _Training Assignment_, the related primary _Training Assignment_ is moved to the _Completed_ state and the _Completion Source_ field is set to _Substitute_. If there are open <a href="/en/gr/55173/">_Quizzes_</a> or <a href="/en/gr/71128/">_Training Content Status_</a> records for the primary _Training Assignment_, they are moved to the _Cancelled_ state.

## Substitute Training Use Cases {#sub-use-cases}

Before you begin creating substitute _Training Requirements_ and substitution rules, you should determine your use cases and training needs. Your use cases may be as simple as the examples below, or more complex combinations.

### Example: Locale-Specific Training Materials {#ex-locale-specific}

You can use Substitute Training to provide training with specialized materials for specific locales or facilities. For example, you are a Training Administrator for an international organization who has created a _Training Requirement_ for "Code of Conduct" training and the associated training materials are in English. However, this organization has facilities with employees that only read Chinese Simplified as well as facilities with employees that only read Japanese. Using the Substitute Training feature, you can create two (2) additional "Code of Conduct" _Training Requirements_, one (1) for Chinese Simplified and one (1) for Japanese, and mark them as substitutes. You would then create substitution rules which define the applicable facility for each substitute and also link to the primary "Code of Conduct" _Training Requirement_.

With this configuration, when the nightly _Update Training Assignments_ job runs, a Learner whose _Learner Role_ and _Curricula_ include the primary _Training Requirement_, but whose _Person_ record has a _Facility_ value within China or Japan, would receive a _Training Assignment_ with the appropriate Chinese Simplified or Japanese versions of the training materials. When the Learner completes the substitute _Training Assignment_, the Learner automatically gets completion credit for the primary _Training Requirement_. If none of the substitution rules are triggered, the Learner receives the primary _Training Requirement_.

After those _Training Assignments_ are issued, you may add additional substitution rules to this configuration, such as a rule to issue specialized "Code of Conduct – Contractor – Japanese" _Training Assignments_ to Learners with a _Learner Role_ value of "Contract Employee". In such a case, Vault re-checks the substitution rules each time the Learner opens a _Training Assignment_, and, if the new substitution rule applies to them, Vault issues a new _Training Assignment_ that complies with the updated substitution rules.

### Example: Aggregated Requirements {#ex-aggregate-req}

Using Substitute Training, you can give credit for multiple primary _Training Requirements_ with a single substitute _Training Requirement_. For example, a training system includes an <a href="/en/gr/71128/">e-learning course</a> which contains all the requisite SOP training material to fill ten (10) _Vault Document Training Requirements_.

You can create one (1) substitute _Training Requirement_ which includes the e-learning course as training material, and define a group substitution rule, pointing to all ten (10) of the existing primary SOP Training Requirements. When the nightly Training Management job runs, the applicable Learners will receive a single _Training Assignment_ for the e-learning, rather than many separate _Training Assignments_, one (1) for each SOP.

### Example: External Course Substitution {#ex-ext-course}

Substitute Training enables Training Administrators to provide alternate methods of receiving required training. For example, your organization requires CPR certifications for certain types of employees and holds annual CPR courses on-site with an employee instructor managed via a "CPR Certification" <a href="/en/gr/65465/">_Classroom Training Requirement_</a>. This training is held in March, and is attended by all applicable employees hired in January, February, or March of that year.

In the event that an applicable employee is hired outside of the normal cycle, you may want to allow that employee to acquire the CPR certification using a third-party off-site training course, managed via an <a href="/en/gr/71124/">_External Training Requirement_</a> "CPR Certification – Off-Site". In such a case, you can mark the _External Training Requirement_ as a substitute, and define a substitution rule tied to the date of assignment, substituting any "CPR Certification" _Classroom Training Assignment_ assigned outside of January, February, or March, with the _External Training Assignment_ "CPR Certification – Off-Site".

## Creating Substitute Training Requirements {#create-sub-tr}

You can create substitute _Training Requirements_ using the same process as <a href="/en/gr/55154/#training-req">other _Training Requirements_</a> with the addition of having the _Is A Substitute Training Requirement_ checkbox selected.

A substitute _Training Requirement_ is a lightweight _Training Requirement_ that is only used for substitute purposes. Substitute _Training Requirements_ differ from primary _Training Requirements_ in the following ways:

* You cannot directly add a substitute _Training Requirement_ to a _Curriculum_. You must instead add the primary _Training Requirement_.
* While recurrence is respected for primary _Training Requirements_ with substitution rules, substitute _Training Requirements_ cannot have values in recurrence-related fields.
* The <a href="/en/gr/55163/">Direct Assignment</a> feature bypasses substitution rules. You can use Direct Assignment for either primary or substitute Training Requirements.
* Substitute _Training Assignments_ do not have related <a href="/en/gr/55154/#about-ta-details">_Assignment Details_ records</a>.

## Defining Substitution Rules for Training Requirements {#define-rules-tr}

To define substitution rules for a _Training Requirement_:

1. Navigate to **Business Admin > Objects > Training Requirements** or to a custom tab, and click into a _Training Requirement_ record.
2. In the _Substitute Training Rule Sets_ section of the object page layout, click **Edit**. You must add the _Substitute Training Rule Sets_ section in the _Training Requirement_ <a href="/en/gr/26387/">object page layout</a> to make this section available.
3. Click **+Rule**.
4. If you are defining rules in a substitute _Training Requirement_, select **Single** or **Group**. _Single_ allows you to target one (1) primary _Training Requirement_ with the rule, while _Group_ allows you to target multiple primary _Training Requirements_.
5. Optional: Edit the rule label by clicking the **Edit** icon.
6. Define [rule definition field values][5].
7. Optional: Add [_Conditions_][6] for the rule.
8. Optional: Click **+Rule** to define additional rules for the _Training Requirement_.
9. Click **Save**.
10. If necessary, reorder the rule priority by clicking **Reorder** and dragging the rules to the desired positions. You can only reorder rules in primary _Training Requirements._

After the _Training Requirement_ is in a <a href="/en/gr/55154/#eligible-states">training-eligible lifecycle state</a>, the defined substitution rules will trigger when their [conditions are met][4].

### Deleting Substitution Rules {#delete-rules}

To delete a substitution rule, click **Edit** in the _Substitute Training Rule Set_ section and click the **X** in the rule box. Vault updates rule priority values when you delete a rule on a primary _Training Requirement_, while deleting a substitute rule on a substitute _Training Requirement_ does not update priority values.

### Viewing Substitution Rules {#view-rules}

Vault does not check whether the user has access to objects and fields defined in substitution rules. As long as the user has _Read_ access to the _Substitute Training Rule Set_ and _Substitute Training Rule_ objects, Vault displays all rule data.

### Substitution Rule Conditions {#rule-cond}

This definition further sets the requirements for the substitution to trigger. You can use any field value on the associated _Person_, _Learner Role_, or _Curriculum_ record as a condition. Conditions are linked using an `AND` operator, meaning that all conditions for a given rule must be met for the rule to evaluate as true. You can add up to five (5) conditions on each rule. Conditions function like filters applied to the substitute rule, similar to <a href="/en/gr/8591/">report or record filters</a>.

If a _Learner Role_ or _Curriculum_ is used in a condition, Vault checks whether the Learner has the _Learner Role_ or _Curriculum_ in the training matrix. Vault does not, however, check the lifecycle state of the _Learner Role_ or _Curriculum,_ or whether they are tied to a _Training Requirement_.

The `equals` and `is blank` operators return true if any of the records returned match the condition, while the `does not equal` operator returns true if none of the records returned match the condition.

For example, assume a Learner has _Learner Roles_ with _Facility_ values of "Kawasaki-B", "Kyoto", and "Sapporo". If the condition is "Learner Role > Facility `equals` Kawasaki-B", the condition returns true since "Kawasaki-B" is included in the set of results. If the condition is "Learner Role > Facility `does not equal` Kawasaki-B", the condition returns false since the Learner has a _Learner Role_ with a _Facility_ value of "Kawasaki-B".

## Substitute Training & Training Requirement Impact Assessments {#sub-train-tr-impact}

A primary or substitute Training Requirement that contains substitution rules is subject to _Training Requirement Impact Assessments_ (_TRIAs_). In Vaults using Substitute Training, an Admin should add the _In Use Training Rule Sets_ section to the _Training Requirement Impact Assessment_ object page layout.

When Vault creates a _TRIA_, the user is able to view the substitute rules defined on the affected _Training Requirements_. If the affected _Training Requirement_ is a substitute, the _Issue Training Assignments?_ and _Require Updated Quiz?_ fields cannot be updated within the _TRIA_ as these fields are not applicable to substitute training requirements.

## Best Practices for Substitute Training {#best-practice}

Follow the guidelines in this section to ensure that Substitute Training functions as expected.

### Training Requirement Availability {#tr-avail}

Substitute _Training Requirements_ must be in an available (`available_state__v`) lifecycle state before they become available for triggering. If a rule is applicable to a Learner, but the substitute _Training Requirement_ is not in the available state (`available_state__v`), then Vault will not evaluate and apply rules for the Learner.

If, after assignment, the substitute _Training Requirement_ state later changes to a _Retired_ state or _Inactive_ state, the substitute _Training Assignment_ is cancelled when the Learner accesses the substitute _Training Assignment_. The Learner will see the task-cancelled page while the primary _Training Assignment_'s state is changed to _Assigned_, with the appropriate training workflow task available.

### Training Document Availability {#doc-avail}

If a substitute _Training Requirement_ is of type _Vault Document_, the documents must be training eligible, in either the _Issued_ or _Effective_ <a href="/en/gr/30683/">lifecycle state</a>. If the documents are not in an eligible state, Vault will not evaluate and apply rules.

If the substitute _Training Requirement_'s document goes from _Issued_ or _Effective_ to _Superseded_ or _Obsolete_, Vault cancels the substitute Training Assignment when the Learner opens it, and changes the state of the primary _Training Assignment_ to _Assigned,_ with the appropriate training workflow task available.

### About Classroom Training Substitution Behavior {#about-classroom-behavior}

If a primary _Training Assignment_ is a _Classroom Training Assignment_ with a substitute _Training Assignment_ opened for it, Vault prevents the associated _Class Roster_ record from referencing that primary _Classroom Training Assignment,_ since it will be completed by the substitute _Training Assignment_.

In cases where a primary _Classroom Training Assignment_ has a _Part of Class_ value of _Yes_, but a substitute rule changes and causes the primary _Training Assignment_ to no longer be applicable, Vault evaluates the substitution rules and changes the primary _Training Assignment_ to the _Assigned_ lifecycle state or creates and assigns a new substitute _Training Assignment_. In such a case, the Learner may have two (2) classroom _Training Assignments_ assigned as the initial _Training Assignment_ is not automatically modified. See <a href="/en/gr/65465/#best-practices-for-classroom-training-configuration">Configuring Classroom Training Requirements</a> for more details on best practices for this type of scenario.

## Limitations {#limitations}

The following limitations affect Substitute Training Requirements:

* By default, each _Training Requirement_ is limited to 20 substitution rules. Contact Support to change this limit.
* When <a href="/en/gr/55157/">importing training assignments</a>, you cannot create _Related Training Assignment_ (`related_training_assignment__v`) object records manually if the creation source is not `import__v` for both _Training Assignment_ references.
* A _Training Requirement_ cannot be converted to a substitute or converted to a primary if there are any existing _Training Assignments_ that reference the _Training Requirement_.
* Training Requirement Impact Assessments: Substitution rules cannot be edited directly within a _Training Requirement Impact Assessment_ record, only on the _Training Requirement_ records.
* When a Vault is <a href="/en/gr/32913/">cloned</a>, conditions in substitute rules must be manually created in the target Vault; the _Training Rule Set_ and _Training Rule_ object records, which store the substitute rules, are not cloned. This is because the conditions may reference fields or field values that exist in the source Vault, but may not exist in the target Vault.
* The field `rule_conditions_internal__v` on the _Training Rule_ object cannot be modified.
* Navigating away from a page while editing an unsaved substitution rule does not result in a warning. Ensure that you have saved your rule before navigating away from the page.
* The _Is A Substitute Training Requirement_ field must have the _Show as checkbox_ option enabled.

## Configuring User Permissions {#user-permissions}

You can complete all the steps in this article with the standard _System Administrator_ or _Vault Owner_ security profile. If your Vault uses custom security profiles, your profile must grant the following <a href="/en/gr/22824/">permissions</a>:

* For the _Training Rule Set_ object: _Read_, _Create_, _Edit_, and _Delete_ permission.
* For the _Training Rule_ object: _Read_, _Create_, _Edit_, and _Delete_ permission.

[1]: #ex-locale-specific
[2]: #ex-aggregate-req
[3]: #ex-ext-course
[4]: #about
[5]: #about-sub-rules
[6]: #rule-cond