> ## 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.

# Contract Line

> Field reference for the Veles Contract Line object in the Salesforce managed package.

A Veles Contract Line is one **product charge committed for one phase window**
of a contract — the contract-side reporting workhorse. See
[Contract Lines](https://docs.getveles.com/get-started/contract-management/contract-line.md) for how lines
behave in Veles.

Lines are master-detail children of the
[Contract](https://docs.getveles.com/sfdc-managed-package/objects/contract.md), giving one flat, reportable
list per contract, with a lookup to their
[Contract Phase](https://docs.getveles.com/sfdc-managed-package/objects/contract-phase.md). Phase sequence
and billing attributes are denormalized onto the line so rollup and report
filters work without joins.

## Lines across amendments

An amendment updates a line in place, so a line keeps its record, and its
Veles External ID, from the contract's first order through every amendment.
Its prices, quantity and dates always show its current terms.

* A line the amendment adds is a new record.
* A line the amendment removes stays, flagged **Removed**. One removed before
  it starts keeps its terms and dates as they were; one removed while under
  way has its End Date moved to the day before the amendment. A removed line
  carries no run-rate: its Net Amount and Allocated Amount are zero, so a sum
  over lines needs no filter, and its prorated amounts are what it was worth
  before it ended. A line a re-import drops reads Removed the same way.

Each amendment also records what it did to the line, before and after, as a
[Contract Amendment Line](https://docs.getveles.com/sfdc-managed-package/objects/contract-amendment-line.md).
The line's **Amendment Lines** related list is its whole change history, the
removal included.

## The money on a contract line

A contract line has the order line's **one price lens**: the agreed price,
carried through from the order that created or last amended it. List and
system prices, and the discount between them, stay on the
[Quote Line](https://docs.getveles.com/sfdc-managed-package/objects/quote-line.md):

| Quote Line | Order Line | Contract Line | Meaning |
| - | - | - | - |
| Net Unit Price | Net Unit Price | Net Unit Price | Per-unit price after all discounts |
| Net Amount | Net Amount | Net Amount | Extended amount, annualized |
| Net Amount Prorated | Net Amount Prorated | Net Amount Prorated | Extended amount for the actual window |
| Allocated Amount | Allocated Amount | Allocated Amount | Derived bundle money, annualized |
| Allocated Amount Prorated | Allocated Amount Prorated | Allocated Amount Prorated | Derived bundle money for the actual window |
| Bundle | Bundle | Bundle | Marks bundle lines |
| Parent Line | Parent Line | Parent Line | Points a component at its bundle's line |

The names match deliberately: quote to order to contract is the join a revenue
team makes, and one number should have one name the whole way through.

**Amendments change the prorated lens.** Net Unit Price, Quantity and Net
Amount are the line's current terms. Net Amount Prorated is what the line is
worth over its window: until an amendment changes the line it is Net Amount x
Proration Factor, and after one it counts the line at its old terms up to the
amendment and at its new terms after. That is what the phase totals and the
contract's TCV sum, so `SUM(Net Amount Prorated)` still totals the contract.
Allocated Amount Prorated stays on the current terms over the line's window.

Bundle money keeps the quote's complementary grain: each line's engine price
lands in exactly one of Net Amount (the row's own, transacted price) or
Allocated Amount (what the bundle's pricing mode allocated onto the row), so an
unfiltered `SUM(Net Amount)` totals the contract correctly with no bundle
filter. Product-grain reports use the row formula `Net Amount + Allocated
Amount` filtered `Bundle = false`; never sum Allocated Amount by itself. The
full explanation and a worked example live on
[Quote Line](https://docs.getveles.com/sfdc-managed-package/objects/quote-line.md#bundle-money-two-complementary-columns).

## Fields at a glance

| Field | API Name | Type |
| - | - | - |
| Line Name | `Name` | Text (standard name field) |
| Veles External ID | `Veles__External_Id__c` | Text(255), unique, external ID |
| Contract | `Veles__Contract__c` | Master-Detail(Veles Contract) |
| Phase | `Veles__Phase__c` | Lookup(Veles Contract Phase) |
| Phase Sequence | `Veles__Phase_Sequence__c` | Number(3, 0) |
| Product | `Veles__Product__c` | Lookup(Product2) |
| Product Name | `Veles__Product_Name__c` | Text(255) |
| Product SKU | `Veles__Product_SKU__c` | Text(255) |
| Quantity | `Veles__Quantity__c` | Number(16, 2) |
| Net Unit Price | `Veles__Net_Unit_Price__c` | Currency(16, 2) |
| Net Amount | `Veles__Net_Amount__c` | Currency(16, 2) |
| Net Amount Prorated | `Veles__Net_Amount_Prorated__c` | Currency(16, 2) |
| Allocated Amount | `Veles__Allocated_Amount__c` | Currency(16, 2) |
| Allocated Amount Prorated | `Veles__Allocated_Amount_Prorated__c` | Currency(16, 2) |
| Proration Factor | `Veles__Proration_Factor__c` | Percent(7, 4) |
| Billing Type | `Veles__Billing_Type__c` | Picklist |
| Billing Frequency | `Veles__Billing_Frequency__c` | Picklist |
| Bundle | `Veles__Bundle__c` | Checkbox |
| Removed | `Veles__Removed__c` | Checkbox |
| Parent Line | `Veles__Parent_Line__c` | Lookup(Veles Contract Line) |
| Start Date | `Veles__Start_Date__c` | Date |
| End Date | `Veles__End_Date__c` | Date |
| Months | `Veles__Months__c` | Number(4, 0) |
| Position | `Veles__Position__c` | Number(8, 2) |
| Synced At | `Veles__Synced_At__c` | DateTime |

## Field details

**Name** `Text (standard name field)`

**Line Name** — The same text as Product Name, cut at 80 characters.

**Veles\_\_External\_Id\_\_c** `Text(255), unique, external ID`

**Veles External ID** — The Veles contract line ID. An amendment updates the
line in place, so the ID holds across amendments. All sync writes upsert on
this field; never edit.

**Veles\_\_Contract\_\_c** `Master-Detail(Veles Contract)`

**Contract** — The Veles contract this line belongs to. Master-detail: all of
a contract's lines across every phase, as one flat list. Filter by Phase
Sequence or Billing Type to slice it.

**Veles\_\_Phase\_\_c** `Lookup(Veles Contract Phase)`

**Phase** — The contract phase (time window) this line sits in. Lookup rather
than master-detail, since the line's owning parent is the contract; use the
denormalized Phase Sequence field for rollup filters.

**Veles\_\_Phase\_Sequence\_\_c** `Number(3, 0)`

**Phase Sequence** — The 1-based sequence of the phase this line sits in,
denormalized so rollup and report filters work without joins — e.g. SUM(Net
Amount) WHERE Phase Sequence = 1 AND Billing Type = Recurring.

**Veles\_\_Product\_\_c** `Lookup(Product2)`

**Product** — The Salesforce Product2 record matching this line's Veles
product, when the mapping is known. Enables native "revenue by product family"
joins. May be empty — Product Name and Product SKU are always populated as text
so reports never break on a missing lookup.

**Veles\_\_Product\_Name\_\_c** `Text(255)`

**Product Name** — The line's name as it read on the quote behind the order
that created or last amended it (the rep's rename, else the product name
recorded on the quote line), or the product's name for a line no quote
produced, such as one on an imported contract. Stored as text so it survives
catalog changes and reports never depend on the Product lookup resolving.

**Veles\_\_Product\_SKU\_\_c** `Text(255)`

**Product SKU** — The product SKU recorded on that quote line, or the
product's SKU for a line no quote produced. Stored as text for the same reason
as Product Name.

**Veles\_\_Quantity\_\_c** `Number(16, 2)`

**Quantity** — The units this line's rate is priced over across the whole
contract: the line's own quantity times the bundles it rides in, so Net Unit
Price x Quantity is the row's Net Amount. On a row whose money is Allocated
the Net Unit Price is zero and its value is in Allocated Amount instead. A
usage line's is its own quantity. Fractional quantities are possible.

**Veles\_\_Net\_Unit\_Price\_\_c** `Currency(16, 2)`

**Net Unit Price** — The per-unit price for this line at its current terms,
after all discounts. Zero on a row whose money is Allocated. The contract
mirror carries no list or system price and no discount: those stay on the
quote, so this is the only unit price on the record.

**Veles\_\_Net\_Amount\_\_c** `Currency(16, 2)`

**Net Amount** — The line's extended net amount at its current terms,
annualized/full-term (the run-rate lens, before proration). Recurring lines'
Net Amounts sum to the phase's ARR; a Removed line's is zero, as it carries no
run-rate. See Net Amount Prorated for the window actual.

**Veles\_\_Net\_Amount\_Prorated\_\_c** `Currency(16, 2)`

**Net Amount Prorated** — The line's net amount for its actual window: what
the customer pays for this line in this phase. Until an amendment changes the
line it is Net Amount x Proration Factor; after one, it counts the line at its
old terms up to the amendment and at its new terms after. On a line removed
while under way it is what the line was worth before it ended, and zero on one
removed before it started. Recurring lines'
values sum to the phase's Recurring Revenue Prorated; one-time lines are never
prorated. **This is the field to sum for revenue reporting** — no bundle
filter needed: like Net Amount, it carries transacted money only, `0` on
bundle rows whose price is derived from other rows (Allocated Amount Prorated
holds those).

**Veles\_\_Allocated\_Amount\_\_c** `Currency(16, 2)`

**Allocated Amount** — The value the bundle's pricing mode allocated onto
this row, annualized/full-term: a component's spread share of a
parent-priced bundle's whole line (every bundle sold), or the components'
total rolled up onto a sum-of-parts bundle line. At most one of Net Amount and
Allocated Amount is non-zero on any row — add them for the row's
whole-contract value. Zero on a Removed line. **Never sum this column**: a bundle's Allocated restates
the value of its contents; to total a contract, sum Net Amount.

**Veles\_\_Allocated\_Amount\_Prorated\_\_c** `Currency(16, 2)`

**Allocated Amount Prorated** — The window-actual companion to Allocated
Amount, at the line's current terms. At most one of Net Amount Prorated and
Allocated Amount Prorated is non-zero on any row. Never sum this column; to
total a contract, sum Net Amount Prorated.

**Veles\_\_Proration\_Factor\_\_c** `Percent(7, 4)`

**Proration Factor** — How much of the line's annualized amount applies to its
actual window (day-based). 100% means no proration. Until an amendment changes
the line, Net Amount x Proration Factor = Net Amount Prorated; after one, Net
Amount Prorated also carries the line's terms before the amendment, so the two
no longer match.

**Veles\_\_Billing\_Type\_\_c** `Picklist`

**Billing Type** — How this line's charge behaves. Unrestricted so new Veles
billing types never break the sync.

Values: `Recurring` (repeats every billing period), `One-Time` (billed once),
`Usage` (transactional/consumption-based, billed on actuals). **Usage lines
contribute nothing to phase totals**: they are billed on actuals, which the
contract does not hold.

**Veles\_\_Billing\_Frequency\_\_c** `Picklist`

**Billing Frequency** — How often this line is invoiced: `Monthly`,
`Quarterly`, `Semi-Annual`, or `Annual`. Independent of Billing Type — a
recurring line can be billed at any of these cadences.

**Veles\_\_Bundle\_\_c** `Checkbox`

**Bundle** — Whether this line is a bundle: a product whose component
lines carry its detail. True when other lines name it as their Parent Line,
whatever the bundle's pricing mode. Product-grain reports filter
`Bundle = false` and total Net Amount + Allocated Amount — see
[the money on a contract line](#the-money-on-a-contract-line).

**Veles\_\_Parent\_Line\_\_c** `Lookup(Veles Contract Line)`

**Parent Line** — The line this line sits under: for a bundle component, the
bundle's own line in the same phase. Empty for standalone lines and for the top
line of a bundle. Structure only; every row carries its own Net or Allocated
money regardless of this pointer.

**Veles\_\_Removed\_\_c** `Checkbox`

**Removed** — Whether the line is out of the contract: an amendment dropped
it, before it started or while it was under way, or a re-import did. The line
keeps its record, so its Amendment Lines related list is its whole history.
Its Net Unit Price, Quantity and dates still say what was dropped; its Net
Amount and Allocated Amount are zero, and its prorated amounts are what it
was worth before it ended. Maintained by the Veles sync.

**Veles\_\_Start\_Date\_\_c** `Date`

**Start Date** — The first day of the line's own effective window. Lines can
cover a sub-window of their phase (e.g. a line an amendment added mid-phase).

**Veles\_\_End\_Date\_\_c** `Date`

**End Date** — The last day of the line's own effective window. A line an
amendment removes while it is under way stays on the contract and ends the day
before the amendment.

**Veles\_\_Months\_\_c** `Number(4, 0)`

**Months** — How many months the line's effective window spans, derived from
its start and end dates.

**Veles\_\_Position\_\_c** `Number(8, 2)`

**Position** — The line's sort order within its phase.

**Veles\_\_Synced\_At\_\_c** `DateTime`

**Synced At** — When the Veles sync last wrote this record. The contract
mirror updates whenever the contract changes in Veles: created by an executed
order, activated, amended or cancelled.


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