The Smart Cart feature allows the sales rep to manage the cart with a large number of line items. In Smart Cart flow, line items in the cart are divided into groups for pricing based on the threshold and split criteria you define. The threshold defines the number of line items in a group. The split criteria list the fields based on which the line items are grouped. You can define different threshold and criteria for different flow. You must configure the Smart Cart feature for the sales rep to use.

When you configure the product in the Smart Cart flow, you must take the following concepts into consideration.

  • The option line items along with bundle line item are included in the threshold count. For example, if the threshold is  10, then in a bundle you can only select 9 options as that occupies an entire group. So, when the groups are divided on pricing, if your bundle and option line items exceed the threshold, pricing is not calculated. However, if the bundle doesn't fit in a half-full group a new group is created for that bundle as long as the line items are within the threshold limit.
  • A bundle is not divided across multiple carts. If the options are auto-included or added by default and the split cart threshold is exceeded, the split function is not executed.
  • Line items with multiple charge lines are divided across multiple carts if required.

Follow the steps below to configure the feature.

To add QTC profile field on Quote Detail page layout

You must add the field QTC Profile to the Quote Detail page layout. This field is used by the sales rep to enable the Smart Cart flow for their quote.

To define the threshold for the Smart Cart

The threshold defines the size of the group that the line items are divided into for pricing. Only the primary line items are considered in the threshold to split the cart. The primary line items consist of the line items for standalone products, bundle products and option products.

You must define the threshold considering the pricing complexity and the number of line items your pricing engine can process. If the threshold exceeds the limit of the number of line items processed in the price engine, Smart Cart does not split the cart properly and the price is not calculated. However, if you define a low threshold when you have a relatively large number of line items, Smart Cart creates a large number of groups, and pricing is not calculated properly.

Also, the bundles are not divided across multiple carts. If the number of bundles and option line items is greater than the threshold, the split function is not executed. You can increase the threshold keeping the pricing engine in consideration or restructure the bundle.

Split Cart Threshold is the primary field that Smart Cart uses to split the line items in the cart. Even if you don't define Split Cart Criteria Fields, the line items are grouped based on just the threshold.

Perform the following steps to set the threshold.

  1. Go to Setup > Develop > Custom Settings > Config System Properties > Manage.
  2. Find System Properties and click Edit.
  3. Enter a number in the Split Cart Threshold field.
  4. Click Save.

To define the split criteria for the Smart Cart

The split criteria define the criteria based on which the line items are grouped. Defining Split Cart Criteria Fields is optional as Smart Cart can split the cart based on just the threshold. If you define the Split Cart Criteria Fields, then Smart Cart considers the criteria first then the threshold. Hence, when the line items are divided, the groups are created based on the criteria first and then the number of line items in a group is controlled by Smart Cart.

Perform the following steps to set the criteria.

  1. Go to Setup > Develop > Custom Settings > Config System Properties > Manage.
  2. Find System Properties and click Edit.
  3. in the Split Cart Criteria Fields field, enter the API names of the fields from the Line Item object, separated by commas. Only the fields with the following data types are supported as criteria:
    • Text
    • Picklist
    • Number
    • Formula fields evaluating to Text output
    • Relationship fields.

      Other data types such as Boolean, Text Area, and Rollups are not supported.

  4. Click Save.

If the fields you entered in Split Cart Criteria Fields are uncommon fields that are not used in any prominent custom settings or display columns, execute Refresh Field Metadata from Maintenance Console to update the data cache.

To define line item processing batch size

Smart Cart uses Split Cart Threshold to split the line items into groups to calculate pricing. This threshold is defined based on the pricing complexity and the number of line items your pricing engine can process. However, the threshold can exceed the governer heap limit if the size is large for a single pricing call. You can use the admin setting APTS_CartLineItemsUpdateChunkSize to define the number of line items in a batch to be processed in a single pricing call. You can use this admin setting to avoid hitting heap size errors.

  1. Go to All Tabs > Admin 
  2. Click New, to create a new record. The New Admin page is displayed. 
  3. Fill in the following details

    FieldValue
    NameAPTS_CartLineItemsUpdateChunkSize
    Value

    Enter the number of line items to be processed in a batch for pricing.

    CodeLeave the field blank
  4. Click Save.

To enable actions on the cart page

In the Smart Cart flow, the action buttons are different than the actions available in a regular flow. You must enable the action buttons to display them in the action menu of the cart for Smart Cart flow. Follow the steps below.

  1. Click the All Tabs icon ().
  2. Go to Config Settings>Display Action Settings.
  3. Select Cart Page in Display Type and the flow that you want to use in Smart Cart flow in Flow.
  4. Find and select the checkbox is Enabled for the following actions.
    • Submit for Pricing (Async)
    • Pre-Price
    • Post-Price
  5. Click Save.