In a previous walk through post Setting up Revenue Cloud – Product Attribute Pricing we showed how to define a product attribute which represents the Frame Size characteristic of the Digital Frame product and demonstrated how this value can then be used to adjust the product pricing on the quote line item.

The values of the product attributes selected for a quote line item are stored within the quote line item data model as a related list record – Quote Line Item Attributes as shown below.

There may be occasions when it is useful to capture the quote line item attribute value as a separate field on the quote line item itself. For example if the value is a number it can then be used within a rollup mechanism to drive further logic and business rules.

One way to determine the value of a quote line item attribute is to use an Apex pre-hook which runs alongside the pricing procedure. This method will be detailed in a later post. A simpler method however can be performed directly within the pricing procedure using the elements shown below.

Within a list container we can setup a list operation which filters the Attribute tag for the attribute we are interested in ie Frame_Size, followed by an assignment variable mapping the attribute value to the required output variable.

In our case we create a Context attribute called FrameSize__c with an associated tag and map this attribute value to a field on the Quote Line Item record called Frame Size within the context QuoteEntitiesMapping.

Within the Pricing Procedure we then assign our AttributeValue to the FrameSize__c tag when Attribute is equal to Frame_Size. This then will be mapped to the Frame Size field on the quote line item.

When an attribute selection is made on our quote line which matches our List Operation filter we can then populate the Quote Line Item field with the attribute value.

This is a significantly simpler mechanism than introducing code within an Apex pre-hook. One limitation currently observed with this approach is that a corresponding field mapping has to also take place in the context OrderEntitiesMapping to a similar custom field on the Order Line Item record.