Skip to main content

Create Twin Fields on the Quote Line

Make a Home for Attribute Data

As we discussed in an earlier step, the Product Configuration page is not a record, and attributes are not fields. Attributes are manifestations of fields. So if the sales rep chooses 40mm for the Smartwatch size, where does that data get saved to when the rep clicks Save?

As it stands, there is no place for the Size attribute data to get saved to. But there is a simple solution to this. You must create a field on the Quote Line object to act as a receiving container for the attribute data. For example, let’s create a field on the Quote Line object named Size, and make it a picklist. Then give it the same picklist values as the field you originally made on the Product Option object.

Now you’re probably wondering: How does the data get from the attribute in Product Configuration into the field on the quote line? The answer: CPQ takes care of that for you automatically, as long as the API names and data types of the two fields match exactly. We call these two fields twin fields since they should be identical to each other.

Let’s create the six necessary twin fields on the Quote Line object. You start by navigating to the Object Manager.

  1. If you’re not still on the setup page, click Setup gear icon and click Setup. The Setup page opens in a new tab.
  2. Click Object Manager.
  3. Click Quote Line.
  4. Click Fields & Relationships.
  5. Click New.
  6. Click Picklist.
  7. Click Next.
  8. For Field Label, enter Size.
  9. Click the radio button to Enter values, then enter each of these values on a separate line:
    40mm
    44mm
  10. Click Next.
  11. Click Next to keep field-level security as is.
  12. Click Save & New.
    Now to create the Accent twin field.
  13. Click Picklist.
  14. Click Next.
  15. For Field Label, enter Accent.
  16. Click the radio button to Enter values, then enter each of these values on a separate line:
    Light Gray
    Dark Gray
    Gold
  17. Click Next.
  18. Click Next to keep field-level security as is.
  19. Click Save & New.
    And now the Engraving twin field.
  20. Click Text.
  21. Click Next.
  22. For Field Label, enter Engraving.
  23. For Length, enter 100.
  24. Click Next.
  25. Click Next to keep field-level security as is.
  26. Click Save & New.
    Good, now a twin field for Outlet Standard.
  27. Click Picklist.
  28. Click Next.
  29. For Field Label, enter Outlet Standard.
  30. For Values, choose Outlet Standard.
  31. Click Next.
  32. Click Next to keep field-level security as is.
  33. Click Save & New.
    Almost there, now for the Material twin field.
  34. Click Picklist.
  35. Click Next.
  36. For Field Label, enter Material.
  37. Click the radio button to Enter values, then enter each of these values on a separate line:
    Silicone
    Canvas
    Stainless Steel
    Leather
  38. Click Next.
  39. Click Next to keep field-level security as is.
  40. Click Save & New.
    And finally, create the twin field for Color.
  41. Click Picklist.
  42. Click Next.
  43. For Field Label, enter Color.
  44. Click the radio button to Enter values, then enter each of these values on a separate line:
    Light Gray
    Dark Gray
    Gold
    Black
    White
    Brown
    Red
    Blue
    Green
    Purple
    Pink
    Yellow
  45. Click Next.
  46. Click Next to keep field-level security as is.
  47. Click Save.
    Close the Setup tab to get back to the Salesforce CPQ tab.

Now when you save the Smartwatch configuration, all of your attribute values are saved too.

Technically, the values for configuration attributes are saved onto the quote line record of the lead product, and values for global attributes are saved onto the quote line records of their respective products. Here’s an example of what an export of our quote line data would look like.

Quote Line Record Size__c Accent__c Engraving__c Outlet_Standard__c Material__c Color__c
QL-00001
SMARTWATCH
44mm Dark Gray Philip Cleverham Type A (North America)

QL-00002
SMARTWATCHBAND

Light Gray

Silicone Purple
QL-00003
SMARTWATCHBAND

Dark Gray

Leather Black
QL-00004
ACTOUSBADAPTER






QL-00005
USBCMAGWATCHCHARGER






QL-00006
USBCWIRELESSCHARGINGPAD







Notice that the Size data isn’t stored in either of the watch band quote lines. That’s a problem because watch bands come in two sizes. The Order Fulfillment team needs to know that information so it delivers the correctly sized spare watch band. In the same way, the Outlet Standard data isn’t attached to the ACTOUSBADAPTER quote line, which will also present a problem for Order Fulfillment.

Fixing this missing data is easy. You just need to tell CPQ to save attribute values to option quote lines. You do this by setting Apply to Product Options to true, found on the configuration attribute record.

  1. From the navigation bar, click Products.
  2. Click Smartwatch.
  3. Click the Related tab.
  4. From the Configuration Attributes related list, click Size.
  5. Click Edit.
  6. Check Apply to Product Options.
  7. Click Save.
    Now every quote line record that’s part of the bundle contains the 44mm value in the Size field. Now do the same for Outlet Standard.
  8. Click Smartwatch in the Product field.
  9. Click the Related tab.
  10. From the Configuration Attributes related list, click Outlet Standard.
  11. Click Edit.
  12. Check Apply to Product Options.
  13. Click Save.
    The value for Outlet Standard is now included in the ACTOUSBADAPTER quote line (along with all other quote lines in the bundle).

Well done setting up your twin fields on the quote line, and setting your configuration attributes to apply their values to the quote lines of bundled options. In the next and final step, you make sure the configuration data flows to the Order Products too.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities