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.

Create Twin Fields on the Order Product

Pass Information Down the Line

AW Computing spent the time to create configuration and global attributes so the company could give its customers customized smartwatches. But that only happens if Order Fulfillment can deliver on the promises outlined on the quote. To do that, they must know what size watch to deliver, what color and material the band should be made of.

Although the information lives on the quote line, Order Fulfillment (and by extension, automated systems) may not have access to the quote line data. For that reason, you need to make sure the relevant data gets transferred to the Order Product records that are created when an order is generated. And the way to do that is through twin fields.

So, get ready for another round of creating fields, this time on the Order Product object. 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 Order Product.
  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.
  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.
  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.
  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.
  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.
  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.

Good job, each piece of attribute data from the quote line fields has a place to go on the Order Product. And like before, CPQ will do the work of moving the data as long as the API names and data types are the same. If you’d like to learn more about twin fields, and how CPQ can use them to move data from other objects, check out the Salesforce Help document named Mapping Custom Fields Between Objects.

Finally, a word about picklists. We created Global Picklist Values for Outlet Standard, so you didn’t have to type a bunch of values each time you created a new field for Outlet Standard. You may want to create your own Global Picklist Values for any picklist that you plan to use for an attribute. Not only will this save time (less typing) but it can prevent errors by keeping the values consistent across objects. For example, if you need a new color of watch band, you have to update three picklists: the one on the product option object, the quote line object, and the order product object.

If you forget to update the “downstream” picklists, like the one on the quote line object, your users can encounter errors. That’s because picklists have a setting “Restrict picklist to the values defined in the value set” that defaults to true. So when CPQ tries to save the new color into the downstream picklist, it’s blocked. If you use Global Picklist Values instead, you know every picklist on every object is in sync, and you don’t have to worry about blocked values.

If you can’t use Global Picklist Values for some reason, consider removing the restriction as you create your downstream picklist. Just uncheck that setting after entering your picklist values.

New field creation dialogue with restriction setting highlighted

Put on Your Sales Rep Hat

The final thing to do is test to make sure everything works as expected. To verify that it does, you add the smartwatch to a preexisting quote, then make an order out of the quote.

  1. From the navigation bar, click Quotes, then choose the All list view.
  2. Click Q-00046.
  3. Click Edit Lines.
  4. Click Add Products.
  5. Check Smartwatch.
  6. Click Select.
  7. Verify that Size, Accent, and Outlet Standard attributes have values.
  8. Verify that Material, Color, and Accent attributes for the included smartwatch band have values.
  9. Click Save, then click Save again.
    Great, we have a quote with quote lines for a smartwatch and related products. Time to generate an order.
  10. Click Edit.
  11. Check Ordered.
  12. Click Save.
    CPQ is taking a moment to create an Order record, along with Order Product records based on the quote lines. At the same time, it’s copying the attribute values into the Order Product twin fields.
  13. Click the Related tab.
  14. From the Orders related list, click the number of the order.
    If you don’t see an order yet, click the refresh button of your browser. Keep refreshing until the order appears.
  15. From the Order Products related list, click Smartwatch.
    Here you should see fields for Size, Accent, Outlet Standard, all with the values you selected in step 7.
  16. Click the Back button in your browser.
  17. From the Order Product related list, click Smartwatch Band.
    On this order product the fields of Size, Accent, Material, and Color should all have values. Outlet Standard will have a value too, but you can ignore that, it’s really only relevant to the AC Adaptor Order Product.

Excellent work, you’ve made it possible for AW Computing to fulfill orders that include potentially hundreds of different watch customizations. Furthermore, you did so with only a few products, avoiding SKU proliferation like a pro!

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

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

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