Price Book Rule Types - Quotes and Tickets
This page gives examples and the setup instructions on configuring Price Book Rules by different types. Sample examples are provided to configure the rules for Quotes and Tickets.
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. |
Example: Add a Rule with Quote-Based Criteria
Scenario
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 applies:
If you… | Then the Rule Engine… |
---|---|
Select Disposal Included for a quote, |
|
Deselect Disposal Included for a quote, |
|
Setup
-
Add a boolean Disposal Included field to the Quote object and add the field to page layout(s).
-
Go to https://admin.fieldfx.com, then select Price Book Rules.
-
Click the Price Books icon, then select a Price Book to add the rule to.
Figure 1. Use the Price Books icon to select the price book to add a rule to -
Click Create.
-
Make the following entries:
Field Entry Rule Name
Disposal Included
Applies To
Select Quote.
Criteria
Disposal_Included__c=true
Use the API name of the field created in Step 1.
-
Select Active.
-
-
In the Rule Action table, select + New Action,
-
Make the following entries:
Field Action Price Book Item
Select Disposal Included.
Type
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
-
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.
Example: Adding a Rule with Quote Item-Based Criteria
Scenario
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 applies:
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, |
|
Prerequisites
This example assumes the following exist:
-
A Catalog Item named Run
-
A Price Book Item for Run
-
A Catalog Item named Depth Charge 0-1000 ft
-
A Price Book Item for Depth Charge 0-1000 ft
-
A number Custom Field on the Quote Item object called
Depth__c
Setup
-
Click the Price Books icon, then select a Price Book to add the rule to.
Figure 2. Select the Price Book icon to choose a Price Book to work with -
Click Create, then make the following entries:
Field Entry Rule Name
Depth Charge <1000
Applies To
Select Quote
Criteria
Depth__c <1000
Use the API name of the Quote Item custom field from in Step 1.
Item
Select Run.
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.
-
Select Active
-
-
In the Rule Action table,
-
Select + New Action, then make the following entries:
Field Entry Price Book Item
Select Depth Charge 0-1000 ft.
Type
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
-
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.
Ticket Rules
Ticket rules have criteria that triggers rule actions if a job, ticket, or ticket item meets the criteria.
Use information entered in job, ticket, or ticket item fields for ticket rule criteria.
Review CPQ Rules prior to working with ticket rules for FieldFX CPQ. |
Example: Adding a Rule with Job-Based Criteria
Scenario
In this example, we will add a ticket rule using criteria based on the selection of Offshore for a job.
Once we set up the rule, the following applies:
If you… | Then the Rule Engine… |
---|---|
Select Offshore for a job, |
|
Deselect Offshore for a job, |
|
Prerequisites
This example assumes the following exists:
-
A number Custom Field on the Job object called
Offshore
Setup
-
Go to https://admin.fieldfx.com.
-
Click the Price Books icon, then select a Price Book to add the rule to.
Figure 3. Select the Price Book icon to choose a Price Book to work with -
Click Create, then make the following entries:
Field Action Rule Name
Offshore
Applies To
Select Ticket.
Criteria
FX5__Job__r.Offshore__c=true
Use the API name of the FX5__Job__c custom field from in Step 1.
-
Select Active.
-
-
In the Rule Action table, select + New Action, then make the following entries:
Field Action Price Book Item
Select Deepwater Safety Pack.
Type
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
Click Save.
-
Run a script for the Offshore checkbox:
-
Select Utilities → Apex Execute.
-
Enter the following script:
System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
-
Click Execute
Example: Adding a Rule with Ticket-Based Criteria
Scenario
In this example, we will add a ticket rule using criteria based on the selection of Disposal Included for a ticket.
Once we set up the rule, the following applies:
If you… | Then the Rule Engine… |
---|---|
Select Disposal Included for a ticket, |
|
Deselect Disposal Included for a ticket, |
|
Prerequisites
This example assumes the following exists:
-
A boolean Custom Field on the Ticket object called
Disposal Included
Setup
-
Go to https://admin.fieldfx.com.
-
Click the Price Books icon, then select a Price Book to add the rule to.
Figure 4. Select the Price Book icon to choose a Price Book to work with -
Click Create.
-
Make the following entries:
Field Action Rule Name
Disposal Included
Applies To
Select Ticket.
Criteria
Disposal_Included__c=true
Use the API name of the FX5__Job__c custom field from in Step 1.
-
Select Active checkbox.
-
-
In the Rule Action table,
-
Select + New Action, then make the following entries:
Field Action Price Book Item
Select Disposal Included.
Type
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
-
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.
Example: Adding a Rule with Job & Ticket-Based Criteria
Scenario
In this example, we will add a ticket rule using criteria based on the selection of Offshore for a job and the value in BHT for a ticket.
Once we set up the rule, the following applies:
If you… | Then the Rule Engine… |
---|---|
Deselect Offshore for a job, |
|
Enter a BHT more than "500" for a ticket, |
|
Prerequisites
This example assumes the following exist:
-
A boolean Custom Field on the Job object called
Offshore
-
A number Custom Field on the Ticket object called
BHT
Setup
-
Click the Price Books icon, then select a Price Book to add the rule to
Figure 5. Select the Price Book icon to choose a Price Book to work with -
Click Create
-
Make the following entries:
Field Action Rule Name
BHT <500
Applies To
Select Ticket.
Criteria
FX5__Job__r.Offshore__c=true && BHT__c<500
Use the API name of the FX5__Job__c custom field from in Step 1.
-
Select Active
-
-
In the Rule Action table,
-
Select + New Action, then make the following entries:
Field Action Price Book Item
Select SlimXtreme Slimhole HPHT Logging Platform
Type
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
-
Click Save
-
Run a script for the Offshore and BHT fields:
-
Select Utilities → Apex Execute.
-
Enter the following script:
System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
-
Click Execute.
Example: Adding a Rule with Ticket Item-Based Criteria
Scenario
In this example, we will add a ticket rule using criteria based on the Depth for a ticket item.
Once we set up the rule, the following applies:
If you… | Then the Rule Engine… |
---|---|
Enter a Depth less than "1000" for the Run ticket item, |
|
Enter a Depth more than "1000" for the Run ticket item, |
|
Prerequisites
This example assumes the following exist:
-
A Catalog Item named Run
-
A Price Book Item for Run
-
A Catalog Item named Depth Charge 0-1000 ft
-
A Price Book Item for Depth Charge 0-1000 ft
-
A number Custom Field on the Ticket Item object called
Depth__c
Setup
-
Click the Price Books icon, then select a Price Book to add the rule to.
Figure 6. Select the Price Book icon to choose a Price Book to work with -
Click Create, then make the following entries:
Rule Name:
Depth Charge <1000
Applies To:
Select Ticket.
Criteria:
Depth__c <1000
Use the API name of the FX5__Ticket_Item__c custom field from in Step 1.
Item:
Select Run.
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 tickets.
-
Select Active.
-
-
In the Rule Action table,
-
Select + New Action,
-
Make the following entries:
Field Action Price Book Item:
Select Depth Charge 0-1000 ft.
Type:
Select Required.
-
Select the Active checkbox.
-
Click Create.
-
-
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.
Recommended Reading
-
Admin Portal - Read about accessing the Admin Portal.
-
Rule Engine - Read about the FieldFX Rule Engine.
-
Rule Engine Setup - Read about how to set up the FieldFX Rule Engine.