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,

  • 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. 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 1. Use the Price Books icon to select the price book to add a rule to
  4. Click Create.

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

    2. Select Active.

  5. In the Rule Action table, select + New Action,

    1. Make the following entries:

      Field Action

      Price Book Item

      Select Disposal Included.

      Type

      Select Required.

    2. Select the Active checkbox.

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

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

  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 2. Select the Price Book icon to choose a Price Book to work with
  3. 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

  4. In the Rule Action table,

    1. Select + New Action, then make the following entries:

      Field Entry

      Price Book Item

      Select Depth Charge 0-1000 ft.

      Type

      Select Required.

    2. Select the Active checkbox.

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

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,

  • Adds the Deepwater Safety Pack item to every ticket.

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

Deselect Offshore for a job,

  • Removes the Deepwater Safety Pack item from every ticket.

Prerequisites

This example assumes the following exists:

  • A number Custom Field on the Job object called Offshore

Setup

  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:

    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.

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

  5. Select the Active checkbox.

  6. Click Create.

  7. Click Save.

  8. 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…​ Then the Rule Engine…​

Select Disposal Included for a ticket,

  • Adds the Disposal Charge item to every ticket.

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

Deselect Disposal Included for a ticket,

  • Removes the Disposal Charge item from every ticket.

Prerequisites

This example assumes the following exists:

  • A boolean Custom Field on the Ticket object called Disposal Included

Setup

  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.

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

    2. Select Active checkbox.

  4. In the Rule Action table,

    1. Select + New Action, then make the following entries:

      Field Action

      Price Book Item

      Select Disposal Included.

      Type

      Select Required.

    2. Select the Active checkbox.

    3. 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…​ Then the Rule Engine…​

Select Offshore for a job and enter a BHT less than "500" for a ticket,

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

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

Deselect Offshore for a job,

  • Removes the SlimXtreme Slimhole HPHT Logging Platform item from every ticket.

Enter a BHT more than "500" for a ticket,

  • Removes the SlimXtreme Slimhole HPHT Logging Platform item from the 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

  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

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

    2. Select Active

  4. In the Rule Action table,

    1. Select + New Action, then make the following entries:

      Field Action

      Price Book Item

      Select SlimXtreme Slimhole HPHT Logging Platform

      Type

      Select Required.

    2. Select the Active checkbox.

    3. 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…​ Then the Rule Engine…​

Enter a Depth less than "1000" for the Run ticket item,

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

Enter a Depth more than "1000" for the Run ticket item,

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

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

  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:

    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,

    1. Select + New Action,

    2. Make the following entries:

      Field Action

      Price Book Item:

      Select Depth Charge 0-1000 ft.

      Type:

      Select Required.

    3. Select the Active checkbox.

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