Lookup Queries on Product Rules

by Community Manager ‎03-03-2017 03:27 PM - edited ‎05-15-2017 11:06 AM

 OVERVIEW

Use lookup tables on your Product Rules to quickly query data and then perform actions in the quote line editor or configurator.

 

KEY CONCEPTS

 

DETAILS

Note: Product Rule Lookup Tables are only available in Salesforce CPQ 28.0 and higher.

 

New lookup fields on the Product Rule object pull values from an existing Lookup Data object. This way, you can use Lookup Queries on the Product Rule record in place of Error Conditions and Actions.

 

We’ve added several new lookup fields to the Product Rules object. Lookup Object refers to the custom object that stores the data you query - you’ll need to populate it with the default value of SBQQ__LookupData__c or a custom object of your choosing.

 

After populating the Lookup Object, you’ll need to fill out the other lookup fields. Each of these is a Product Rule field that looks up to a Lookup Object field.

 

Lookup Query Fields

  • Lookup Type Field: Equivalent to the Product Action's Type field. Must be picklist or text.
  • Lookup Product Field: Equivalent to the Product Action's Product field. Must be picklist or text.
  • Lookup Required Field: Equivalent to the Product Action's Required field. Must be picklist or text.
  • Lookup Message Field: Equivalent to the Product Rule's Message field. Must be text.

Product Rule types require different combinations of Lookup Object fields - you can set these to out-of-the-box values or custom values.

 

Selection

Validation

Alert

Lookup Type Field

SBQQ__Type__c / custom value

   

Lookup Product Field

SBQQ__Product__c / custom value

   

Lookup Required Field

SBQQ__Required__c / custom value

   

Lookup Message Field

 

SBQQ__Message__c / custom value

SBQQ__Message__c / custom value

 

The Lookup Queries (Product Rules) related list associates your Product Rule to a Lookup Query. New Lookup Queries on your Product Rule automatically lookup to the parent Product Rule record.

 

We've also replaced the original Price Rule (SBQQ__PriceRule__c) required lookup field on Lookup Queries with Price Rule (SBQQ__PriceRule2__c). The latter Price Rule lookup is not required, allowing you to configure your Lookup Query page layout to display a Product Rule lookup field or Price Rule lookup field as needed.

 

Setup

Upgrading admins should modify their page layouts:

 

Product Rule

  • Add the Lookup Query Fields section, then add the following fields:
    • Lookup Object
    • Lookup Type Field
    • Lookup Required Field
    • Lookup Message Field
  • Add the Lookup Queries (Product Rule) related list.

Lookup Query

  • Add the value "Configuration Attribute Value" to the Match Type field
  • Add the Product Rule field to your page layout.
  • Remove the Price Rule (SBQQ__PriceRule__c) field. This field is no longer mandatory for Lookup Queries as of 28.0.
  • Add the Price Rule (SBQQ__PriceRule2___c) field to your page layout.

USE CASE

Selection Rules

Let’s say you had the following software bundle:

 

Widget Bundle

Options:

  • Bronze Widget [Option 1]
  • Silver Widget [Option 2]
  • Gold Widget [Option 3]

Configuration Attributes

  • Support Level

You can configure a Product Rule & Lookup Table setup that will hide and show your widget options in the configurator based on whether you select Bronze, Silver or Gold in the Support Level configuration attribute menu.

 

First, create your Lookup Table as follows:  

lookup pr5.png

When you associate this table to a Product Rule, each row acts like a combination of error conditions and actions when you’re in the configurator - Category is your filter, Type is your Action, and Product refers to each option of your Widget bundle.

 

Next, create a standard Selection Rule:

lookup PR1.png

 

Make sure you also add a Configuration Rule that looks to your Widget Bundle. However, instead of Error Conditions and Actions, you’ll create Lookup Queries on the Product Rule.

 

