# Duplicate Detection

## Field Mapping

When an email is converted into a Salesforce Case, Delpha (and Email-to-Case) map each part of the email to the right Salesforce field.

| **Case Field (Salesforce)** | **Email Field (Source)** | **Explanation**                                                                                                                                              |
| --------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Case Sender**             | **Email Address**        | The email address of the person who sent the email. This is used to identify the Contact or create a new one if needed.                                      |
| **Case CC List**            | **D CC Address**         | All recipients in the **CC** of the email are stored here. They can be used to track stakeholders copied on the case. D CC Address is a Delpha custom field. |
| **Case Subject**            | **Subject**              | The email subject line becomes the case subject. This helps categorize and search cases quickly.                                                             |
| **Case Body**               | **Description**          | The email body (message content) is inserted into the case description so that agents see the original customer message.                                     |

{% hint style="warning" %}
These fields are used for duplicate detection.&#x20;
{% endhint %}

## Assessment Period (Days)

When searching for potential duplicate cases, the system needs to compare each newly created case with past cases. Since both open and closed cases are considered, the number of possible matches is restricted by defining a maximum look-back period based on the case creation date.

## Case Filters

Case Filters let you define conditions that limit which cases are considered during duplicate detection. You can select any case field or any field in a related object, choose an operator (*equals* / *not equals*), and combine multiple filters with AND logic to focus only on the cases that matter.

#### Example:

To only compare cases where **Case Origin = Email** <mark style="color:orange;">and</mark> where **Account.Billing Country = United States**.

<div align="left"><figure><img src="/files/rLAyUw3DOVzh9jMnhn91" alt="" width="258"><figcaption></figcaption></figure></div>

This ensures the assessment process runs only on the subset of cases created through the Email to Case process and associated to US Accounts.&#x20;


---

# 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://help.delpha.io/delpha-for-salesforce/use-cases-setup/duplicate-cases-email-to-case/duplicate-detection.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.
