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

# Revenue Attribution

> How BossMode attributes revenue to specific agent moves, directives, and capo activity. Every dollar has a receipt.

<Warning>🚧 Expanding soon — full Attribution documentation is in progress.</Warning>

## What is revenue attribution?

Revenue attribution is BossMode's system for connecting a payment to the agent move that drove it. When a sale comes in via Stripe, BossMode traces the customer's journey back through the touch points, identifies which directive or capo move was responsible, and logs that attribution in the Daily Report.

Every dollar has a receipt. You always know which move made the money.

## How attribution works

1. **Signal capture** — BossMode ingests Stripe webhooks and UTM parameters from inbound traffic
2. **Touch point matching** — Each touch point is matched to a logged capo move (email sent, content published, follow-up executed)
3. **Attribution model** — BossMode uses last-touch attribution by default, with full-journey available in the report
4. **Receipt generation** — Attribution is written to the audit feed and surfaces in the Daily Report

## Attribution in the API

```bash theme={null}
# Revenue attribution for a date range
curl -sH "x-bossmode-token: $BOSSMODE_API_TOKEN" \
  "https://bossmode.ing/api/pro/attribution?from=2026-04-01&to=2026-04-13" | jq
```

Response:

```json theme={null}
{
  "totalRevenue": 12450,
  "attributed": [
    {
      "amount": 4997,
      "source": "Stripe",
      "customerId": "cus_••••",
      "attributedTo": {
        "type": "capo_move",
        "capo": "capo_marketing",
        "directiveId": "dir_abc123",
        "move": "Follow-up email sequence, day 3",
        "executedAt": "2026-04-10T09:15:00Z"
      }
    }
  ]
}
```

## Attribution models

| Model         | Description                                                |
| ------------- | ---------------------------------------------------------- |
| `last-touch`  | Credit to the last BossMode move before purchase (default) |
| `first-touch` | Credit to the first move that brought the lead in          |
| `linear`      | Credit spread evenly across all touch points               |
| `time-decay`  | More credit to moves closer to purchase                    |

Configure your model:

```bash theme={null}
curl -sX PUT https://bossmode.ing/api/pro/settings/attribution \
  -H "x-bossmode-token: $BOSSMODE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "model": "last-touch" }'
```

## Stripe integration

Attribution requires a Stripe webhook connected to BossMode. Configure this in Settings → Integrations → Stripe, or via the API:

```bash theme={null}
curl -sX POST https://bossmode.ing/api/pro/integrations/stripe \
  -H "x-bossmode-token: $BOSSMODE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "webhookSecret": "whsec_••••" }'
```
