# Configuring the Create Effectiveness Check Entry Action (QMS)

Many organizations use _Effectiveness Checks_, a standard component in QMS Vaults, to track the evaluation of controlled changes in their quality processes. If _Effectiveness Checks_ are a part of your QMS processes, you may wish to automate _Effectiveness Check_ record creation to avoid manual steps and ensure that such checks start when necessary.

Using this feature, you can configure the _Create Effectiveness Check_ record entry action on the QMS application's _Quality Event_, _CAPA Action_, _Complaint_, _Change Control_, _Change Plan_, _Deviation_, _Finding_, _Lab Investigation_, or _Continuous Improvement_ object records to automate the creation and processing of _Effectiveness Check_ records when their related record or, for example, _CAPA Action_ records, enter the chosen state. This entry action is not available to other object lifecycles.

Optional further configuration can automate much of the effectiveness check process, including creation and task assignment, alleviating the need for constant reporting and manual checking to determine the timing and assignment of _Effectiveness Checks_.

## Preparing the Effectiveness Check Object

Before incorporating the _Create Effectiveness Check_ entry action into your object lifecycles, you must ensure that your _Effectiveness Check_ object is ready.

### Effectiveness Check Object Types {#effectiveness-check-object-types}

Depending on the configuration of your Vault, the _Effectiveness Check_ object may have multiple [object types](/en/lr/32857/). For example, you may have a "QE Effectiveness Check" _Effectiveness Check_ object type for _Quality Events_, and a "CAPA Effectiveness Check" _Effectiveness Check_ object type for _CAPA Action Items_. For each _Effectiveness Check_ object type that you wish to create automatically, ensure that their configurations have been [properly prepared][1] for use with the entry action.

### Required Fields in Effectiveness Checks {#required-fields-in-effectiveness-checks}

An important part of configuration is to consider your use of _Long Text_ and _Object Reference_ [fields](/en/lr/15057/) on the _Effectiveness Check_ object (or object type). The entry action cannot set these types of field values. The entry action will fail if the _Effectiveness Check_ object requires a field to be populated unless it has been defaulted via [field defaulting rules](/en/lr/42778/), or set using the Effectiveness Check Lifecycle's [_Create Record_](/en/lr/51700/) record action's _Set Field_ action. To populate a field which your process requires, but cannot be set via Field Defaults or the _Create Record_ record action, you can start a workflow on the _Effectiveness Check_ as part of the _Create Record_ record action. Alternatively, if you're using Quality Teams, you can assign a task to request these field values as part of the _Team Completeness_ destination state entry actions. For example, any _Object (User)_ fields on the _Effectiveness Check_ object (or object type) should be set via a field default rule or configured to be not required, or else the _Create Effectiveness Check_ entry action will fail.

## Configuring the Create Effectiveness Check Entry Action {#configuring-the-create-effectiveness-check-entry-action}

