Loading

Salesforce CPQ Advanced Calculator: Supported Formulas, Functions, and Lookup Relationship Rules

Udgivelsesdato: Aug 14, 2026
Beskrivelse

When configuring Formula Fields or Price Rule formulas in Salesforce CPQ, the Advanced Calculator evaluates those formulas during the Quote calculation sequence. Not all standard Salesforce formula functions are compatible with the CPQ calculation engine. Additionally, formulas that reference standard fields on standard objects, or that traverse lookup relationships originating outside the Quote, Quote Line, or Quote Line Group objects, can cause calculations to fail silently or produce the error:

**Error:** `Cannot read property 'split' of null`

This error typically appears when:

- A formula references an unsupported function or global variable.

- A formula field references a standard field on a standard object in a way the CPQ engine cannot resolve.

- A formula traverses a lookup relationship that does not originate on the Quote, Quote Line, or Quote Line Group objects.

These restrictions apply to any field on the Quote, Quote Line, or Quote Line Group that meets at least one of the following conditions:

- The field is displayed in the Line Editor.

- The field is referenced by a Quote Calculator Plugin (QCP).

- A Price Condition references the field in its Tested Formula, Filter Formula, or uses it as a Tested Field.

- The field is used as the Tested Field of a Lookup Query.

- A Price Action uses the field as its Source Field or references it in its Source Formula.

- The field is used as the custom quantity field for a Block Price or Discount Schedule.

- The field is used as the constraint field of a Discount Schedule.

- A Summary Variable uses the field as its Aggregate Field, Filter Field, or Constraint Field.

- The field is referenced by another field that satisfies one or more of the conditions above.

Løsning

Non-supported formulas and functions

The following functions and variables are not supported. Formula fields that reference them are not evaluated and Price Rules formulas that reference them cause calculations to fail.

  1. DISTANCE()
  2. GEOLOCATION()
  3. GETSESSIONID()
  4. ADDMONTH()
  5. Global variables, i.e. any variable beginning with $
  6. ISCHANGED


Reference standard fields on standard objects (available as of CPQ v214 Summer '18)

Be careful when referencing standard fields on standard objects, particularly non-Text types, in custom formula fields used in the CPQ calculcation sequence. Formulas referencing standard fields can cause formulas to fail during calculation. To resolve the issue, create a formula field on the object in question that references the standard field, and reference that field in your formula instead. For example, if a reference to Account.Industry is causing a calculation to fail, create a formula on Account that contains the value of Account.Industry and reference in the custom formula field. The following standard fields (among others) are universal to all Salesforce objects, and are therefore safe to use in any formula by way of the previously mentioned approach. 

1. CreatedDate
2. LastModifiedDate
3. Name
4. OwnerId
5. CreatedById
6. CurrencyIsoCode


Reference lookup objects

Formulas should not directly reference lookup relationships that do not originate on either the Quote, Quote Line, or Quote Line Group objects. This is best illustrated with a series of examples.

 

1. The following Quote Line formulas are ACCEPTABLE:
1. IF(SBQQ__Existing__c, SBQQ__PriorQuantity__c * SBQQ__ListPrice__c, SBQQ__Quantity__c * SBQQ__ListPrice__c). This formula does not reference any lookup relationships at all.
2. IF(SBQQ__Quote__r.SBQQ__StartDate__c < TODAY(), 'PAST', 'FUTURE'). This formula references the Quote object.
3. Product__r.Name & ' ' & Product__r.ProductCode. This formula references the Product__r relationship, which originates on the Quote Line object.
4. SBQQ__Quote__r.Account__r.Name. The Account__r relationship originates on the Quote object, and is therefore acceptable.
2. The following Quote Line formulas are NOT ACCEPTABLE:
1. IF(Product__r.SBQQ__DiscountSchedule__c.IsCrossOrders__c, 'Hooray', 'Boo'). The DiscountSchedule__r relationship originates on the Product object. To resolve this issue, create a formula field on the Product object that references DiscountSchedule__r.IsCrossOrders__c, and reference that field instead. For example, IF(Product__r.IsDiscountCrossOrders__c, 'Hooray', 'Boo').
2. SBQQ__Quote__r.Opportunity2__r.Contract__r.Description. The Contract__r relationship originates on the Opportunity object. To resolve this issue, create a formula field on the Opportunity object that references Contract__r.Description and reference that field instead. For example, SBQQ___Quote__r.Opportunity2__r.ContractDescription__c.


NOTE: The 3 previously mentioned restrictions apply to all fields that satisfy both of the following criteria:

1. The field exists on the Quote, Quote Line, or Quote Line Group object.
2. ONE OR MORE of the following are true:
  • The field is displayed in the Line Editor.
  • The field is referenced by a Quote Calculator Plugin.
  • A Price Condition references the field in its Tested Formula or Filter Formula, or uses it as a Tested Field.
  • The field is used as the Tested Field of a Lookup Query.
  • A Price Action uses the field as its Source Field, or references it in its Source Formula.
  • The field is used as the custom quantity field for a Block Price or Discount Schedule.
  • The field is used as the constraint field of a Discount Schedule.
  • A Summary Variable uses the field as its Aggregate Field, Filter Field, or Constraint Field.
  • The field is referenced by another field that satisfies one or more of the above criteria within this bulleted list.
Vidensartikelnummer

000383094

 
Indlæser
Salesforce Help | Article