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, |
|
Deselect Disposal Included for a quote, |
|
Setup
-
Add the Disposal Included checkbox:
-
From Setup, enter
object
in the Quick Find box, then select Objects. -
Click Quote.
-
Under Custom Fields & Relationships, click New.
-
Select Checkbox and then click Next.
-
In Field Label, enter
Disposal Included
and click Next. -
Click Visible twice and click Next.
-
Select the page layouts on which to include the checkbox and click Save.
-
Grant permissions for the checkbox.
-
-
Add a rule:
-
Open the price book for which to add the rule.
-
Under Rules, click New Rule.
-
In Rule Name, enter
Disposal Included
-
In Criteria, enter the following:
Disposal_Included__c=true
-
In Applies To, add "Quote__c" to Chosen.
-
Select Is Active and click Save.
-
-
Add a rule action:
-
Under Rule Actions, click New Rule Action.
-
In Price Book Item, select Disposal Included.
-
In Type, select Required.
-
Select Is Active and click Save.
-
-
Run a script for the Disposal Included checkbox:
-
Select Utilities | Apex Execute.
-
Enter the following script:
System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
-
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, |
|
More than "1000" for the Run quote item, |
|
Setup Instructions
-
Add a Run catalog item:
-
Open the Catalog Items tab and click New.
-
In Item Code, enter
Run
-
In Description, enter
Run for wireline jobs
. -
In Sequence Number, enter a sequence number to use for the item.
-
In Ticket Item Record Type, select a relevant option such as "Services" and click Save.
-
-
Add a Run price book item:
-
Under Price Book Items, click New Price Book Item:
-
In Price Book, select the price book for which to add the rule.
-
In Default Quantity, enter "1".
-
In Included Quantity, enter "0" and click Save
-
-
Add a Depth Charge 0-1000 ft catalog item:
-
Open the Catalog Items tab and click New.
-
In Item Code, enter
DC<1000
. -
In Description, enter "Depth Charge 0-1000 ft".
-
In Sequence Number, enter a sequence number to use for the item.
-
In Ticket Item Record Type, select a relevant option such as "Services" and click Save.
-
-
Add a Depth Charge 0-1000 ft price book item:
-
Under Price Book Items, click New Price Book Item.
-
In Price Book, select the price book for which to add the rule.
-
In Default Quantity, enter "1".
-
In Included Quantity, enter "0".
-
In Price, enter the price to charge for runs less than 1000 feet and click Save.
-
-
Add the Depth field to the Quote Item object:
-
From Setup, enter
object
in the Quick Find box, then select Objects. -
Click Quote Item.
-
Under Custom Fields & Relationships, click New.
-
Select Number.
-
Click Next.
-
In Field Label, enter
Depth
and click Next. -
Click Visible twice and click Next.
-
Select the page layouts on which to include the field and click Save.
-
Grant permissions for the field.
-
-
Add a rule:
-
Open the price book for which to add the rule.
-
Under Rules, click New Rule.
-
In Rule Name, enter "Depth Charge <1000".
-
In Criteria, enter the following formula:
Depth__c < 1000
-
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.
-
In Applies To, add "Quote__c" to Chosen.
-
Select Is Active and click Save.
-
-
Add a rule action:
-
Under Rule Actions, click New Rule Action.
-
In Price Book Item, select Depth Charge 0-1000 ft.
-
In Type, select Required.
-
Select Is Active and click Save
-
-
Run a script for the Depth field:
-
Select Utilities | Apex Execute.
-
Enter the following script:
System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
-
Click Execute.