0

The reason why Twin Fields is not the best solution, in this case, is that we are working in an Org that has more than 500 products, and almost every product has its own set of different attributes. After creating Twin Fields in “Order Product” and “Quote Lines” we realized that every time a new attribute needs to be set, a new field in the Product Option, the Quote Line, and the Order Product objects should be created, which is not efficient and scalable in the future due to the number of products and the Salesforce limitation of fields per object. (Since there are more than 500 products and every product could have more than 2 attributes applied only to it, it would be needed to create more than 1,000 fields per object)

Is there a way to populate the selected attributes of a configured product in the Order Product and the Quote Line without using Twin Fields? – Salesforce CPQ Package

1
  • I would recommend to look at the Logik.io product. It does not require this "twin field" method to be used within Salesforce CPQ.
    – almc
    Feb 1 at 2:30

1 Answer 1

0

Yes, there is an alternative to using Twin Fields to populate the selected attributes of a configured product in the Order Product and the Quote Line. One solution could be to store the selected attributes as a text string in a custom field on the Quote Line or Order Product. This way, you can store all the attributes in one field without having to create a separate field for each attribute.

You can use the product configuration data to dynamically build the text string with the selected attributes, and then store the string in the custom field. When you need to access the attributes, you can parse the text string to retrieve the information.

Another option could be to store the selected attributes as a JSON string in a custom field on the Quote Line or Order Product, and then use Salesforce Apex or a third-party library to parse the JSON and retrieve the attribute values. This approach offers more flexibility, as it allows you to store the attributes as key-value pairs, making it easier to retrieve the information when needed.

In either case, you will need to write custom code to handle the creation of the text string or JSON string and the parsing of the information when it's needed.

1
  • Thank you for your suggestions, I'm trying the second option, I have another question - how can I read the selected attributes, I made a query to the Product Option but they are not showing there Feb 9, 2023 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .