# molted outcomes

Source: https://molted.email/docs/cli/outcomes

Track and query outcomes

| Command | Description |
| - | - |
| [`molted outcomes ingest`](#molted-outcomes-ingest) | Ingest an outcome event |
| [`molted outcomes list`](#molted-outcomes-list) | List outcomes |
| [`molted outcomes get`](#molted-outcomes-get) | Get an outcome by ID |
| [`molted outcomes dashboard`](#molted-outcomes-dashboard) | Get outcomes dashboard |
| [`molted outcomes journey-impact`](#molted-outcomes-journey-impact) | Get journey impact on outcomes |

## Agent context

Outcomes track business events (conversions, purchases, signups) and attribute them back to emails and journeys. Use this to measure whether your sends are actually driving results.

### Ingest an outcome event

```bash
molted outcomes ingest --contact alice@example.com \
  --event-type conversion --event-name signup \
  --revenue 99.99 --metadata '{"plan": "pro"}'
# → { "outcomeEventId": "<uuid>" }

molted outcomes ingest --contact bob@example.com \
  --event-type engagement --event-name page-view \
  --occurred-at 2025-06-15T10:00:00Z
```

### Query outcomes

```bash
molted outcomes list --event-type conversion --from 2025-06-01 --to 2025-06-30
# → up to 100 outcome rows, newest first
molted outcomes get <id>
# → the outcome row plus its "attributions" (one per attribution model)
```

### Dashboard (aggregate view, last 30 days)

```bash
molted outcomes dashboard
# → { "totalOutcomes": 45, "totalRevenue": 4500, "byType": [{ "eventType": "conversion", "count": 45, "revenue": 4500 }] }
```

### Journey attribution

```bash
molted outcomes journey-impact
# → the stored journey impact snapshots (outcomes and revenue attributed
#   to each journey), newest first
# → use this to decide which journeys to optimize or scale
```

Event types: free text, the API stores any string. The examples here use conversion and engagement; the MCP record\_outcome tool only accepts activation, trial\_conversion, meeting\_booked, deal\_closed, upsell and custom, so prefer those if your agent also records outcomes over MCP.

### Key behaviors

- Outcomes are linked to contacts - use the same email as in sends
- Attribution is automatic - each outcome is linked to the sends to that contact in the 30 days before it occurred (and their journeys)
- `--occurred-at` defaults to now if omitted
- Needs a workspace key (admin, or all mailboxes); a mailbox-scoped key gets 403

Related: [`molted journeys`](https://molted.email/docs/cli/journeys.md), [`molted analytics`](https://molted.email/docs/cli/analytics.md), [`molted contacts`](https://molted.email/docs/cli/contacts.md)

## Commands

### molted outcomes ingest

Ingest an outcome event

```bash
molted outcomes ingest [options]
```

| Option | Description | Default |
| - | - | - |
| `--contact <email>` | Contact email (required) (required) | |
| `--event-type <type>` | Event type, free text (required) (required) | |
| `--event-name <name>` | Event name (required) (required) | |
| `--revenue <n>` | Revenue amount, a decimal currency amount (e.g. 99.99), not cents; at most 2 decimals | |
| `--metadata <json>` | Metadata as JSON | |
| `--occurred-at <date>` | ISO date when event occurred | |

### molted outcomes list

List outcomes

```bash
molted outcomes list [options]
```

| Option | Description | Default |
| - | - | - |
| `--event-type <type>` | Filter by event type | |
| `--from <date>` | Start date (ISO) | |
| `--to <date>` | End date (ISO) | |

### molted outcomes get

Get an outcome by ID

```bash
molted outcomes get <id>
```

| Argument | Description | Required |
| - | - | - |
| `<id>` | Outcome ID | yes |

### molted outcomes dashboard

Get outcomes dashboard

```bash
molted outcomes dashboard
```

### molted outcomes journey-impact

Get journey impact on outcomes

```bash
molted outcomes journey-impact
```

See [CLI overview](https://molted.email/docs/cli.md) for global options, credentials and output format.
