# Capabilities

Capabilities extend entity views with extra functionality, such as tabs, attribute groups or action buttons, defined on a schema through UI hooks.

[[API Docs](/api/entity/#tag/Schemas)]
[[SDK](https://www.npmjs.com/package/@epilot/entity-client)]

Capabilities extend entity views with additional functionality. They are defined on a schema and hook into the UI as tabs, attribute groups, or action buttons. Each capability specifies a `name`, `title`, and a list of `ui_hooks` that control where and how the capability renders.

## Native Capabilities

The following capabilities are built into the platform and available to all entities:

### Order Table

The order table capability manages line items within Order and Contract entities. Line items represent products and prices quoted or sold to an end customer. For details on the `line_item` structure, see the [Pricing API](/api/pricing) Order Schema.

![order table capability](/img/order-table-capability.png)

Order Capability basic structure:

```json
  {
    "name": "order_items",
    "title": "Ordered Items",
    "ui_hooks": [
      {
        "hook": "EntityAttributes:Group",
        "order": 1,
        "title": "Ordered Items",
        "component": "PricingItems"
      }
    ],
  }
```

Capability configuration to support hiding columns:

```json
  {
    "name": "order_items",
    "title": "Ordered Items",
    "ui_hooks": [
      {
        "hook": "EntityAttributes:Group",
        "order": 1,
        "title": "Ordered Items",
        "component": "PricingItems",
        "settings": {
          "columns": [
            {
              "field": "amount_subtotal",
              "visible": true
            }
          ]
        }
      }
    ],
  }
```

The `settings.columns` property controls which columns are visible or hidden.

### Quoting

The quoting capability manages quotes and orders (`items`) within the Opportunity entity. Each quote or order links to Order entities that describe a set of items to be sold or quoted to an end customer.

For details on the `items` field structure, see the [Pricing API](/api/pricing#tag/opportunity_schema) Opportunity Schema.

![Quoting Capability](/img/quoting-capability.png)

Capability configuration to support hiding columns:

```json
  {
    "name": "quoting_relations",
    "title": "Quotes & Orders",
    "ui_hooks": [
      {
        "hook": "EntityAttributes:Group",
        "order": 6,
        "title": "Quotes & Orders",
        "component": "QuotingItems",
        "expanded": false,
        "isCapability": true,
        "settings": {
          "display_grand_totals": true
        }
      }
    ]
  }
```

The `settings.display_grand_totals` property controls whether grand totals are displayed. When enabled, recurrence-based totals are hidden.