Loading
Manage Your Quotes with CPQ
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Approval Variables

          Approval Variables

          Approval variables aggregate data from child records for evaluation in an approval condition. Advanced Approvals evaluates them in real time along with the approval condition. They provide an easier way to aggregate data in approval conditions when compared to roll-up summary fields or Apex Triggers that aggregate data and send it to a field on the object evaluated for approval. For example, your approval variable can summarize the total number of opportunity products that contain “Premium” in their name across your opportunity. (Salesforce CPQ Managed Package)

          Required Editions

          Important
          Important Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
          Available in: Salesforce CPQ Summer ’16 and later with Advanced Approvals 3.1 and later

          Let’s look at some important approval variable fields.

          Aggregate Field
          Your approval variable performs the aggregate function’s action on this field. For example, if you want to find the average partner discount across all your quote lines, your example looks up to your quote line’s Partner Discount field.
          Aggregate Function
          Pick the math function to perform on your aggregate field.
          Combine With
          Provide another approval variable to combine with this approval variable. Advanced Approvals returns the result of that combination as the output of this approval variable. For example, you want your variable to combine the total number of quote lines containing “Tablet” with another approval variable that counts the number of quote lines containing “Laptop.” If you have 20 tablet quote lines and 10 laptop quote lines, your first approval variable returns a value of 30. Your second approval variable returns a value of 10.
          Filter Field
          Pick a field if you want to filter your target object based on a certain value. For example, you can evaluate only quote lines with a Product Family field set to Hardware.
          Filter Value
          Pick a value if you’re filtering your target object.
          Operator
          Choose the operator to use with your filter.
          Target Object
          Specifies the child object that this variable aggregates. The child object must have a lookup or master-detail relationship with the object that a user is submitting for approval.
          Note
          Note When no target objects match the filter criteria, the approval variable returns 0 for the minimum and maximum values. The approval rule uses that value when evaluating the approval condition.
          Type
          Summary approval variables evaluate several fields, while discount approval variables evaluate a list price and a net price. If you’re using a summary approval variable, provide values for the Filter Field and Filter Value fields. If you’re using a discount approval variable, provide values for the List Variable and Net Variable fields.
          Example
          Example This approval variable returns the highest quantity value among opportunity product lines that contain “W012671” in their product code field.
          • Target Object: Opportunity Product
          • Aggregate Field: Quantity
          • Aggregate Function: Max
          • Filter Field: ProductCode
          • Filter Value: W012671
          • Operator: Equals
          • Type: Summary
          • Create Approval Variables
            Create an approval variable and reference it as one of your approval rule’s approval conditions. (Salesforce CPQ Managed Package)
          • Approval Variable Fields
            When you use Advanced Approvals, you can create or modify approval variables to reference data within an approval condition. Some fields aren’t visible or editable depending on the page layout and field-level security settings. (Salesforce CPQ Managed Package)
           
          Loading
          Salesforce Help | Article