> For the complete documentation index, see [llms.txt](https://triton.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://triton.pharos.ai/triton-best-practices/taxonomy-and-standards.md). Agents can also search and read this documentation through its [MCP server](https://triton.pharos.ai/~gitbook/mcp).

# Taxonomy & Standards

Designing a Category / Type / Area vocabulary that scales — what each field is for, the values that ship, and how to extend them without fragmenting your data.

Three fields classify every Triton log — **Category**, **Type**, and **Area** — and they're what turn a pile of records into something you can filter, group, alert on, and learn from. A good taxonomy is boring on purpose: everyone uses the same small vocabulary, so every dashboard lines up. This page is about designing that vocabulary for your org. The mechanics of the enums live in [Core Concepts → Enums](https://triton.pharos.ai/core-concepts/enums.md).

## The three fields, and what each is *for*

They're not interchangeable — each answers a different question.

| Field        | Answers                                  | Perspective      | Affects rendering?                                    |
| ------------ | ---------------------------------------- | ---------------- | ----------------------------------------------------- |
| **Category** | What technology produced this?           | Technical, broad | **Yes** — Pharos picks the layout/detail view from it |
| **Type**     | What kind of operation, specifically?    | Technical, fine  | No                                                    |
| **Area**     | What part of the business is this about? | Business         | No                                                    |

The Category caveat matters: because it drives which detail view renders, mislabeling an Apex log as `Flow` still captures your data but shows you the wrong debug view. **Match Category to the technology you're logging from** — `Apex` from Apex, `LWC` from a component, `Flow` from a Flow. A callout is no exception: it's still an `Apex` log — what makes it an *integration* log is the request/response you attach with `.integrationPayload(...)`, not a separate category. (`Triton.makeBuilder()` starts you on `Apex` already.)

The same discipline applies to severity: **it never belongs in Category.** A warning logged from Apex is an `Apex` log at the `WARNING` **Level**, not a "warning" category — severity lives in the log's [Level](https://triton.pharos.ai/core-concepts/log-levels.md) and the Log Level rules that filter on it. Every log has a knowable origin technology, so Category always has a real answer; keep it that way.

## The values that ship

Straight from `TritonTypes` — use these before inventing anything.

**Category:** `Apex` · `Flow` · `LWC` · `Aura`

**Type:** `Backend` · `Frontend` · `DMLResult` · `LongRunningRequest` · `ConcurrentRequestsLimit` · `AccountTrigger` · `BackendCall` · `ComponentLifecycle` · `ComponentRender` · `UserInteraction` · `Performance`

**Area:** `OpportunityManagement` · `LeadConversion` · `Community` · `RestAPI` · `Accounts` · `LWC` · `Flow`

Area is deliberately thin — it's the most org-specific of the three, and you're **expected** to add your own.

## Adding your own values — the right way

Don't edit `TritonTypes.cls` to add values. It's a Triton file: the next upgrade overwrites your additions, or leaves you resolving merge conflicts every time. `type(...)` and `area(...)` accept plain strings, so keep your org's vocabulary in a class of `public static final String` constants that you own:

{% code lineNumbers="true" %}

```apex
public class TritonArea {
    public static final String PAYMENT_PROCESSING = 'PaymentProcessing';
    public static final String CREDIT_SCORING = 'CreditScoring';
    public static final String INVOICE_SYNC = 'InvoiceSync';
    public static final String CUSTOMER_ONBOARDING = 'CustomerOnboarding';
}
```

{% endcode %}

Then use it like any shipped value:

{% code lineNumbers="true" %}

```apex
Triton.info(Triton.t.area(TritonArea.INVOICE_SYNC).summary('Invoice pushed to ERP'));
```

{% endcode %}

{% hint style="info" %}
**Constants, not scattered literals.** A constant gives you autocomplete, one place to see the whole vocabulary, and no risk of `'InvoiceSync'` vs `'Invoice_Sync'` drift. Flows and LWCs pass the same string (`InvoiceSync`) through their Area input and `.area(...)`, so a feature groups together across all three tiers. The full pattern is in [Custom Classifications](https://triton.pharos.ai/core-concepts/custom-classifications.md).
{% endhint %}

## Designing Area so it stays useful

Area is where most teams either succeed or make a mess. A few rules that keep it healthy:

* **Name for features and domains, not tables.** `DealRegistration`, `PartnerCommunity`, `InvoiceSync` — the things you'd actually want to filter or alert on. Not `Trigger1` or `Utils`.
* **Pick a granularity you'd filter at.** Too coarse (`Backend`) and everything lands in one bucket; too fine (one per method) and no two logs share a value. Aim for "a feature a product owner would recognize."
* **Add sparingly and deliberately.** Every new Area is a commitment the whole org has to honor. Grow it on purpose, not by reflex.
* **Business-oriented and stable.** Areas should outlive refactors. If renaming a class forces an Area rename, the Area was too technical.

## Mapping your work to the taxonomy

A quick reference for how common work classifies. Extend the Area column for your own domains.

| Work                      | Category | Type             | Area                  |
| ------------------------- | -------- | ---------------- | --------------------- |
| Lead conversion service   | `Apex`   | `Backend`        | `LeadConversion`      |
| Account trigger           | `Apex`   | `AccountTrigger` | `Accounts`            |
| Bulk DML outcome          | `Apex`   | `DMLResult`      | *(your domain)*       |
| Payment gateway callout   | `Apex`   | `Backend`        | `PaymentProcessing`\* |
| Customer portal component | `LWC`    | `Frontend`       | `Community`           |
| REST endpoint             | `Apex`   | `Backend`        | `RestAPI`             |
| Autolaunched Flow         | `Flow`   | *(flow type)*    | *(your domain)*       |

\* `PaymentProcessing` is an example of an org-specific Area you'd keep in your own constants class (`TritonArea.PAYMENT_PROCESSING`).

## Governance without bureaucracy

A taxonomy is only worth having if it stays consistent, and that takes a little upkeep — not a committee.

* **One owner (or a small group).** Someone signs off on new Category/Type/Area values so the vocabulary doesn't sprawl.
* **Document as you go.** A short living list of your custom Areas and what each means, so a new hire uses the existing value instead of inventing a synonym.
* **Enforce in review.** The [Standards Enforcement](https://triton.pharos.ai/triton-best-practices/standards-enforcement.md) checklist catches ad-hoc strings and off-taxonomy values before they merge.

{% hint style="success" %}
**The whole point is that everyone uses the same words.** A perfectly-designed taxonomy that half the team ignores is worse than a simple one everyone follows. Keep it small, document it, and enforce it lightly but consistently.
{% endhint %}

## Related reading

* Enum mechanics and how filtering uses these same three fields: [Core Concepts → Enums](https://triton.pharos.ai/core-concepts/enums.md).
* Keeping the taxonomy clean over time: [Standards Enforcement](https://triton.pharos.ai/triton-best-practices/standards-enforcement.md).
