# Auto-Managing Person Records

Vault primarily uses a _Person_ record's <a href="/en/gr/50967/#person-training-eligibility">_Training Eligibility_</a> field value to determine whether to create _Training Assignments_. By default, Training Admins must manually set this value when creating and maintaining a Learner's training matrix.

With additional configuration, the _Auto-Manage Persons_ job can instead reference the _User_ object as the source of truth for creating and maintaining _Person_ records, based on a _User_ record's _Status_ and other [supported][3] field values shared between the _User_ and _Person_ objects. The job also supports automatically creating <a href="/en/gr/52724/#individual-learner-roles">_Individual Learner Role_</a> records.



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: This feature must be configured by an Admin and is not supported for all Vault user types, including those assigned a <a href="/en/gr/598557/">VeevaID</a> security policy.</p>
    </div>
  </div>
</div>



## Feature Dependencies

Your Vault must use the _Person_ object's _Training Eligibility_ field to determine whether to create _Training Assignments_.

The _Training Eligibility_ field and supporting functionality is automatically available in Vaults created on or after the 19R3 release. If the Training application was enabled in your Vault in 19R2 or earlier, you must contact <a class="external-link " href="https://support.veeva.com/hc/en-us" target="_blank" rel="noopener">Veeva Support<i class="fa fa-external-link" aria-hidden="true"></i></a> to enable it.

## Use Cases

VernBio's Vault user management process is partially supported by an HR system. This Vault-integrated system requires that certain aspects of Vault remain synchronized with or otherwise do not interfere with HR activities, specifically in the below situations.

* When VernBio employees go on leave, their Vault _User_ accounts remain active for payroll purposes in the HR system. For training activities, however, these employees are not expected to complete training, and therefore their _Person_ records must be updated to _Ineligible_ for training. The _Auto-Manage Persons_ job ensures the Training Admin can rely on Vault to maintain _User_ and _Person_ records both for trainable Learners and training-exempt employees on leave, without interrupting HR system functionality.
* Without the Auto-Manage Person feature, the Training Admin uses a report to monitor the updates the HR system pushes to Vault _User_ records, then adds any new or updated information in the corresponding _Person_ records. This manual process frequently falls out of sync with organizational updates in the HR system, which can cause confusion when Learners are assigned training, for example, as the result of a <a href="/en/gr/56334513/">Dynamic Enrollment</a> rule based on department. The _Auto-Manage Persons_ job synchronizes _User_ and _Person_ records on the Training Admin's behalf, and allows other training processes to operate seamlessly.

In addition to allowing VernBio's training program to operate independently from HR activities, the _Auto-Manage Persons_ job assists the Training Admin in managing VernBio's training process, which requires that all new Learners are assigned an <a href="/en/gr/52724/#individual-learner-roles">_Individual Learner Role_</a>. With the job's related [application setting][2], Vault automatically creates related _Individual Learner Role_ records, instead of the Training Admin manually executing the Assign to Learner action from individual _Curricula_ for each new VernBio employee.

## How Vault Auto-Manages Person Records

The _Auto-Manage Persons_ job checks for new _User_ records, as well as updates to existing _User_ records. When a new _User_ record is created with a given _Status_, or a [supported field][3] within an existing record is updated, Vault creates or updates the related _Person_ record according to the following logic:

* When a new or existing _User_ record's _Status_ is _Active_ or _Pending_, the _Auto-Manage Persons_ job:
    * Checks for an existing _Person_ record, and creates one if one does not already exist. When there are multiple _Person_ records linked to a single _User_, Vault references the _Person_ record with the most recent _Last Modified Date_.
    * Sets the _Person_ record's _Training Eligibility_ field to _Eligible_.
    * Sets the _Person_ record's supported fields with _User_ field values.
    * Sets the _Person_ record's lifecycle state to _Eligible_, when [configured][1].
    * Creates a corresponding _Individual Learner Role_ record, when [configured][2].
* When a _User_ record is set to _Inactive_, the _Auto-Manage Persons_ job:
    * Updates the existing _Person_ record's _Training Eligibility_ field to _Ineligible_.
    * Sets the _Person_ record's supported fields with _User_ field values.
    * Sets the _Person_ record's lifecycle state to _Ineligible_, when [configured][1].

In contrast to the above, any updates to the _Person_ record do not impact the _User_ record, including the _Training Eligibility_ field. This means that Training Admins can indicate a Learner is _Ineligible_ while their _User_ account remains active. This also means an Admin can delete a _Person_ record and the job will not create a new one unless the Learner's _User_ record is updated within the above parameters.

