# Send a Gateway Transmission

Vault supports AS2 interchange to communicate with trading partners and regulatory authorities. AS2 is a secure electronic data transmission protocol between two trading partners (gateways) through the Internet. Vault can direct E2B _Transmissions_ to regulatory agencies and custom _AS2 Connections_.

The following graphic shows the steps that occur when Vault sends an E2B transmission to a regulatory agency gateway or trading partner.

<a href="https://platform.veevavault.help/assets/images/saf-gateway-process.png" data-lightbox="saf-gateway-process.png" data-title="" data-alt="Asynchronous AS2 Transmissions Process">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-gateway-process.png" alt="Asynchronous AS2 Transmissions Process" style=""  />
</a>

1. Vault generates the source E2B XML file.
2. Vault affixes a digital signature and sends the encrypted E2B message.
3. The message is sent to the destination gateway and **ACK1** is returned to Vault.
4. Upon receipt of the message, the destination gateway sends an **MDN**.
5. The destination gateway decrypts the message and receives the E2B file.
6. The destination gateway sends the final **ACK** once the E2B is accepted.
7. Vault receives the final **ACK** and moves the _Transmission_ to the **ACK Accepted** state.

<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>: The above diagram shows the process for asynchronous AS2 transmissions, used for EMA E2B(R3) and FDA VAERS E2B(R3). For synchronous AS2 transmissions, used for FDA E2B (R2), the MDN (step 4) is returned to Vault using the same HTTP connection as the initial transmission (step 3).</p>
    </div>
  </div>
</div>



## Send a Gateway Transmission

To complete the ICSR gateway transmission, review the _Transmission_ record and attachments to verify they are correct, and then trigger the **Submit to Gateway** action.

### Prerequisites

* The _Transmission_ must be <a href="/en/gr/1022564/">created</a> as an _Early Notification_, a _Submission_, or a _Distribution_.
* Your Admin must have configured the <a href="/en/gr/703946/">_AS2 Connection_</a> and <a href="/en/gr/01202/">_Transmission Profile_</a> for the destination organization.
* You must have permissions to manage <a href="/en/gr/01264/">ICSR _Transmissions_</a>. Typically, this is reserved for the _Distribution Manager_ application role.

### Submit to Gateway Action

Use the **Submit to Gateway** action to send _Early Notifications_, _Submissions_, and _Distributions_ using an _AS2 Connection_ with a _Transmission Profile_, or a _System Gateway_.

When you trigger the **Submit to Gateway** action, Vault automatically regenerates the E2B Transmission document, assigns an _E2B Message ID_, and updates the _Transmission Date_ field.

Depending on your Admin's configuration, this action may be available as a user action on _Transmissions_ or triggered automatically as part of a workflow.

Vault sends the submission to the destination _AS2 Connection_ or _System Gateway_ configured in the corresponding _Transmission Profile_. Once complete, a notification appears on the **Home** tab under **Notifications** with the status of the submission.

#### Considerations

Be aware of the following considerations when using the **Submit to Gateway** action:

1. If the Validation Status for the _Submission_ is Hard Fail, the **Submit to Gateway** action will not run. 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_.
2. If <a href="/en/gr/716226/">Strict Transmission Version Enforcement</a> is enabled in your Vault:
   * Vault will not auto-submit Follow-up Submissions before the previous _Submission_ to the same Destination and _Transmission Profile_ (or Destination ID for the PMDA) is **ACK Accepted** or **Completed**.
   * If the _Case_ has a previous version with an open _Transmission_ to the same Destination and _Transmission Profile_,  Vault asks for confirmation before sending the new _Transmission_.
3. 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_.

### Review the Transmission Document

1. Go to the _Transmission_. Find _Transmissions_ under the relevant _Case_ or from the **Transmissions** tab.
2. Beside **File** select the file link. The document appears in a new page.
3. From the <img class="inline" src="https://platform.veevavault.help/assets/images/saf-download-doc.png" alt="download-doc" style=" width: 3rem;" /> menu, select **Source Document**. Vault downloads the XML file.
4. When the download is complete, open the file to review the ICSR.

### Regenerate the Transmission Document

If the _Case_ or _Transmission_ changes, regenerate the transmission document.

