# Auto-Submissions

With auto-submissions, Safety can submit multiple ICSR files to the gateway destination directly from the _Case_. Once reporting obligations are evaluated for a _Case_, users can submit at the _Case_ level without having to navigate to each ICSR _Transmission_.

### Key Concepts

* **ICSR Transmission**: One of the <a href="/en/gr/01264/#icsr-transmission-types">ICSR _Transmission_ types</a>

* **Schema Validation**: An E2B file validation based on the file type and the XML Schema defined by the Agency (e.g. FDA E2B R2, EMA E2B R3).

## Use the Submit to Gateway Action from a Case

When configured, the _Submit to Gateway_ action allows you to submit multiple ICSR _Transmissions_ from a _Case_. Your Vault may be configured to trigger this action when a _Case_ is approved.

You will not be able to trigger this action if:
* The Validation Status is _Hard Fail_. Your Admin can <a href="/en/gr/01226/#assign-hard-fail-to-validation-rules">configure the Result Status Type to Hard Fail</a>
 for certain _Validation Criteria_ to prevent gateway submissions.
* Vault is in the process of evaluating reporting obligations for the _Case_.


<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>: 
If you use Auto-Submissions to multiple destinations that are triggered automatically as part of a workflow, your Admin can <a href="/en/gr/01404/">configure the Async Submit to Gateway feature</a>
 to improve the performance of your Vault when sending transmissions.</p>
    </div>
  </div>
</div>





<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>: 
If <a href="/en/gr/716226/">Strict Transmission Version Enforcement</a>
 is enabled, Vault will not auto-submit follow-up <em>Submissions</em> before the previous <em>Submission</em> to the same <em>Destination</em> and <em>Transmission Profile</em> (or <em>Destination ID</em> for the PMDA) is <em>ACK Accepted</em> or <em>Completed</em>.</p>
    </div>
  </div>
</div>



The _Transmission_ is eligible for auto-submission if:

* It is in the _Active_ lifecycle state.
* It has the _Auto-Submit_ field set to _Yes_.
* The _Validation Status_ is not _Fail_ or _Hard Fail_.
* It is not currently in any _In Progress_ or _Complete_ lifecycle states.
    * **In Progress** States:
        * **Sending ICSR**
        * **Sending Attachments**
        * **MDN Received**
        * **E2B ACK Accepted**
    * **Complete** States:
        * **Complete**
        * **Withdrawn**
        * **Inactive**

Before submission to the gateway, the _Transmission_ files are regenerated and the schema is validated.

## Use the Auto-Submit Field

_Auto-Submit_ is a field on the _Transmission_ and _Transmission Profile_ objects. You can use the _Auto-Submit_ field to include or exclude _Distribution_ and _Submission_ type _Transmission_ records for auto-submission from a _Case_.

Your Admin can configure the _Auto-Submit_ field on the following types of _Transmission Profiles_:

* _AS2 Gateway_
* _Email Profile_
* _Partner Exchange Profile_
* _System Gateway_

When an Admin pre-configures the _Auto-Submit_ value on a _Transmission Profile_, Vault copies the value to any _Transmissions_ generated using that profile. Vault overrides this value if the _Reporting Rule_ that triggered the creation of the _Transmission_ contains the <a href="/en/gr/01250/#auto-submit-override">Auto-Submit Override</a>
 _Safety Rule Parameter_.

<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>: You may override the <em>Auto-Submit</em> value set by the <em>Transmission Profile</em> at the <em>Transmission</em> level.</p>
    </div>
  </div>
</div>




<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>: 
Regardless of the setting on the <em>Transmission Profile</em>, if the <a href="/en/gr/740208/#submissions"><em>Cancel Auto-Submit for Translations</em></a>
 feature is enabled, Vault prevents automatic submissions for unapproved <em>Localized Cases</em>.</p>
    </div>
  </div>
</div>



## Transmission E2B XML Files

Vault regenerates the transmission XML files before submission to capture the most accurate transmission date. Vault then updates the _Transmission Date_ on the _Transmission_ to reflect the value in the XML file. Vault updates this field value when the file is submitted to the gateway to reflect the most accurate date/time stamp and to ensure it does not result in a schema Validation Error.

When a _Transmission_ is created and the _Auto-Submit_ field is set to _Yes_, Vault sets the _Transmission Date_ to the current date and time the record was generated.

<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>: These auto-submission default values can be overridden at the <em>Transmission</em> level.</p>
    </div>
  </div>
</div>



Vault validates the schema file. If there are validation errors, and based on the configuration, the file is excluded from the submission.

Audit logs are created for each _Transmission_. The recorded user in the audit trail is the user that started the action on the _Case_.

Vault sends an email notification for each auto-submitted record.

## Lifecycle State Changes after Schema Validation {#validation-state}

When an E2B file is generated for a _Transmission_, Vault validates the file's schema and sets the lifecycle states accordingly.

* When there are no schema validation errors and the _Auto-Submit_ field has a value (either _Yes_ or _No_), Vault updates the _Transmission_ record (for the _Submission_ and _Distribution_ object types):
  * When the _Transmission Profile Type_ is _AS2 Gateway_, _Connection_, or _System Gateway_, Vault sets the _Transmission_ record to the _Ready_ state unless your Admin has enabled the <a href="/en/gr/740208/#submissions">_Suppress File Generation for Auto-Submit Transmissions_ setting</a>
.
  * When the _Transmission Profile Type_ is _Email Profile_, Vault sets the _Transmission_ record to the _Ready_ state when:
    * The report is generated and blind protection is applied where required.
    * The cover letter is generated when specified.
* When the _Auto-Submit_ field is blank, the _Transmission_ record is set to the _Pending_ state.
* If there are schema validation errors, the _Transmission_ record is set to the _Validation Error_ state and the _Case_ record is set to _Transmission Error_.

<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>: When <em>Auto-Submit</em> is blank, the <em>Transmission</em> that failed a validation criteria does not automatically change states once that validation criteria is resolved and the document re-generated. Vault only updates the lifecycle state if the <em>Auto-Submit</em> field has a value in case the document is re-generated.</p>
    </div>
  </div>
</div>



If the _Transmission_ file is not E2B format, Vault skips the schema validation step and sets the lifecycle states as follows:

* When the _Auto-Submit_ field has a value (either _Yes_ or _No_), the ICSR _Transmission_ is set to the _Ready_ state.
* When the _Auto-Submit_ field is blank, the ICSR _Transmission_  is set to the _Pending_ state.