> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bango.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Correlation reports

> Use correlation reports to compare entitlement data held by you and DVM.

The correlation process lets you compare entitlement data held in your systems with the corresponding entitlement data held by DVM.

Use correlation reports to identify matching records, records that exist in only one dataset, and records where key entitlement values differ. Correlation identifies the differences; use [reconciliation](/reconciliation/reconciliation) to investigate and correct them.

## Correlation types

DVM supports three correlation types.

| Type | Description |
| - | - |
| Events only | Includes only entitlements where `customerIdentifier`, `productKey`, or `status` changed during the correlation period. This is the default. |
| All active entitlements and events | Includes all active entitlements, plus any entitlement where `customerIdentifier`, `productKey`, or `status` changed during the correlation period. |
| All managed entitlements and recently canceled entitlements | Includes all managed entitlements and entitlements canceled during the most recent correlation period. |

<Note>
  An entitlement appears only once in a correlation file, using the latest available data, even if it changed multiple times during the correlation period.
</Note>

## Send correlation data to DVM

Upload your correlation file to the Amazon S3 bucket provided for DVM correlation during onboarding.

Correlation processing starts when the file arrives and normally completes within minutes.

Supported correlation periods are:

| Period | Definition |
| - | - |
| Daily | One calendar day |
| Weekly | Monday to Sunday |
| Monthly | One calendar month |

Correlation is processed by partner. Provide one file for each counterpart partner and correlation period required.

## Input location

Upload files to:

```text theme={null}
s3://{s3-bucket}/CorrelationReports/{partner}/Input
```

| Variable | Description |
| - | - |
| `{s3-bucket}` | Your dedicated DVM correlation S3 bucket |
| `{partner}` | The counterpart partner identifier for the route |

For resellers, `{partner}` is the `merchantAccountKey` used when creating an entitlement.

For content providers, `{partner}` is the `resellerId` provided in the create entitlement request.

## File naming

Use:

```text theme={null}
{startDate}-{endDate}.csv
```

Dates use `YYYYMMDD` format.

| File type | End date handling |
| - | - |
| Monthly | `endDate` is inclusive |
| Weekly | `endDate` is inclusive |
| Daily | `endDate` is exclusive |

Examples:

| File name | Description |
| - | - |
| `20240201-20240229.csv` | Monthly correlation file for February 2024 |
| `20240219-20240225.csv` | Weekly correlation file for February 19–25, 2024 |
| `20240201-20240202.csv` | Daily correlation file for February 1, 2024 |

Files must use RFC 4180 CSV format and UTF-8 encoding. Use UTC for timestamps and RFC 3339 date-time values.

## How correlation works

DVM validates and normalizes the file, then compares the supplied entitlement data with the corresponding DVM data.

The fields used for correlation depend on whether you are a reseller or content provider.

<CardGroup cols={2}>
  <Card title="Reseller correlation file format" icon="table" href="/reconciliation/reseller-correlation-input-file-format">
    Required fields, matching rules, and output columns for reseller correlation.
  </Card>

  <Card title="Content provider correlation file format" icon="table" href="/reconciliation/content-provider-correlation-file-format">
    Required fields, matching rules, and output columns for content provider correlation.
  </Card>
</CardGroup>

## Correlation results

Each output record includes:

* `CorrelationResult` — the overall result
* `CorrelationResultReason` — the reason for a mismatch, where applicable
* The values supplied in your file
* The corresponding values held by DVM

Possible results are:

| Result | Meaning |
| - | - |
| `OK` | The entitlement matches according to the configured correlation rules |
| `Error` | One or more differences were identified |

Typical mismatch reasons include:

* Missing entitlement in DVM
* Extra entitlement in DVM
* `CustomerIdentifier` is different
* `ProductKey` is different
* `Status` is different
* Multiple differences detected

## Output files

By default, DVM generates four output files for each input file and publishes them to:

```text theme={null}
s3://{s3-bucket}/CorrelationReports/{partner}/Output
```

| File name | Description |
| - | - |
| `{yourId}-{partner}-{reportingPeriod}-Matched.csv` | Entitlements that matched |
| `{yourId}-{partner}-{reportingPeriod}-BangoOnly.csv` | Entitlements present in DVM but not in your file |
| `{yourId}-{partner}-{reportingPeriod}-{yourId}Only.csv` | Entitlements present in your file but not in DVM |
| `{yourId}-{partner}-{reportingPeriod}-MisMatched.csv` | Entitlements present in both sources where one or more compared values differ |

A single consolidated output file can also be enabled:

```text theme={null}
{yourId}-{partner}-{reportingPeriod}.csv
```

## Output configuration

DVM correlation output can be configured to suit the agreed partner setup.

| Configuration | Description |
| - | - |
| Consolidated output | Return matching and mismatching entitlements in a single file |
| Separate output files | Return separate files for matches and differences |
| Custom field mappings | Map partner-specific field names or values to the standard DVM correlation model |
| Status mapping | Translate partner-specific entitlement statuses into the standard DVM status model |
| Product mapping | Map partner product identifiers to DVM product keys |
| File delivery location | Deliver output to the agreed Amazon S3 location |
| File splitting | Split large output datasets into sequential files |

Configuration is agreed during onboarding and can be updated through Bango Support.

## Next step

Correlation tells you where the datasets differ. Use [Reconciliation](/reconciliation/reconciliation) to investigate those differences and correct the relevant data.
