Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Limit Color Choices Based on Material

Use Core Salesforce Functionality

AW Computing is very happy that its sales reps can choose various materials and colors for the smartwatch band. However, the company only offers stainless steel in light gray, dark gray, and gold. And they only offer leather in black, white, and brown. You must prevent sales reps from choosing combinations that AW Computing doesn’t offer.

One way to limit the choices in a picklist field is to create a dependency between it and another field. This is a core Salesforce admin task that you can apply to CPQ. Let’s create a dependency between the Material and Color fields. You start by navigating to the Object Manager.

  1. Click Setup gear icon and click Setup. The Setup page opens in a new tab.
  2. Click Object Manager.
  3. Click Product Option.
  4. Click Fields & Relationships.
  5. Click Field Dependencies.
  6. Click New.
  7. For Controlling Field, choose Material.
  8. For Dependent Field, choose Color.
    The values of Color will depend on the choice of Material.
  9. Click Continue.
  10. In the Silicone column, double-click all colors except Gold.
  11. In the Canvas column, double-click all colors except Gold.
  12. In the Stainless Steel column, double-click Light Gray, Dark Gray, and Gold.
  13. In the Leather column, double-click Black, White, and Brown.
    Great, your field dependencies should look like this.
    Edit Field Dependency page for Material and Color
  14. Click Save.
    Close the Setup tab to get back to the Salesforce CPQ tab.

Now when you configure the Smartwatch bundle, you’ll find that the choices for color surface based on the material that's selected. Now sales reps at AW Computing won’t promise anything they can’t deliver.

Product Configuration with global attributes showing limited Color choices

Bear in mind that since you made Color__c a dependent field, any configuration attribute based upon it is subject to the exclusions you defined in the dependency. For example, imagine you had a Smartphone Case product that also needed a Color attribute. If you create the new attribute based on Color__c, it will still be dependent on Material__c. So if you don’t create an attribute for Material, then the Color attribute will show no values. That’s just the way dependent fields work.

In the future you might need to create a Color attribute for a different option, such as a Smartphone Case. But what if the values shouldn’t be limited by the dependency you just created? In that scenario, you would just create a second color field (Color2__c) on the Product Option object, free of any dependencies. Then use that field for the new Color attribute.

Finally, dependencies only work when the two fields are on the same level. In other words, a configuration attribute set up as the controlling field cannot control a global attribute attached to a product option. In the same way, the Material of the first watch band only controls the Color of the first watch band, not the Color of the second watch band.

At this point, sales reps can gather information to properly configure a watch. In the next step, you make sure the information is saved to the quote line records.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기