Quote Rules

Quote rules have criteria that triggers rule actions if a quote or quote item meets the criteria.

Use information entered in quote or quote item fields for quote rule criteria.

Review CPQ Rules prior to working with quote rules for FieldFX CPQ.

Add Quote Rules

Add a Rule with Quote-Based Criteria

In this example, we will add a quote rule using criteria based on the selection of Disposal Included for a quote.

Once we set up the rule, the following apply:

If you…​ then the Rule Engine…​

Select Disposal Included for a quote,

  • Adds the Disposal Charge item to every quote.

  • Prevents removal of the Disposal Charge item from any quote.

Deselect Disposal Included for a quote,

  • Removes the Disposal Charge item from every quote.

Setup

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Add the Disposal Included checkbox:

    1. From Setup, enter object in the Quick Find box, then select Objects.

    2. Click Quote.

    3. Under Custom Fields & Relationships, click New.

    4. Select Checkbox and then click Next.

    5. In Field Label, enter Disposal Included and click Next.

    6. Click Visible twice and click Next.

    7. Select the page layouts on which to include the checkbox and click Save.

    8. Grant permissions for the checkbox.

  4. Add a rule:

    1. Open the price book for which to add the rule.

    2. Under Rules, click New Rule.

    3. In Rule Name, enter Disposal Included

    4. In Criteria, enter the following:

      Disposal_Included__c=true
    5. In Applies To, add "Quote__c" to Chosen.

    6. Select Is Active and click Save.

  5. Add a rule action:

    1. Under Rule Actions, click New Rule Action.

    2. In Price Book Item, select Disposal Included.

    3. In Type, select Required.

    4. Select Is Active and click Save.

  6. Run a script for the Disposal Included checkbox:

    1. Access Workbench.

    2. Select Utilities | Apex Execute.

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. Click Execute.

Add a Rule with Quote Item-Based Criteria

In this example, we will add a quote rule using criteria based on the Depth for a quote item.

Once we set up the rule, the following apply:

If you enter a Depth…​ Then the Rule Engine…​

Less than "1000" for the Run quote item,

  • Adds the Depth Charge 0-1000 ft item to the quote as a child item to the Run quote item.

  • Prevents removal of the Depth Charge 0-1000 ft item from the quote.

More than "1000" for the Run quote item,

  • Removes the Depth Charge 0-1000 ft item from the quote.

Setup Instructions

  1. Access FieldFX Back Office.

  2. Switch to Salesforce Classic.

  3. Add a Run catalog item:

    1. Open the Catalog Items tab and click New.

    2. In Item Code, enter Run

    3. In Description, enter Run for wireline jobs.

    4. In Sequence Number, enter a sequence number to use for the item.

    5. In Ticket Item Record Type, select a relevant option such as "Services" and click Save.

  4. Add a Run price book item:

    1. Under Price Book Items, click New Price Book Item:

    2. In Price Book, select the price book for which to add the rule.

    3. In Default Quantity, enter "1".

    4. In Included Quantity, enter "0" and click Save

  5. Add a Depth Charge 0-1000 ft catalog item:

    1. Open the Catalog Items tab and click New.

    2. In Item Code, enter DC<1000.

    3. In Description, enter "Depth Charge 0-1000 ft".

    4. In Sequence Number, enter a sequence number to use for the item.

    5. In Ticket Item Record Type, select a relevant option such as "Services" and click Save.

  6. Add a Depth Charge 0-1000 ft price book item:

    1. Under Price Book Items, click New Price Book Item.

    2. In Price Book, select the price book for which to add the rule.

    3. In Default Quantity, enter "1".

    4. In Included Quantity, enter "0".

    5. In Price, enter the price to charge for runs less than 1000 feet and click Save.

  7. Add the Depth field to the Quote Item object:

    1. From Setup, enter object in the Quick Find box, then select Objects.

    2. Click Quote Item.

    3. Under Custom Fields & Relationships, click New.

    4. Select Number.

    5. Click Next.

    6. In Field Label, enter Depth and click Next.

    7. Click Visible twice and click Next.

    8. Select the page layouts on which to include the field and click Save.

    9. Grant permissions for the field.

  8. Add a rule:

    1. Open the price book for which to add the rule.

    2. Under Rules, click New Rule.

    3. In Rule Name, enter "Depth Charge <1000".

    4. In Criteria, enter the following formula:

      Depth__c < 1000
    5. In Price Book Item, select the Run price book item.

      When you link a price book item to a rule, the Rule Engine triggers rule actions for that rule when you add the price book item to quotes.

    6. In Applies To, add "Quote__c" to Chosen.

    7. Select Is Active and click Save.

  9. Add a rule action:

    1. Under Rule Actions, click New Rule Action.

    2. In Price Book Item, select Depth Charge 0-1000 ft.

    3. In Type, select Required.

    4. Select Is Active and click Save

  10. Run a script for the Depth field:

    1. Access Workbench.

    2. Select Utilities | Apex Execute.

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. Click Execute.