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

# Object Explorer

The Object Explorer lets admins inspect the schema of core Veles objects and extend them with custom fields. It is the central place to understand what data lives on each object and to tailor the data model to your organization's needs.

You can find it at **Admin > Pricebook > Object Explorer**.

## Object Types

The sidebar lists every registered object type. Each type has a set of **built-in fields** (read-only, defined in code) and optionally supports **custom fields** that admins can create, edit, and delete.

| Object | Key | Extendable | Description |
| - | - | - | - |
| Company | `company` | Yes | Organizations you do business with. Can be linked to CRM accounts. |
| Contract | `contract` | No | Active agreements with customers, created when an order is executed. Billing information, contract terms, and phases with line items. |
| Contract Line | `contract_line` | No | Individual line items within a contract phase: a product with billing type, frequency, quantity, and pricing. |
| Contract Phase | `contract_phase` | No | Time periods within a contract, each with a sequence number, effective date range, and contract lines. |
| CRM Proposal Fields | `crm_link` | No | Data synced from your connected CRM. These fields are read-only and managed by the CRM integration. |
| Order | `order` | No | Finalized purchase agreements generated from a quote block. Billing information, contract terms, and phases with line items. |
| Order Line | `order_line` | No | Individual line items within an order phase: a product with billing type, frequency, quantity, and pricing. |
| Order Phase | `order_phase` | No | Time periods within an order, each with a sequence number, effective date range, and order lines. |
| Product | `product` | Yes | Items your company sells. Products have pricing plans and can be added to quotes as line items. |
| Proposal | `proposal` | No | The quotes you author for a customer: name, status, dates, owner, and the company it belongs to. |
| Quote Block | `option` | Yes | Building blocks of a quote. Each block represents a pricing configuration with a currency, term length, and a collection of line items (products and charges). |
| Quote Line | `quote_line` | Yes | Individual line items within a quote block: a product charge with pricing, quantity, and discount information. |
| Quote Phase | `quote_phase` | No | Time periods within a quote block, each with a sequence number, effective date range, and quote lines. |
| User | `user` | Yes | People who use Veles. User fields can drive product filters for visibility control. |

Revenue fields on the quote, order, and contract objects use one vocabulary end to end: ARR, Recurring Revenue Prorated, One-Time Revenue, and Phase Contract Value on phases; TCV, One-Time TCV, and Recurring TCV on the containers, plus First-Year ARR, Exit ARR, and Blended ARR on the quote block; Net Unit Price, Net Amount, and Net Amount Prorated on lines. The same names appear on the Salesforce managed package objects.

## Built-in Fields

Every object type ships with built-in fields that cannot be removed or renamed. These cover the essential data for each object — things like `name`, `sku`, `price`, `quantity`, etc.

Built-in fields are displayed in a read-only table showing:

* **Name** — human-readable label
* **Key** — the programmatic identifier (used in formulas and rules)
* **Type** — the data type (text, number, currency, boolean, etc.)
* **Description** — what the field represents

## Custom Fields

Custom fields let you extend any extendable object type with additional data specific to your business. They are stored per-account and scoped to a single object type.

### Supported Field Kinds

| Kind | Description |
| - | - |
| Text | Free-form text. Supports an optional max length. |
| Number | Numeric value. Configurable precision, whether negatives are allowed, and a default value. |
| Currency | Monetary value. Same settings as Number (precision, negatives, default). |
| Boolean | True/false checkbox. Configurable default state. |
| Single Select | Dropdown with one selectable value. Options can be color-coded (green, red, orange, yellow, blue, purple). |
| Multi Select | Dropdown with multiple selectable values. Same color-coding as single select. |
| Formula | Computed field using a Dentaku expression. Configure the return type (number, currency, or percentage), precision, and whether negatives are allowed. Available on the Quote Block, Quote Phase and Quote Line objects only, and the only kind a Quote Phase takes. A Quote Block formula is worked out across all of the quote's phases and shows in the quote editor's rollup strip, next to TCV. Its result is saved with the quote each time the quote is saved, so a published version keeps the value it had when it was saved. A Quote Line formula is worked out for every line once the whole quote has priced, so it can weigh the line against its phase or the whole quote, and its result saves with the line. A Quote Phase formula is worked out for every phase after the Quote Line formulas, and its result saves with the phase. Quote Block formulas are worked out last, so they can add up the Quote Line and Quote Phase results. |

### Creating a Custom Field

1. Navigate to **Admin > Pricebook > Object Explorer**
2. Select an object type from the sidebar (e.g. Product)
3. Click **Add Custom Field**
4. Fill in the form:
   * **Name** — display label shown in the UI
   * **Key** — programmatic identifier (lowercase letters, numbers, and underscores only). This cannot be changed after creation.
   * **Kind** — the field type (see table above)
   * **Description** — optional explanatory text
5. Configure kind-specific settings (precision, options, formula expression, etc.)
6. Click **Submit**

### Editing and Deleting Custom Fields

Custom fields can be edited by clicking the **Edit** button in the custom fields table. The key cannot be changed after creation.

Deletion is blocked when a field is:

* **Mapped to a CRM field** — unmap it in your CRM integration settings first
* **Referenced by a formula field** - remove the reference from the formula first: `quote.custom_attributes.{key}`, `company.custom_attributes.{key}`, a line's `custom_attributes.{key}` or `product.custom_attributes.{key}` (`row.custom_attributes.{key}` and `row.product.custom_attributes.{key}` for a Quote Line formula's own line), or a phase's `custom_attributes.{key}` in a Quote Block formula
* **Referenced by a pricing rule** — remove the `config.{key}` reference from the rule first

When deletion is blocked, the Delete button is disabled and a tooltip explains which formulas or rules reference the field.

## Using Custom Fields

### In Formulas

Formula fields read custom fields under their object's `custom_attributes`. A Quote Block field with key `installation_cost` is `quote.custom_attributes.installation_cost` in a Quote Block or Quote Line formula. A Quote Line formula reads its own line's fields as `row.custom_attributes.{key}`, and any line's, inside FILTER or MAP over `phase.lines` or `quote.lines`, as `line.custom_attributes.{key}`. A Quote Block formula reads each phase's Quote Phase formula fields inside FILTER or MAP over `quote.phases`, as `phase.custom_attributes.{key}`: `SUM(MAP(quote.phases, phase, phase.custom_attributes.margin))` adds them up. A formula field never reads another formula field on its own object, or one worked out after it: Quote Line formulas come first, then Quote Phase, then Quote Block.

### In Rules

Custom fields can be referenced in pricing rules using `config.{key}`. This lets you build validation and pricing logic around your custom data.

### In CRM Sync

Custom fields can be mapped to Salesforce fields for bi-directional synchronization. Once mapped, the field shows a **CRM Field** label in the Object Explorer and cannot be deleted until the mapping is removed.


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