# Apex Error Notifications

**ApexExceptionEmail** template sets the email addresses that will receive notifications when the Apex code encounters unhandled exceptions. Emails can be sent to the Salesforce org’s users and external email addresses. Be sure to delete Salesforces users who no longer exist within your organization.

To create this template, follow the steps below:

1. Log in to your AutoRABIT account.
2. Click on **Env. Pro.** module.
3. Click on **Create New Template**.
4. Go to the **Create Unsupported Metadata Template** tab.
5. Give the template a **name** and a **short description** of it.
6. Select the **ApexExceptionalEmail** checkbox available under **Add Apex Exception Email.**
7. Click **Add**.&#x20;
8. On the next screen, a **Test Case Name** appears automatically by default. To add the custom test data, click on **Add** button.
9. Users can add the required details in the fields of **Salesforce User, External Email Addresses, and Delete Salesforce User.** To add further details, click on![](/files/JnPscwbmCLUwOKQG9Zor)icon.

   * You can even add multiple pages for the above-generated test cases. Click on the **+** symbol and fill in the fields mentioned in the earlier steps.&#x20;
   * Click **OK**.&#x20;
   * Once done, click on the **Save** button to save this page.

   <figure><img src="/files/BmqCDNVb6au4wmPdaRho" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/kKUkFs1PtqnNmPaJVNoF" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/N7qfGcuQR14P78hF3wca" alt=""><figcaption></figcaption></figure>
10. Next, Click **Save** to save the template.
11. Once the template is successfully created, you'll be redirected to the **Environment Provisioning History** screen.
12. Click the **Run** button to run the template on your destination org.
13. Select your **destination org** from the dropdown and enter the **email address(es)** to receive an email notification whenever the template is run.
14. In the **Post-Deployment Steps**, select the test cases that you have recently created.&#x20;
15. Please check the **View History** page for a detailed summary report of the operation carried out.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/arm-1/arm-features/environment-provisioning/unsupported-metadata-templates/apexexceptionemail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
