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

# Outcome Metering

> Count finished work from your events and AI traces, check whether it succeeded, and bill from fixed monthly numbers

**Outcome Metering** turns the events and AI traces DataFramer already stores into **work**: one row for each finished item, such as one completed security questionnaire. Each month becomes a **monthly statement** whose numbers lock once they are final, so you can bill your own customers from them. Find it under **Outcomes**.

## Concepts

* **Work type**: one kind of finished work, for example "Questionnaire completed", with the settings below.
* **Id**: the [field](/docs/user-signals/fields-and-linking#fields) that holds the id of one work item, for example "Questionnaire id", read from `properties.questionnaire_id` on events and `metadata.questionnaire_id` on AI traces. All events and AI traces with the same value form one work item. With **Journey id** as the id and the default linking rule, each journey is one work item.
* **Account** (optional): the field that holds your own customer's id, for example a tenant id. Statements can be split by it; work without one still counts in the totals.
* **Which work counts** (optional): every work item counts, unless you add conditions it must meet, for example "the event `questionnaire_submitted` happened", or with NOT, "… with `is_test` = true" to leave out test work.
* **When work ends**: a work item ends after **7 days with no new events or AI traces** for its id (you can change the number). Its **last activity**, the time of its last event or AI trace, decides the month.
* **Successful when** (optional): conditions on events and AI traces, for example "the event `questionnaire_accepted` happened", plus [AI judge conditions](#ai-judge-conditions). Work is **Successful** when the conditions hold and every AI judge condition is met.

## Set up a work type

Create one under **Outcomes → Work types**. Only company admins create or change work types.

The conditions use the [condition builder of dashboard widgets](/docs/journeys/dashboards#conditions), sequences included. **Count work from** is the first month to count, and it cannot be changed afterwards; pick a later month if older events and AI traces do not carry the id yet.

Each save makes a new version and counts again every month that is not locked; locked months keep their version. **Archive** stops a work type from counting, and its locked months stay on the statements.

## Statuses, months and locking

A work item is **Updating** until its days with no new events or AI traces have passed, and new events and AI traces can still change its result and its month. One day later it is **Finalized**, once DataFramer has pulled the latest AI traces and scored the AI judge conditions. If a project's traces cannot be pulled for a day, it is finalized anyway, with a warning that names the project.

An admin can end a work item early with **Finalize now**; events and AI traces that arrive later no longer count.

Work belongs to the month of its last activity, in UTC. A work type's numbers for a month lock one day after the month ends, once all its work for that month is finalized. Each work type locks on its own, and locked numbers never change.

**Monthly statements** shows each work type's work items for one month, and how many are finalized and successful, for all accounts or one. **Export** downloads the totals as a CSV, and one CSV per work type with a line per work item.

### Work found late

Work whose event or AI trace arrives after its month locked, for example from a late import, counts in the first month that is not locked yet, marked **found late** with its real date. A locked month never changes, and no work is counted twice.

## AI judge conditions

An AI judge condition scores the AI traces of a work item with one of your [judges](/docs/judges/overview) and compares the score with a number from 0 to 1, for example "at least 0.8". It scores one kind of AI trace (one trace name) or all of them, overall or on one dimension; with several AI traces, the average or the lowest score counts.

Each AI judge runs once per work item, when it is finalized, so later judge edits never change finished work. Judge calls are charged to your company's AI usage. AI traces too large to judge are left out. If no trace can be scored, or a judge call keeps failing (for example on your AI spend limit), the condition is not met; the work item is still finalized.

## Customer-hosted deployments

For companies whose data stays in their own cloud account, Outcome Metering counts work in the same way, with these differences:

* AI judge conditions are scored by your data plane, so a work item with one is finalized up to about 10 minutes later. If a judge call fails there, the work page says so without the provider's error text.
* Conditions on an event property work only for properties [copied to DataFramer](/docs/deployment#user-signals-in-a-customer-hosted-deployment). The id and the account can be read from any property: your data plane reads them.
* A new or changed work type counts stored work after about 15 minutes, because your data plane reads the ids again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.