Handling Quantities

Problem

There are a few different ways that you can handle the quantity for an attribute and its values. Quantity can be entered by a user for an attribute at the attribute level or at the attribute value level. This is determined by what the attribute is set as at in the Attribute administration section. The goal is to demonstrate the few ways to handle quantities for main and line items.

Solution

How to handle quantity for Main item/Product

Use Case 1: ItemQuantity for Main Item Quantity

A special attribute added to a products configuration named ItemQuantity can be used to control the quantity of the main item in the cart. The system looks specifically for the attribute named ItemQuantity. This will not only control the main item, but if any pricing schemes are attached to it, then prices in the cart will be affected also. There are a few different ways that you can use the ItemQuantity attribute as highlighted below.

  1. You can expose the attribute to the user so that they can pick their quantity, which will then be reflected in the cart. In this situation you would likely not allow the users to edit the quantity of the main item in the cart. Quantity for the product would be handled within the configuration.
  2. Calculate ItemQuantity as a hidden attribute, which then is reflected in the cart. ItemQuantity in this situation would be based on selections made from the user.
  3. Calculate pricing base on ItemQuantity, then allow users to edit the quantity in the cart. This situation is ideal for products which offer discounts when higher quantities are purchased. For example, a product may cost $5 when buying 1, $9 when buying two, or $13 when buying three. If a user adds the product to the cart with a quantity of 1, the price will be $5. If when in the cart they change the quantity to 2, then the system passes that new quantity back into the configuration through the ItemQuantity attribute. Because pricing is based off this attribute, the price of the product will change accordingly.

Use Case 1.1 - Number of Users

Let’s assume, to determine the main item quantity for a license renewal based on number of users. Create an attribute named ItemQuantity. If you want users to enter desired quantities, then set the display type as free input, no matching. In this example, the user picks quantity from pre-defined values in a dropdown and the total price will be the number of users multiplied by the sum of all item options.

Total Price = (Number of Users * price of selected options)

How to handle Quantity for line items

List As Line Item – If checked, Attributes (options) marked as line items will be listed as separate items in the shopping cart and in the quote. If checked, the Attribute will show up in the Quote/Cart separate from the Product being configured or base product. If the attribute is set for multiple selections, such as a check box or multi-select listbox, then each selected attribute will be displayed as a separate line item in the cart/quote.

Inherit Quantity from Parent - Determines if the quantity of this attribute changes when the quantity of the main product changes. Make sure this is checked for line items that inherits quantity from the main item.

Product Attribute definition page

Quantity propagation works properly for the maximum second level propagation. What this means is that, if your attribute has been listed as line item, Inherit Quantity from Parent option has been checked off, and product reference is used, it would result in the correct quantity and price in parent product responder (that is, product in which that line item attribute is located).

But, if that product is a child product itself, the child’s parent product will not end up having the correct quantity and prices for the line item attribute in the referenced product in responder; that is, it would always display the default product quantity and price.

Quantity for line items can be handled by using:

1. Attribute Quantity: See Attribute Quantity for more information.

2. Update quantity in rule using <*SETATVQTY()*> tag

This applies only to Multiple selection attributes (checkbox and list box multi-select), quantities can be set up using <*SETATVQTY(attribute name : attribute display value, quantity )*>, this sets a specified quantity to the specified attribute value. Navigate through CPQ Setup→Product Catalog→Products»Rules to define rules that determines quantity for line items (options). Use tag <*DONOTRESETATT*><*SETATVQTY(attribute name : attribute display value, quantity )*><*DORESETATT*>. This Sets a specified quantity to the specified attribute value. For example, <*DONOTRESETATT*><*SETATVQTY(Color:Blue,5)*><*DORESETATT*> - sets the quantity of the attribute value Blue from the attribute Color to 5.

3. Expression/Formula

User can enter quantity field – It determines whether the user is allowed to enter a quantity for this product. This applies only to attributes displayed as free input. Enter a 1 in the condition field to unconditionally allow the user the ability to enter quantity, or enter an expression to only under certain conditions.

You are here: CallidusCloud SAP CPQ Online HelpBest PracticesProduct AdministrationHandling Quantities