Price Book Rules
Prerequisites
-
To use Price Book Rules, you need the following licenses:
-
To use Price Book Rules, you must:
-
To use Price Book Rules, you need:
-
Access to the
Template
Record Type on the FX5__Price_Book__c object
Price Book Rules
Basics
-
The Price Book Rules are a core feature of the FX CPQ module and require a license to FX CPQ.
-
The Price Book Rules build quotes and tickets automatically by enforcing rules based on contracts agreed with customers.
-
Price Book Rules disallow, require, or recommend items based on a criteria formula.
-
Price Book Rules maximize revenue, ensure contract compliance, and reduce the administrative burden on field personnel.
How it Works
Access the Price Book Rules Tool
-
Price Book Rules are maintained in the Admin Portal.
Access to the Admin Portal is available to anyone with the ability to edit or update your org’s Static Resource files. This access can only be granted through Permission Sets to users with a Salesforce license. |
-
Click Price Book Rules
Create Price Book Rules from scratch
-
Select the Price Book to add a rule to, or click Templates from the top of the screen to add a new Template rule
-
Complete the entries in the "New Rule Name" details section
The "New Rule Name" label changes to reflect the Rule Name
-
Rule Name: Label for the rule to appear in rule lists
-
Applies To: object the rule applies to, either Ticket or Quote
-
Item (optional): Price Book Item to which the rule applies
If an item is selected, the rule applies whenever the item is added to the Ticket or Quote
-
Criteria: SOQL statement to determine whether the rule should apply
-
Description: Statement of what the rule does
-
Active | Inactive: Toggle to set the rule to run or not
The blue half of the toggle is selected.
-
-
In the bottom half of the screen, add actions to perform when the rule is
True
:-
Click + Add Action
-
Specify the Price Book Item to take action on
-
Select the Type of action
Required if the Price Book Item must be added due to this rule
Recommended if the Price Book Item may or may not be added, but should be recommended to the user
Disallowed if the Price Book Item is not allowed due to this rule
-
Select the checkbox for Active to take the action when the Rule is
True
The Active flag can be modified later as needed for each individual Action.
-
Click Create
-
-
Repeat step 3 for each additional action to take when the rule is
True
-
Click Save
Edit existing Price Book Rules
-
Select the Price Book to add a rule to, or click Templates from the top of the screen to add a new Template rule
-
Select the Rule to modify from the left panel
-
Modify details and actions as needed
-
Click Save
Import Price Book Rules to a Price Book from another Price Book
-
Select the Price Book to which you want to add rules
-
Click the Import button at the bottom of the left panel
-
Select the Price Book(s) from which to import rules
-
Deselect any rules that should not be imported
All rules are selected for import initially and highlighted in green.
Click each rule to not import to remove the green highlighting.
-
Click Import
Create a Template Rule from Scratch or Copy to the Template from an Existing Price Book Rule
-
Template rules exist in a dummy Template Price Book
-
Add or modify Template Rules by accessing the Templates icon at the top of the Price Book Rules screen
-
Adding or modifying Template Rules works the same as working with regular price book rules
Import All Price Book Template Rules to another Price Book
-
Click the Templates icon at the top of the Price Book Rules screen
-
Click Price Books Imported to Template
-
Select the Price Book to which to copy the Template rules
-
The rules copy and the Price Book Rules screen displays the selected price book
Copy One or More Template Rules to One or More Price Books
-
Click the Templates icon at the top of the Price Book Rules screen
-
Click the Copy Rules to Price Books button
-
Select the Template Rule(s) on the left of the screen to copy
-
Select the Price Book(s) to which to copy the Template Rules on the right side of the screen
-
Click Copy
Figure 1. Select one or more template rules to copy and one or more price books to copy them to
Mark Rules Active or Inactive
-
Select the Price Book whose rules need to be activated or deactivated
-
Select the Rule to modify
-
Click the Active | Inactive toggle to change the rule’s status
-
Click Save
Mark Rule Actions Active or Inactive
-
Select the Price Book whose rules need to be activated or deactivated
-
Select the Rule to modify
-
Click the Active checkbox in the unlabeled Action table to change an Action’s status
You can modify multiple actions at the same time.
-
Click Save
Delete rule
-
Select the Price Book whose rules need to be deleted
-
Hover over the Rule Name in the left panel to see a white trash can icon appear
-
Click the Rule’s trash can icon to delete the rule
The trash can turns red when the cursor hovers over it.
-
Confirm the deletion by clicking Delete
Caution! This cannot be undone.
Example Quote Rules
Basics
-
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. |
Adding Quote Rules
Example: Adding 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 select Disposal Included for a quote, the Rule Engine:
-
If you deselect Disposal Included for a quote, the Rule Engine:
-
Removes the Disposal Charge item from every quote.
-
Setup Instructions
-
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 2. Use the Price Books icon to select the price book to add a rule to -
Click Create, then make the following entries:
-
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, then make the following entries:
-
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 less than "1000" for the Run quote item, the Rule Engine:
-
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.
-
-
If you enter a Depth more than "1000" for the Run quote item, the Rule Engine:
-
Removes the Depth Charge 0-1000 ft item from the quote.
-
Setup Instructions
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
-
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:
-
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:
-
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
Example Ticket Rules
Basics
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. |
Adding Ticket Rules
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 select Offshore for a job, the Rule Engine:
-
If you deselect Offshore for a job, the Rule Engine:
-
Removes the Deepwater Safety Pack item from every ticket.
-
Setup Instructions
Prerequisites
This example assumes the following exists:
-
A number Custom Field on the Job object called
Offshore
-
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, then make the following entries:
-
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:
-
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 select Disposal Included for a ticket, the Rule Engine:
-
If you deselect Disposal Included for a ticket, the Rule Engine:
-
Removes the Disposal Charge item from every ticket.
-
Setup Instructions
Prerequisites This example assumes the following exists:
-
A boolean Custom Field on the Ticket object called
Disposal Included
-
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, then make the following entries:
-
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
-
-
In the Rule Action table, select + New Action, then make the following entries:
-
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 select Offshore for a job and enter a BHT less than "500" for a ticket, the Rule Engine:
-
If you deselect Offshore for a job, the Rule Engine:
-
Removes the SlimXtreme Slimhole HPHT Logging Platform item from every ticket.
-
-
If you enter a BHT more than "500" for a ticket, the Rule Engine:
-
Removes the SlimXtreme Slimhole HPHT Logging Platform item from the ticket.
-
Setup Instructions
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
-
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:
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:
-
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 enter a Depth less than "1000" for the Run ticket item, the Rule Engine:
-
Adds the Depth Charge 0-1000 ft item to the ticket as a child item to the Run ticket item.
-
Prevents removal of the Depth Charge 0-1000 ft item from the ticket.
-
-
If you enter a Depth more than "1000" for the Run ticket item, the Rule Engine:
-
Removes the Depth Charge 0-1000 ft item from the ticket.
-
Setup Instructions
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
-
Click the Price Books icon, then select a Price Book to add the rule to
Figure 7. 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, then make the following entries:
-
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.