1. Go to the _Transmission_. Find _Transmissions_ under the relevant _Case_ or from the **Transmissions** tab.
2. Expand the **All Actions** menu, and then select **Generate Transmission Document(s)**.

**Result**

Vault generates a new version of the document and updates the _File_ field.

## Types of Gateway Responses (ACKs and MDNs) {#types-of-gateway-responses}

Every gateway transmission returns responses which indicate the success or failure of the transmission. These responses can be a Message Delivery Notification (MDN) or an Acknowledgment (ACK).

When a Vault gateway transmission is sent, MDN and ACKs from the trading partner are added as _Transmission Messages_ referenced by the outbound _Transmission_ (_Early Notification_, _Submission_, or _Distribution_). Vault populates the _Attachments_ section of the _Transmission Message_ record with a downloadable file based on the response type as follows:

* **MDN:** A TXT file
* **ACK:** An XML file

In addition, when transmissions receive an ACK, Vault populates the ACK.B.r.2 Local Report Number in the _Destination Case ID_ field of the associated _Transmission_ record.

The following articles provide more information on inbound ACKs and MDNs:

* <a href="/en/gr/01271/">Resolve Gateway Issues</a> provides the steps to view gateway response messages.
* <a href="/en/gr/01245/">Standard Agency ICSR Submissions</a> describes how Vault maps agency MDNs and ACKs to Vault's response labels (ACK 1-4) and _Transmission_ lifecycle states.

See the following section for more information on the standard _Transmission_ lifecycle states.

## Transmission Lifecycle States for Gateway Transmissions {#transmission-lc-states}

<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>: The following table describes the standard <em>Transmission</em> object lifecycle states. <em>Transmissions</em> must be in the standard <em>Ready</em>, <em>Ready for Submission</em>, or <em>Pending</em> lifecycle state to send to a gateway. Vault does not support custom lifecycle states for gateway <em>Transmissions</em>. If your organization has a custom lifecycle state configuration, follow the recommendations in your business standard operating procedures.</p>
    </div>
  </div>
</div>



<table>
    <thead>
        <tr>
            <th>Lifecycle Stage Group</th>
            <th>Lifecycle State</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Pending</td>
            <td>Ready</td>
            <td>Ready is the initial stage and state of a <em>Transmission</em> for which the <em>Auto-Submit</em> field was set to a value. <a href="/en/gr/01260/">Auto-Submissions</a> provides more information.</td>
        </tr>
        <tr>
            <td>Pending</td>
            <td>Pending</td>
            <td>Pending is the initial stage and state of a <em>Transmission</em> for which the <em>Auto-Submit</em> field was not set to a value. Vault assigns a task to review and approve the <em>Transmission</em> and ICSR E2B file.</td>
        </tr>
        <tr>
            <td>Pending</td>
            <td>Validation Error</td>
            <td>Vault found errors during the E2B XML validation process.</td>
        </tr>
        <tr>
            <td>Pending</td>
            <td>Ready for Submission</td>
            <td>The transmission and transmission document have been reviewed and approved, and Vault has queued the transmission for sending to the destination gateway.</td>
        </tr>
        <tr>
            <td>Sending</td>
            <td>Sending ICSR</td>
            <td>The transmission has been sent but the destination gateway has not sent an acknowledgment message yet. </td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>Sending Attachments</td>
            <td>Vault is receiving an acknowledgment message from the destination gateway.</td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>Error</td>
            <td>Vault could not send the transmission.</td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>MDN Received</td>
            <td>The transmission was acknowledged by the destination gateway.</td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>MDN Failure</td>
            <td>The transmission could not be delivered to, or acknowledged by, the destination gateway.</td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>E2B ACK Warning</td>
            <td>Vault received the final ACK message indicating the destination gateway could not load the transmission.</td>
        </tr>
        <tr>
            <td>Sent</td>
            <td>E2B ACK Rejected</td>
            <td>Vault received the final ACK message with an error indicating the destination gateway loaded the transmission but rejected it, likely due to an issue in the E2B file.</td>
        </tr>
        <tr>
            <td>Accepted</td>
            <td>E2B ACK Accepted</td>
            <td>Vault received the final ACK message indicating the destination gateway accepted the E2B file and the transmission is complete. Note that the final ACK may still contain data warnings in this state.</td>
        </tr>
    </tbody>
</table>
