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

# Understanding Features

## **Overview**

Features are the foundational units of monetization in Metrifox. They represent monetizable functionality, resource or value in your product, enabling flexible pricing, packaging, and usage tracking.

Once you integrate Metrifox with your codebase, you can create and monetize unlimited features, without additional engineering work. This lets you experiment with pricing, packaging, and easily track its usage, control who has access to it, and include it in different pricing plans, add-ons or single purchases entirely from the Metrifox dashboard.

Think of features as the core components you use to build your pricing models. Instead of just creating a plan for "premium," you can break down your product into individual features like:

* **Boolean features:** A simple on/off function, such as "access to analytics dashboard."
* **Metered features:** A function that is tracked by usage or outcome, such as "500 API calls per month", "monthly active users" or “qualified lead”

## **Creating a feature**

1. Navigate to the **Catalog** section in Metrifox.
2. Open the **Features** sub-section.
3. Click the **"Create Feature"** button.

<img src="https://mintcdn.com/metrifox/KLSy4uN3o9ecfDRT/images/features/feature_list.png?fit=max&auto=format&n=KLSy4uN3o9ecfDRT&q=85&s=47d5cc0fe0deae9dede68363d7a6b98f" alt="Feature List" width="2282" height="1372" data-path="images/features/feature_list.png" />

4. A modal is displayed for you to define the **Feature details**

Fill out the following fields in the modal:

| **Field**                  | **Description**                                                                                                           | **Recommendations**                                                                                                                                       |
| :------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Feature Name**           | A clear, descriptive name for the feature (e.g., "API Calls per Month").                                                  | Use customer-friendly naming for internal clarity.                                                                                                        |
| **Description (Optional)** | Additional context about the feature’s purpose or usage.                                                                  | Helpful for cross-team alignment (e.g., finance, product).                                                                                                |
| **Feature Key**            | Provide a feature key, or allow Metrifox to auto-generate a unique identifier.                                            | Used to reference the feature in your **application code** (e.g., `api_calls_monthly`).                                                                   |
| **Unit Label**             | Sets the singular and plural names for the unit of measurement shown on invoices, customer dashboards, and usage reports. | Required for Metered features; optional (but recommended) for Boolean.  Examples: • Singular: call → Plural: calls,<br />• Singular: seat → Plural: seats |
| **Feature Type**           | Defines how the feature is tracked and billed.                                                                            | **Options:**<br />- **Boolean:** On/off access (e.g., "Premium Support").<br />- **Meter:** Usage, outcome, (e.g., "API Calls").                          |

<img src="https://mintcdn.com/metrifox/KLSy4uN3o9ecfDRT/images/features/create_feature.png?fit=max&auto=format&n=KLSy4uN3o9ecfDRT&q=85&s=e7571b31a227f2e7f049834ac5ec640e" alt="Create Feature" title="Create Feature" style={{ width:"94%" }} width="1484" height="1560" data-path="images/features/create_feature.png" />

### Metered Features Settings (appear only when Metered is selected)

These settings become available only when **Metered** is selected:

<Steps>
  <Step title="Select Feature Type">
    Choose **"Metered"** as the feature type when creating a new feature that you want to be tracked by usage or outcome.
  </Step>

  <Step title="Configure Metering">
    Metered features require the following settings:

    **1. Usage Type (Required)**

    Defines how usage is recorded and reset:

    * **PER USE**
      * Discrete, event-based actions (e.g., API calls, emails sent).
      * Usage resets at the end of each reset period.
    * **PERSISTENT USE**
      * Ongoing usage that accumulates (e.g., storage, seats).
      * Does not reset; capacity limits can be adjusted.

    **2. Event Name (Required)**

    * A unique label to send usage data or outcome event for metering, multiple event names are supported(comma-seperated). e.g., `image_generated`, `api_call_executed`.

    **3. Aggregation Method (Required)**

    How raw events are calculated for billing:

    | **Metric**     | **Use Case**                           | **Example**                   |
    | :------------- | :------------------------------------- | :---------------------------- |
    | `SUM`          | Total usage (e.g., bytes stored).      | `SUM(storage_bytes)`          |
    | `COUNT`        | Number of events (e.g., API calls).    | `COUNT(api_requests)`         |
    | `COUNT_UNIQUE` | Unique instances (e.g., users).        | `COUNT_UNIQUE(user_id)`       |
    | `MIN`/`MAX`    | Peak/floor values (e.g., temperature). | `MAX(concurrent_connections)` |
    | `LATEST`       | Last recorded value.                   | `LATEST(account_balance)`     |
    | `AVERAGE`      | Mean value over time.                  | `AVERAGE(cpu_usage)`          |
  </Step>

  <Step title="Complete Creation" stepNumber={3}>
    * Click **"Create a Feature"** to finalize.

      **Example Configuration**

      | **Field**       | **Value**                           |
      | :-------------- | :---------------------------------- |
      | **Usage Type**  | `PER USE`                           |
      | **Event Name**  | `api_call_executed`                 |
      | **Aggregation** | `COUNT`                             |
      | **Units**       | `call` (singular), `calls` (plural) |
  </Step>
</Steps>

### **Managing Your Features**

Navigate to the feature list in the **Catalog** section. From the list of features on the feature page, click the **three dots (⋮)** menu next to any feature to access management options.

<img src="https://mintcdn.com/metrifox/my5WIX9lZ0ht8-bA/images/features/manage_features.png?fit=max&auto=format&n=my5WIX9lZ0ht8-bA&q=85&s=c992747fdf66cdf6b3dc0c7a53dd5e14" alt="Manage Features" width="2208" height="1044" data-path="images/features/manage_features.png" />

### Editing a Feature

To edit a feature:

1. **Locate the Feature**
   * Click the **⋮ menu icon** on the feature's row
   * Select edit
2. **Update Fields**
   * Edit any editable fields (Feature name, description, units, etc.)
   * Note: Certain properties like the **Feature Key** and **Feature type** cannot be modified after creation or if the feature is in use.
3. **Save Changes**
   * Click ”**Save Changes**” to apply your updates.

<Warning>
  * Cannot modify the **Feature Key, Feature Type and Usage Type** once created
  * Changes propagate to all existing plans and add-ons using the feature
</Warning>

### Archiving Features

When a feature is no longer needed for new customers but may still remain active for existing ones, it can be archived.

### What Happens When You Archive a Feature?

* **Removed from selection lists**: Won't appear when creating new plans/add-ons.
* **Existing access preserved**: Current customers keep access through old plan or add-ons versions
* **Feature key remains reserved**: Cannot be reused for new features

### How to Archive a Feature

1. Click the **⋮ menu icon** on the feature's row
2. Select **"Archive feature"**
3. In the confirmation modal:
   * Click  the "**Archive feature**" button

### Prerequisites for Archiving

* The feature must **not** be used in any **published plans or add-ons**
* If in use:
  1. Create new versions of affected plans/add-ons without the feature
  2. Publish the new versions
  3. Then archive the feature
