> For the complete documentation index, see [llms.txt](https://docs.enate.net/whats-new/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enate.net/whats-new/older-versions/changes-overview-older-versions/2022.4-changes-overview/incoming-email-routing-improvement.md).

# Incoming Email Routing Improvement

We've made some improvements on how incoming emails are routed if they're being sent in to a now-closed Action, so it's gets to the right place and be more easily seen and dealt with.

Initially, if an incoming email was sent to a closed work item, it would be attached to the parent work item. For example, if case C has a closed action A1 and the email is sent using A1 as the subject, the email would be attached to case C.

With the updated logic, the system now behaves as follows:

1. It will first check the other open actions. If it finds an action which has the type of “Manual”, “Peer Review” or “Send Email & Wait”, it will attach the email to that action **and not the parent case**.
2. If there are multiple open actions present, the email will be attached to the latest updated action.

For example, let’s say we have a case C with 3 actions: A1, A2 & A3.

* Out of these 3 actions, A1 is closed & A2 and A3 are manual actions.
* A service recipient sends an email in to A1.
* As per the new logic, it will be attached to A2 or A3, depending on which action was updated last.

{% hint style="info" %}
**Note:**  The logic is only applicable for action types: “Manual”, “Peer Review”, and “Send Email & Wait”. If in the same above example, A2 and A3 are OCR, RPA, and External API Actions, the email will be attached to the parent case C (just like the old system behaviour)**.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.enate.net/whats-new/older-versions/changes-overview-older-versions/2022.4-changes-overview/incoming-email-routing-improvement.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
