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.
| Namespace | Scope | Contains |
|---|---|---|
deal.* | Deal | Native RevOps deal properties |
current.sku.* | SKU | Native RevOps SKU properties |
opportunity.* | Deal | Imported Salesforce Opportunity fields |
opportunityLineItem.periods.[<n>].* | SKU + billing period | Imported 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:
- OpportunityLineItems are matched to RevOps SKUs by
Product2Id. - Line items sharing a
Product2Idare grouped together and sorted byStartDate__c, ascending. - Each is assigned a period index starting at
0, so period0is 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.