Since this is a Selection Rule, you’ll need to fill out the Lookup Type, Lookup Product and Lookup Required fields:

lookup pr2.png

 

Add a new Lookup Query to your Product Rule as well:

lookup pr3.png


Create a quote with your Widget Bundle and enter the configurator. When you change the support level, your Product Rule will reference the relevant row on your Lookup Table and change your options accordingly - for example, selecting Bronze will add your Bronze Widget while removing the Silver Widget and Gold Widget.

lookup pr4.png

Comments
by MridulaC
on ‎03-21-2017 06:50 PM

I was trying to set this up but couldn't proceed too far. Some of the errors I encountered on the Lookup Query object:

 

1. Match type doesn't have a picklist value of 'Configuration Attribute value'. I added this manually in my org, but would imagine this should get auto-added when customers upgrade to version 28.

2. Price rule is a mandatory field for Lookup Query; this can't be edited on the page layout; I can't remove the field from the layout either. No use having to specify a price rule as well as a product rule. I am planning to go ahead with this by populating a dummy price rule for now

by eaarts
‎03-27-2017 07:52 AM - edited ‎03-27-2017 09:19 AM

 Hi,

 

Did somebody manage to use the selection rule with more than one configuration attributes?

by Community Manager
‎03-27-2017 11:01 AM - edited ‎03-27-2017 11:26 AM

@MridulaC Users will have to manually add Configuration Attribute Value to the Match Type field after upgrading to 28.0. I've updated the 28.0 feature setup notes & Setup section on this article to reflect this. However, Price Rules are no longer mandatory on Lookup Queries as of 28.0, and can be added or removed (same with Product Rules) from the page layout as needed. 

by MridulaC
on ‎03-29-2017 12:21 PM

Thanks, @lvoelz2. I noticed that there is another Price Rule field (SBQQ__PriceRule__c) on the Lookup Query object. This is a master-detail field and hence is required; however the field is deletable. Should this field be deleted as part of the manual steps an admin should perform post V28 upgrade?

by Community Manager
on ‎03-29-2017 12:30 PM

@MridulaC Correct - You'll need to remove SBQQ__PriceRule__c and replace it with SBQQ__PriceRule2__c. I've updated the documentation and release notes accordingly.

by purumahay
on ‎04-18-2017 01:55 PM

Need information for one of the use case.

 

I am calculating values on Quote screen (term (12) * Amount (10,000)) and storing the value as text in differnt field on Quote Screen (1,20,000).

 

Now i wanted to pick this price and store the value in 'SBQQ__ListAmount__c' on quote lines

by Neha_Gupta
on ‎05-15-2017 04:29 AM

Look up query does not have any look up to product rule.Is this a custom field that we need to create?

by Community Manager
on ‎05-15-2017 11:02 AM

@Neha_Gupta No, you don't need to create the field. You need to be on version 28.0 or higher.

by nthoryk
on ‎07-17-2017 07:33 PM

I've been testing a multi-attribute lookup query product rule on a product that's an option of another product and it only fires when I add the product outside the bundle. What would I have to do to make it fire inside the bundle?

by dhoechst
on ‎08-01-2017 09:41 AM

@lvoelz2 Is there a version between 27 and 208? The manual steps for Summer 17 (208) don't  mention the need to delete SBQQ__PriceRule__c. 

by Community Manager
on ‎08-04-2017 12:05 AM

@dhoechst Yes - Version 28 / Spring '17 came between those two. This feature is included in the Spring 17 Release Notes and Spring 17 Feature Setup.

 

Starting with 28.1, we've changed version titles so that our package versions mirror CRM's. This means that CPQ 28.1 became CPQ 208, and CPQ 30 will become 210.  This only affects the package title. 

by dhoechst
on ‎08-09-2017 09:48 AM

@lvoelz2 I think the confusing thing is that the install links don't even list the Spring 17 release: https://steelbrick2.force.com/apex/installPremium

Contributors