To configure automatic _Effectiveness Check_ record creation:

  1. Navigate to **Admin** > **Configuration** > **Object Lifecycles** and click into your desired lifecycle, such as _Quality Event_.
  2. In the _States_ section, click into the lifecycle state in which you want to automatically create an _Effectiveness Check_ record, typically a state just after a change has been completed.
  3. In the _Entry Actions_ section, click **Edit**.
  4. Add the _Create Effectiveness Check_ [entry action](/en/lr/59885/) to the lifecycle state.
  5. Optional: To prevent unnecessary Effectiveness Check record creation, it is recommended that you use the [**Perform with conditions**](/en/lr/59885/#conditions) option in this entry action, selecting the **Require Effectiveness Check** field (or analogous field, as per your configuration), and defining a condition using **equals**, and **Yes/No** per your process.
  6. If you have [configured object types][2] for the _Effectiveness Check_ object, select the appropriate type in the **Effectiveness Object Type** drop-down. The list in the drop-down only includes _Effectiveness Check_ object types with a reference to this lifecycle's target object. This field will not appear if you have not configured object types for the _Effectiveness Check_ object.
  7. In the **Reference field on new Record** drop-down, select the field in the _Effectiveness Check_ which will link any newly created record back to the triggering record. For example, the _Quality Event_.
  8. Click **Save**.

This entry action will now create an _Effectiveness Check_ when the selected object record enters the selected state. Additional configuration is necessary if you wish to transfer data from the triggering record, to automatically start a workflow for data entry upon creation of the _Effectiveness Check_ record, or to schedule a job for the effectiveness check workflow to start at a later date. See the [example configuration][3] below and determine how these configuration options work best for your processes.

## Example Effectiveness Check Configuration {#example-effectiveness-check-configuration}

In a QMS Vault in which you want to automate much of the effectiveness check process, the following configurations help reduce the amount of manual work involved. Using all of these configurations together can create a cohesive automated effectiveness check process for your _Quality Events_, _CAPA Action Items_, or _Complaints_. Note that different _Quality Event_, _CAPA Action Item_, or _Complaint_ object and lifecycle configurations may require different steps than those described below. You should evaluate and configure automation to fit your specific process needs.

### Effectiveness Check Object Record Event Actions

Using the **Update Record Field** record [event action](/en/lr/59885/), populate values on the newly created _Effectiveness Check_ record according to your needs. For example, you can optionally set the precondition to check if the reference field chosen during [configuration of the entry action][4] is not blank, then set the following record field updates:

  * Set the _Title_ field of the _Effectiveness Check_ record to match or be created from the _Title_ field (or other text field of your choice) of the related object.
  * Set the record's _Due Date_ field value based on values from the parent-process record, such as setting the _Due Date_ based on the parent record's _Action Completed Date_ plus 120 days.
  * Set the record's _Effectiveness Check Start Date_ field value based on values from the parent-process record, such as setting the _Due Date_ based on the parent record's _Action Completed Date_ plus 90 days. This field setting is intended to be used with [Job automation][5] to ensure that your _Effectiveness Check_ workflow begins, in this example, 30 days before the due date.

Furthermore, you can use event actions to start a workflow and prompt a user (either the record owner, or a [Quality Team](/en/lr/52842/) member in the appropriate role) to populate fields upon creation of the record, and to change the _Effectiveness Check_ record to a state designating that it is waiting for automation, such as a "**Waiting for Start Date**" state. This is useful for setting fields on the _Effectiveness Check_ which cannot be set using an **Update Record Field** event action, such as a _User_ field, _Object Reference_ field, or a _Long Text_ field. Having the record in a special waiting-for-automation state allows you to configure jobs to only auto-start workflows on _Effectiveness Check_ records which have had all of their set-up completed.

### Automating the Effectiveness Check Workflow Start {#automating-the-effectiveness-check-workflow-start}

Using Vault's [jobs](/en/lr/22897/) functionality, you can automate the start of the _Effectiveness Check_ activity at the appropriate time. To create such a job:

  1. Update the _Effectiveness Check_ lifecycle to include an "Effectiveness Check Auto-Start" state. This is the state that begins the review of the effectiveness check, and the workflow should transition the record immediately out of it into your configuration process states.
  2. Navigate to **Admin** > **Operations** > **Job Definitions**.
  3. Click **Create**.
  4. Configure a job that checks the age of the _Effectiveness Check_ record and, if appropriate, changes the *Effectiveness Check*'s state to the "Effectiveness Check Auto-Start" state so that your effectiveness check workflow work can automatically start:
      * **Type**: Date Based Object Operation
      * **Action**: State Change
      * **Object**: Effectiveness Check
      * **Change State To**: Effectiveness Check Auto-Start
      * **Additional Conditions**: Enter appropriate constraints which indicate that an Effectiveness Check record has all requisite data to be started, such as _Lifecycle State_ **equals** _Waiting for Start Date_, or _Description_ **is not blank**
      * **Trigger Date**: _Effectiveness Check Start Date_, is on or before, job run date

 [1]: #required-fields-in-effectiveness-checks
 [2]: #effectiveness-check-object-types
 [3]: #example-effectiveness-check-configuration
 [4]: #configuring-the-create-effectiveness-check-entry-action
 [5]: #automating-the-effectiveness-check-workflow-start
