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

# Waste Water Treatments

> Recalculate emissions for waste water treatment records

<Note>
  **Early Access** - The Dcycle CLI is currently available for enterprise customers.
  [Contact us](/docs/support) to learn more about access.
</Note>

## Overview

Waste water treatment records track water treatment processes and their associated greenhouse gas emissions. The CLI provides a recalculation command to trigger async emission calculations for records that don't have computed values yet.

### Available Commands

| Command                                  | Description                                           |
| ---------------------------------------- | ----------------------------------------------------- |
| `dcy waste-water-treatments recalculate` | Queue recalculation for WWT records without emissions |

***

## Recalculate Emissions

Queue recalculation for waste water treatment records that don't have calculated emissions yet. The backend sets each matched record to "loading" status and triggers async recalculation via EventBridge:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy waste-water-treatments recalculate --yes
```

Output:

```
done — 12 WWT record(s) queued for recalculation
```

If no records need recalculation:

```
no WWT records found without calculated emissions
```

### Flags

| Flag         | Short | Default | Description                                                   |
| ------------ | ----- | ------- | ------------------------------------------------------------- |
| `--facility` | `-f`  | —       | Facility UUID (omit to recalculate all facilities in the org) |
| `--yes`      | `-y`  | `false` | Skip confirmation prompt                                      |
| `--dry-run`  | —     | `false` | Show what would be executed without triggering                |
| `--org`      | —     | —       | Organization ID override                                      |

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Recalculate all facilities in the organization
dcy waste-water-treatments recalculate --yes

# Scope to a single facility
dcy waste-water-treatments recalculate --facility <facility-id> --yes

# Preview what would happen (no API calls)
dcy waste-water-treatments recalculate --dry-run

# JSON output
dcy waste-water-treatments recalculate --yes --format json
```

<Tip>
  For large organizations, use `--facility` to scope the recalculation to a single facility to avoid long-running operations.
</Tip>

***

## Typical Workflows

### Recalculate After Data Changes

After updating waste water treatment data in the web interface, trigger recalculation from the CLI:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Preview which facility to target
dcy facility list --format json | jq '.[] | {id, name}'

# Dry-run to see the scope
dcy waste-water-treatments recalculate --facility <facility-id> --dry-run

# Trigger recalculation
dcy waste-water-treatments recalculate --facility <facility-id> --yes
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Facilities" icon="warehouse" href="/cli/facilities">
    Manage physical locations
  </Card>

  <Card title="Invoices" icon="file-invoice" href="/cli/invoices">
    Manage energy invoices for Scope 1 and 2 emissions
  </Card>

  <Card title="Own Workforce" icon="hard-hat" href="/cli/own-workforce">
    Manage own workforce records
  </Card>

  <Card title="Custom Emission Factors" icon="sliders" href="/cli/custom-ef">
    Upload organization-specific emission factors
  </Card>
</CardGroup>
