Quote item custom fields

Custom fields on quote items are enabled so those are able to hold values of different types. Users are able to edit values of item custom fields in the quote.When admin adds new (or edits existing) custom field, she is able to administer item custom field:

  • Name- This field is required. Admin is not able to save 2 or more custom fields with same name
  • Label- When admin is defining new field, when she finishes typing name, label is populated with what was typed in the Name field.This field is required.
  • Type- Once you define the type of the field, it cannot be changed. Four types are available:
    • Number (selected by default). Custom fields of this type can have decimals. They can also have negative values.
    • Date Custom fields with Date type will be saved in the same way quote custom fields that are dates are saved (in default format mm/dd/yy).
    • Currency Custom fields of this type are calculated and saved in the same way as other prices in SAP CPQ (list price, cost, extended amount etc.). Values will be saved in default currency (dollar) and current market and currency factors will be applied when displaying this value.
    • Text all characters are supported.(When admin is editing existing field, this field is displayed as read-only)
  • Order of calculation- This field can accept only numbers. Default number is 10. If admin deletes everything and clicks on the field, value 10 is saved for the field.
  • Calculation Formula- This field will accept standard SAP CPQ tags.
  • Display summary in the quote- Default value is FALSE.
  • Always include in KO context - When the checkbox is selected, the field is included in the knockout context and sent to the user's browser. Consequently, you can use the hidden quote item custom field for processing in responsive templates. (Example: A quote item custom field controls whether a product’s cost used for calculating the line item’s list price is editable. The field is hidden from quotes as users do not need to see its value. However, if Always include in KO context is selected, administrators can use the field’s value when defining the responsive templates to control whether the list item’s price is editable or not.)

If a quote item custom field is not visible on the quote layout, and the Always include in KO context is selected, the field value will be visible in the hiddenValues observable array. To retrieve the field value, use getHiddenValue(“QICF_Name”). If a field does not exist, the function returns FALSE. The function does not have to contain the complete name of a quote item custom field. You can enter only a part of the name and the system will find the first field whose name starts with the defined string and it will return its value.

Example

Log into SAP CPQ as an administrator and go to Setup. You need to create a new attribute of type Auto-complete, and then select it as an underlying for your custom field. If you need instructions on how to create an Auto-complete attribute, follow this link - Autocomplete attribute
Once you have created the attribute, you want to create new Quote Item Custom Field by going to SetupQuotesQuote Item Custom Fields and clicking on Add New button.
Form for adding a new Quote Item Custom Field is displayed. (See Figure D)


Figure D – Define new custom field of type Attribute


Fill out Name field, select Attribute from the Type dropdown list and select the particular attribute (that you have previously created). Click Save.
In order to be able to see your newly created Quote Item Custom Field, you need to do three things:

  • add it to the appropriate permission group
  • move it to the list of visible custom fields
  • add it to the quote editable group


More information on how to add the custom field to the appropriate permission group is available on this link - Quote layout permissions
More information on how to move the custom field to the list of visible fields is available on this link - Visible fields.
Also, you will have to insert a translation for your custom field into SAP CPQ dictionary. You can find more information on how to achieve this by following next link - Cart item custom field localization
Now, your Quote Item Custom Field is set up. To see how it works, go to catalog and create a new quote. Your custom field is displayed in the quote as a column and you are able to select a value for it. (See Figure E)

Figure E – Selecting value for the Quote Item Custom Field


Once you define the type of the field, it cannot be modified. (When admin is editing existing field, this field is displayed as read-only)

Order of calculation- This field can accept only numbers. Default number is 10. If admin deletes everything and clicks on the field, value 10 is saved for the field.

Calculation Formula- This field will accept standard SAP CPQ tags.

Display summary in the quote- Default value is FALSE.

Figure A - Quote item custom fields


For each item custom field that is defined, new editable groups will be available in the Available Fields section in Cart Fields Administration. Example – when user adds field ‘Delivery Date’, fields ‘Main Item – Delivery Date’ and ‘Child Item – Delivery Date’ will be added. When user deletes particular item custom field, all related editable fields will be removed from here.

Figure B - Editable quote item custom fields


If certain field is found among quote editable fields (found in Editable Field group), it will be displayed as every other editable field. When developing this template in xslt, we should make an effort to make it as easier as possible for the admin to show item custom fields in the quote. When user clicks to edit currency item field, it will be displayed as every other price field on the quote. When user edits number field, it will be displayed in the same way other numbers (e.g. Quantity) are displayed on the quote. After user changes value for particular field, SAP CPQ will display icon indication that currently displayed value is different from default value (default value is calculated every time other quote item custom fields are calculated). This icon will be displayed only if default value is not empty (if it is empty and user entered something in the field, no icon will be displayed).

Figure C - Quote with quote item editable fields


Quote item custom fields are created and evaluated once quote items have been created, so they should not be used in any item calculation, including item discount, multiplier, etc. Additionally, they should not be used in any item information, including information regarding the product or attribute, such as description, part number, price, cost, among others. That said, it is possible to use quote item custom fields in item calculations or item information – but this can be carried out only with a Reconfigure action which can negatively affect system performance. For this reason, it is not recommended.

SAP CPQ will execute calculation only if any of the data used by the quote has been changed. For example, if the entered value of a particular custom field was 100, and has remained 100 following any changes, the calculation will not be executed.

New CTX tags are developed:

  • CurrentItem:
    • <*CTX(Quote.CurrentItem.CustomField(“CustomFieldName”) )*>
  • Total:
    • <*CTX(Quote.Total.ItemCustomField(“CustomFieldName”).Summary )*>
    • <*CTX(Quote.Total.ItemCustomField(“CustomFieldName”).Maximum )*>
    • <*CTX(Quote.Total.ItemCustomField(“CustomFieldName”).Minimum )*>
    • <*CTX(Quote.Total.ItemCustomField(“CustomFieldName”).Count )*>
  • Rolled-Up Items:
    • <*CTX(Quote.CurrentItem.RolledUpItemCustomField(“CustomFieldName”).Summary )*
    • <*CTX(Quote.CurrentItem.RolledUpItemCustomField(“CustomFieldName”).Minimum )*>
    • <*CTX(Quote.CurrentItem.RolledUpItemCustomField(“CustomFieldName”).Maximum )*>
    • <*CTX(Quote.CurrentItem.RolledUpItemCustomField(“CustomFieldName”).Count )*>
You are here: CallidusCloud SAP CPQ Online HelpAdmin Page HelpQuotes AdministrationQuote item custom fields