Price Book Rules

Prerequisites

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.

  1. Go to https://admin.fieldfx.com

  2. Click Price Book Rules

Create Price Book Rules from scratch

  1. Select the Price Book to add a rule to, or click Templates from the top of the screen to add a new Template rule

  2. 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.

  3. 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

  4. Repeat step 3 for each additional action to take when the rule is True

  5. Click Save

Edit existing Price Book Rules

  1. Select the Price Book to add a rule to, or click Templates from the top of the screen to add a new Template rule

  2. Select the Rule to modify from the left panel

  3. Modify details and actions as needed

  4. Click Save

Import Price Book Rules to a Price Book from another Price Book

  1. Select the Price Book to which you want to add rules

  2. Click the Import button at the bottom of the left panel

  3. Select the Price Book(s) from which to import rules

  4. 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.

  5. 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

  1. Click the Templates icon at the top of the Price Book Rules screen

  2. Click Price Books Imported to Template

  3. Select the Price Book to which to copy the Template rules

  4. 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

  1. Click the Templates icon at the top of the Price Book Rules screen

  2. Click the Copy Rules to Price Books button

  3. Select the Template Rule(s) on the left of the screen to copy

  4. Select the Price Book(s) to which to copy the Template Rules on the right side of the screen

  5. Click Copy

    Screenshot of the import from/to screen
    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

  1. Select the Price Book whose rules need to be activated or deactivated

  2. Select the Rule to modify

  3. Click the Active | Inactive toggle to change the rule’s status

  4. Click Save

Mark Rule Actions Active or Inactive

  1. Select the Price Book whose rules need to be activated or deactivated

  2. Select the Rule to modify

  3. Click the Active checkbox in the unlabeled Action table to change an Action’s status

    You can modify multiple actions at the same time.

  4. Click Save

Delete rule

  1. Select the Price Book whose rules need to be deleted

  2. Hover over the Rule Name in the left panel to see a white trash can icon appear

  3. Click the Rule’s trash can icon to delete the rule

    The trash can turns red when the cursor hovers over it.

  4. Confirm the deletion by clicking Delete

    Caution! This cannot be undone.

Delete rule Action

  1. Select the Price Book whose rules need to be activated or deactivated

  2. Select the Rule to modify

  3. Hover over the action to delete and a trash can icon appears to the right of the action

  4. Click the Trash Can icon

  5. 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:

    • Adds the Disposal Charge item to every quote.

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

  • If you deselect Disposal Included for a quote, the Rule Engine:

    • Removes the Disposal Charge item from every quote.

Setup Instructions
  1. Add a boolean Disposal Included field to the Quote object and add the field to page layout(s)

  2. Go to https://admin.fieldfx.com, then select Price Book Rules

  3. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the Price Books icon
    Figure 2. Use the Price Books icon to select the price book to add a rule to
  4. 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

  5. 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

  6. Click Save

  7. Run a script for the Disposal Included checkbox:

    1. Access Workbench

    2. Select UtilitiesApex Execute

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. 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

  1. Go to https://admin.fieldfx.com

  2. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the price book icon
    Figure 3. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. 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

  5. Click Save

  6. 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

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:

    • Adds the Deepwater Safety Pack item to every ticket.

    • Prevents removal of the Deepwater Safety Pack item from any ticket.

  • 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

  1. Go to https://admin.fieldfx.com

  2. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the price book icon
    Figure 4. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. 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

  5. Click Save

  6. Run a script for the Offshore checkbox:

    1. Access Workbench

    2. Select UtilitiesApex Execute

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. 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:

    • Adds the Disposal Charge item to every ticket.

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

  • 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

  1. Go to https://admin.fieldfx.com

  2. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the price book icon
    Figure 5. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. 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

  5. Click Save

  6. Run a script for the Disposal Included checkbox:

    1. Access Workbench

    2. Select UtilitiesApex Execute

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. 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:

    • Adds the SlimXtreme Slimhole HPHT Logging Platform item to every ticket.

    • Prevents removal of the SlimXtreme Slimhole HPHT Logging Platform item from any ticket.

  • 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

  1. Go to https://admin.fieldfx.com

  2. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the price book icon
    Figure 6. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. 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

  5. Click Save

  6. Run a script for the Offshore and BHT fields:

    1. Access Workbench

    2. Select UtilitiesApex Execute

    3. Enter the following script:

      System.debug(FX5.FXWorkerLauncher.DoWork('FX5.CustomFieldInfoHandler', null));
    4. 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

  1. Go to https://admin.fieldfx.com

  2. Click the Price Books icon, then select a Price Book to add the rule to

    Screenshot of the price book icon
    Figure 7. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. 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

  5. Click Save

  6. Run a script for the Depth field:

    1. Access Workbench

    2. Select UtilitiesApex Execute

    3. Enter the following script:

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