## Configuration Overview

To auto-manage _Person_ records in your Vault:

1. Confirm your Vault uses the <a href="/en/gr/50967/#person-training-eligibility">_Training Eligibility_</a> field on the _Person_ object to determine whether Learners should receive Training Assignment tasks.
2. Review your Vault's _Person_ and _User_ object field configuration. For each _User_ field your organization wishes to populate on _Person_ records, ensure corresponding fields are configured on both objects. For example, to populate a _Person_'s `job_title__v`, configure a corresponding object field named `job_title__c` on the _User_ object. See [additional details][3] on how custom and standard fields are supported between the _User_ and _Person_ objects.
3. Activate the _Auto-Manage Persons_ job and, optionally, update the __Job Owner__ and __Schedule__ according to your organization's requirements.
    * __Job Owner__ is set to "System" by default. We recommend updating this to a Training Admin group or other recipient(s) whom Vault should notify in the event of job failures.
    * The __Schedule__ is hourly by default. We recommend scheduling the job to run at least 10 minutes prior to the _Update Training Assignments_ job.
4. {:#config-overview-state-mapping} Optional: Configure the _Person_ object lifecycle to allow Vault to automatically move records to a given lifecycle state based on state type mapping. For example:
    * Mapping the _Initial State_ and _Eligible_ state types to the _Eligible_ state allows Vault to create new _Person_ records in the _Eligible_ state.
    * Mapping the _Ineligible_ state type to the _Ineligible_ state allows Vault to transition existing _Person_ records to the _Ineligible_ state.
5. {:#config-overview-app-setting} Navigate to __Admin > Settings > Application Settings__ and enable the __Auto Manage Persons__ setting. Optionally, enable the **Auto Manage Persons: Create <a href="/en/gr/52724/#individual-learner-roles">Individual Learner Role</a> for New Persons** setting. You can enable these settings at any time.

Once the _Auto-Manage Persons_ job is active and running, Vault begins managing _Person_ records based on the _User_ when a new _User_ is created, or when an existing _User_'s [supported fields][3] are updated. This means that any existing _Person_ records remain in their current state unless and until the related _User_ record is updated within these parameters.

### User & Person Field Support  {#user-and-person-field-support}

Vault maintains a _Person_ record according to the source _User_ record when both fields are:

* Of the same supported field type: Number, Yes/No (boolean), Date, DateTime, Object, Picklist, Text, Long Text, Rich Text.
* Configured with matching properties applicable for the field type, for example minimum/maximum value and maximum length.
* Configured with matching label and name values, excluding the suffix indicating whether the field is custom or standard, for example, `employee_type__c` and `employee_type__v`. To aid in implementing this feature, the below standard _Person_ fields are automatically supported when properly configured as custom _User_ fields:
    * _Department_ (`department__v`)
    * _Employee Type_ (`employee_type__v`)
    * _Job Level_ (`job_level__v`)
    * _Job Title_ (`job_title__v`)
    * _Organization_ (`organization__v`)
    * _Person's Organization_ (`persons_organization__v`)
    * _Person's Site_ (`persons_site__v`)
    * _Sub-Department_ (`sub_departent__v`)
    * _Working Location_ (`working_location__v`)

Selected fields cannot be <a href="/en/gr/15057/#how_to_add_object_fields">configured</a> with the _Do not copy this field in Copy Record_ option. See [Limitations][4] for more information on specific unsupported fields.

## Limitations  {#limitations}

Generally, this feature does not support:
* _User_ fields with names ending in `__sys`
* Any field <a href="/en/gr/15057/#how_to_add_object_fields">configured</a> with the _Do not copy this field in Copy Record_ option

Additionally, this feature is not supported for _Users_ which are:

* Auto-managed <a href="/en/gr/65816/">QMS external collaborators</a>, when the _Managed by Quality Automation_ (`managed_by_qms_automation__v`) field is "Yes".
* <a href="/en/gr/48712025/">Study Training</a> or <a class="external-link " href="https://cdmshelp.veeva.com/gr/user-administrators/learning-systems/" target="_blank" rel="noopener">CDMS Training<i class="fa fa-external-link" aria-hidden="true"></i></a> Learners, according to the _Managed by Training_ (`managed_by_training__v`) field.
* <a href="/en/gr/598557/">VeevaID</a> users, according to their assigned _Security Policy_ (`security_policy__sys`).

[1]: #config-overview-state-mapping
[2]: #config-overview-app-setting
[3]: #user-and-person-field-support
[4]: #limitations
