Skip to main content

OpportunityLineItem Variables

Reference for the opportunityLineItem.* template variable namespace, which exposes custom Salesforce OpportunityLineItem fields on your RevOps deal.

Before you start: the fields you want to reference must be mapped first. See Importing OpportunityLineItems.

Namespaces

RevOps supports importing custom Salesforce Opportunity and OpportunityLineItem fields so they can be rendered in your templates. An Opportunity holds one set of values for the whole deal, while its OpportunityLineItems hold a set per SKU, per billing period. See Including CRM Data on Deals for how CRM Variables work generally.

NamespaceScopeContains
deal.*DealNative RevOps deal properties
current.sku.*SKUNative RevOps SKU properties
opportunity.*DealImported Salesforce Opportunity fields
opportunityLineItem.periods.[<n>].*SKU + billing periodImported OpportunityLineItem fields for a specific period

Native SKU properties keep using current.sku.*, so existing templates are unaffected by this addition.

There is no fixed list of properties under opportunity.* or opportunityLineItem.* — what is available is whichever Salesforce fields you mapped, addressed by their Salesforce API name.

{{current.sku.title}}
{{opportunity.AccountId}}
{{opportunityLineItem.periods.[0].UnitPrice__c}}
{{opportunityLineItem.periods.[1].PricebookEntry.Name}}

Billing periods

A Salesforce Opportunity can carry more than one OpportunityLineItem for the same product — for ramped pricing, or for a price change partway through a term. RevOps turns those into numbered billing periods on the SKU:

  1. OpportunityLineItems are matched to RevOps SKUs by Product2Id.
  2. Line items sharing a Product2Id are grouped together and sorted by StartDate__c, ascending.
  3. Each is assigned a period index starting at 0, so period 0 is always the earliest start date.

A SKU with only one OpportunityLineItem still gets period 0, so the numbering is consistent across every SKU.

enterprise-sku
└── periods
├── 0 (ServiceDate: 2026-01-01) UnitPrice__c: 1000
├── 1 (ServiceDate: 2026-02-01) UnitPrice__c: 1200
└── 2 (ServiceDate: 2026-03-01) UnitPrice__c: 1500

Reference a specific period by its index:

{{opportunityLineItem.periods.[0].UnitPrice__c}} // 1000
{{opportunityLineItem.periods.[2].UnitPrice__c}} // 1500

Example

Using the enterprise-sku above, in a line item description:

Product: {{current.sku.title}}
Quantity: {{current.sku.quantity}}
Starting price: {{opportunityLineItem.periods.[0].UnitPrice__c}}
Final price: {{opportunityLineItem.periods.[2].UnitPrice__c}}

Renders as:

Product: Enterprise
Quantity: 10
Starting price: 1000
Final price: 1500

Missing values

A variable renders as empty when the field was not mapped on the Variables tab, or when the OpportunityLineItem holds no value for it.

For example:

{{opportunityLineItem.periods.[1].UnitPrice__c}}

renders nothing if UnitPrice__c was not imported for the current SKU.