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

# ESG & CSRD Reporting

> Automated aggregation of transaction data for real-time sustainability reporting.

The ESG & CSRD module aggregates transaction-level sustainability data into reporting-ready datasets that align with the Corporate Sustainability Reporting Directive (CSRD) and Environmental, Social & Governance (ESG) frameworks.

## How it works

Every order and transaction processed through Hey Chocolate automatically contributes to your aggregated sustainability metrics. The API provides endpoints to pull reporting data at any time — no manual data collection required.

## Generating a report

```graphql theme={null}
query {
  csrdReport(input: {
    period: { from: "2025-01-01", to: "2025-12-31" }
    scope: [SCOPE_1, SCOPE_2, SCOPE_3]
    format: ESRS
  }) {
    period { from to }
    totalTransactions
    emissions {
      scope1 { total unit breakdown { category value } }
      scope2 { total unit breakdown { category value } }
      scope3 { total unit breakdown { category value } }
    }
    products {
      totalTracked
      averageCo2
      bestPerformer { id name co2Equivalent }
      worstPerformer { id name co2Equivalent }
    }
    supplyChain {
      totalSuppliers
      certifiedPercentage
      averageTierDepth
    }
    trends {
      period
      co2Equivalent
      transactionCount
    }
  }
}
```

## Scope breakdown

| Scope       | Description       | Hey Chocolate coverage                                   |
| ----------- | ----------------- | -------------------------------------------------------- |
| **Scope 1** | Direct emissions  | Operational data from your organization                  |
| **Scope 2** | Indirect (energy) | Energy consumption data                                  |
| **Scope 3** | Value chain       | Automatically calculated from all product and order data |

## ESRS alignment

The report output aligns with European Sustainability Reporting Standards (ESRS):

| ESRS Topic                      | Hey Chocolate data                                          |
| ------------------------------- | ----------------------------------------------------------- |
| **E1 - Climate change**         | CO2 equivalents, emission trends, reduction targets         |
| **E2 - Pollution**              | Material toxicity, chemical safety profiles                 |
| **E3 - Water & marine**         | Water footprint per product and aggregate                   |
| **E5 - Circular economy**       | Recycled content, end-of-life scenarios, circularity scores |
| **S2 - Workers in value chain** | Supply chain certification data                             |

## Audit trail

All calculations feeding into CSRD reports are logged in an immutable audit trail:

```graphql theme={null}
query {
  reportAuditTrail(reportId: "report_2025") {
    entries {
      timestamp
      calculationId
      productId
      inputHash
      resultHash
      methodology
    }
    totalEntries
    integrityChecksum
  }
}
```

This is essential to prevent greenwashing claims and withstand regulatory scrutiny.

## Export formats

| Format | Description                         |
| ------ | ----------------------------------- |
| `ESRS` | ESRS-aligned JSON structure         |
| `GRI`  | Global Reporting Initiative format  |
| `CDP`  | Carbon Disclosure Project format    |
| `CSV`  | Raw data export for custom analysis |
| `PDF`  | Formatted report document           |

## Scheduling

Set up automated periodic reports:

```graphql theme={null}
mutation {
  scheduleReport(input: {
    frequency: QUARTERLY
    scope: [SCOPE_1, SCOPE_2, SCOPE_3]
    format: ESRS
    webhookUrl: "https://your-app.com/webhooks/report"
    recipients: ["sustainability@company.com"]
  }) {
    scheduleId
    nextRunAt
  }
}
```
