## Adding Line Items when Validating

- Updated on Jun 9, 2023
- Published on Jun 9, 2023

- 2 minute(s) read

Mobileforce provides multiple ways to group or automatically add line items to a quote. In this scenario, an organization wants to create rules so that Mobileforce CPQ automatically adds a line item to a quote during validation if a specific line item already exists in the quote.

**Example:**

An appliance reseller has a complimentary warranty service for specific appliances, including the Wolf 36-DF Cooking Range. So they want to configure Mobileforce CPQ to automatically add the warranty whenever the applicable appliances are added to a quote.

## Adding Line Items to the Quote

First the Seller creates a Quote, adding the applicable [Line Item](https://documentation.mobileforcesoftware.com/v1/docs/manage-line-items) to the **Quote** tab. When the Seller validates the quote, Mobileforce CPQ automatically adds the line item configured as a rule to the quote.

In Mobileforce, validation occurs when the Seller:

- Clicks the **Validate** button.
- Clicks the **Submit for Approval** button.

**Example:**

In the above screenshot, the seller has already added the Wolf cooking range to the quote. When the seller clicks **Validate** to ensure that the quote is valid before proceeding, Mobileforce CPQ automatically adds the extended warranty as a line item.

## Configuring Mobileforce CPQ

To configure this behavior in Mobileforce CPQ, first the Mobileforce Admin must ensure

- All applicable Products exist as [Product Entries](https://documentation.mobileforcesoftware.com/v1/docs/products) in Mobileforce CPQ.
- Each Product Entry has a [Price Book Entry](https://documentation.mobileforcesoftware.com/v1/docs/adding-product-price-book-entries) for all applicable Price Books.

**Example:**

The Mobileforce CPQ Admin creates a Product Entry for the Wolf Cooking Range and the Extended Warranty for the product. Additionally, as this company is selling the product in North America and Europe, the Admin creates Price Book Entries for both their North American Price Book and the Euro Zone Price Book.

Then the Admin will create a [Product Rule](https://documentation.mobileforcesoftware.com/v1/docs/adding-product-rules-1) that automatically adds the line item upon validation.

From the **Configuration** tab of the desired product, create a new Product Rule.

Ensure the following:

- **Validation** is selected from the **Triggered By** list.
- **Add Product** is selected from the **Action Performed** list.
- The desired product is selected from the **Product to Add** list.
- If other validation rules exist for the product, select the applicable **Rule Evaluation Order** for this rule.

**Example:**

The Mobileforce Admin creates a Validation rule, selecting the **Extended Warranty Service** from the **Product To Add** list.

If this extended warranty replaces an existing standard warranty that is added to all products, the Admin could create an additional rule to delete the standard warranty from the quote by:

- Selecting **Delete Product** from the **Action Performed** list.
- Selecting the standard warranty from the **Product to Delete** list.
- Ensuring that the Rule Evaluation Order value was set to 20, so that it executes after the Add Warranty rule.
