Override Engine Setup

Prerequisites

Basics

  • The Override Engine can update the price or cost of quote items, ticket items, and/or invoice items based on criteria.

    • You can also configure the Override Engine to update fields other than those for prices/costs.

  • When a price/cost override applies to an item, the item’s price/cost changes automatically and you can’t change it manually.

  • An Override Configuration defines the rules that determine whether an Override should apply.

    Override configurations are defined in the Admin Portal.

  • An Override defines the value to use when an Override Configuration applies.

    Override values are defined in the Overrides tab in Back Office.

Guidelines

Override Configurations

Records Updated by Overrides

Fields Updated by Overrides

  • Enter the field(s) to update in Override Fields.

  • You must enter the API name of the field(s) to which overrides apply.

    Enter the API names of fields with each value separated by a comma.

  • The field(s) you enter must exist on the Override object and the relevant item object.

    Enter FX5__Price__c to apply overrides to the Price field on ticket items.

  • You can use custom fields if you want to define your own overrides.

    Custom fields for override criteria must have the same API name on both the Override and item object(s).

Override Criteria

The Filter Clause field contains the criteria that triggers overrides if a record meets the criteria.

You can set up overrides for any quote item, ticket item, or invoice item field.

Override criteria maps fields on the Override object to fields on the object to which overrides apply.

Consider the following example:

FX5__CustomerAccount__c==$FX5__CustomerAccount__c
  • The first field is the Customer Account field on the Override object.

  • The second field is the Customer Account field on the object to which overrides apply.

  • You must separate the fields with a $ sign.

Use the && function to require items to match an override in all of the specified fields.

(FX5__Catalog_Item__c==$FX5__Catalog_Item__c) && (FX5__CustomerAccount__c==$FX5__CustomerAccount__c)
AND is also supported, but && is preferred. Lower case letters in the operator, such as and, are not supported.

Use the || function to require items to match an override in any of the specified fields.

(FX5__Catalog_Item__c==null || FX5__Catalog_Item__c==$FX5__Catalog_Item__c) && (FX5__CustomerAccount__c==null || FX5__CustomerAccount__c==$FX5__CustomerAccount__c)
OR is also supported, but || is preferred. Lower case letters in the operator, such as or, are not supported.

Handling Multiple Overrides

  • Sometimes there are multiple overrides applicable to an item.

  • To handle this, you must add logic to decide which override to use.

  • Complete the following fields to handle multiple overrides:

Field Description

Sort Clause

Enter the sort order of applicable overrides.

  • Enter FX5__Price__c DESC to sort overrides in descending order (highest to lowest) by price

  • Enter FX5__Catalog_Item__c, FX5__CustomerAccount__c to sort overrides in order by catalog item and then customer account

Enter AVG to use the average of all applicable overrides
Enter MAX to use highest applicable override.
Enter MIN to use the lowest applicable override.
Enter SUM to use the total for all applicable overrides.

Limit

Enter the number of overrides to consider.

  • If you enter "1", only the first applicable override will be considered.

  • If you enter "5", the first five applicable overrides will be considered.

InAggregation

Select if you enter AVG, MAX, MIN, or SUM after a field in the Sort Clause

Overriding values with null values

  • Select the Apply Null checkbox to override field values in items with null values.

  • This feature can be useful in situations where you want to clear the value entered in a field when an item meets certain criteria.

Overrides

Override Criteria

  • You can set up overrides for any quote item, ticket item, or invoice item field.

  • Override criteria maps fields on the Override object to fields on the relevant item object(s).

  • Consider the following example:

    FX5__CustomerAccount__c==$FX5__CustomerAccount__c
    • This override criteria maps the Customer field on the Override object to the Customer field on ticket items.

  • Out of the box, you can use the Catalog Item, Customer, and Office fields in override criteria.

    These fields are managed fields on the Override, Quote Item, Ticket Item, and Invoice Item objects.

  • You can also use custom fields for override criteria as long as they have the same API name on both the Override and item object(s).

  • You can use custom fields if you want to define your own overrides.

Date Ranges

You can make overrides apply within a specific date range.

To set a date range for overrides, enter dates in the Effective Date and Expiration Date fields.

The Quote or Ticket’s Date field must be greater than or equal to the Override’s Effective Date and less than or equal to the Override’s Expiration Date.

Considerations

  • When a price/cost override applies to an item, the item’s price/cost stays locked and you can’t change it manually.

  • When you add a new price/cost override:

    • The override won’t apply to items added before that date.

    • The override will apply to items added after that date.

  • When you update a price/cost override:

    • The previous version of the override will apply to items added before that date.

    • The new version of the override will apply to items added after that date.

Price Overrides

Example 1: Adding Price Overrides Based on Customer

Scenario

In this example, we will add price overrides based on the customer.

Once we set up the overrides:

Setup Instructions

  1. Access FieldFX Back Office

  2. Switch to Salesforce Classic

  3. Add an override configuration:

    1. Open the Override Configs tab

    2. Click New

    3. Complete the following:

      1. In Name, enter "Price Override by Customer"

      2. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      3. In Override Fields, enter FX5__Price__c

        This entry maps the Price field on overrides to the Price field on quote items and ticket items.

      4. In Override Type, select "Price"

      5. In Filter Clause, enter the following:

        FX5__CustomerAccount__c==$FX5__CustomerAccount__c && FX5__Catalog_Item__c==$FX5__Catalog_Item__c

        This entry ensures that overrides apply to quote items and ticket items with a matching customer.

      6. In Active, select the checkbox

      7. In Limit, enter "1"

      8. In Sort Clause, enter FX5__CustomerAccount__c

        This entry sorts matching items by customer.

    4. Click Save

  4. Add overrides for each customer:

    1. Open the Overrides tab

    2. Click New

    3. Complete the following:

      1. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      2. In Customer, select a customer

      3. In Catalog Item, select the catalog item for which to apply the override

        The override applies to all quote items and ticket items linked to the catalog item through a price book item.

      4. In Override Type, select "Price"

      5. In Price, enter the price to charge the customer

      6. (Optional) In Effective Date, enter the date when the override should start being used

      7. (Optional) In Expiration Date, enter the date when the override should stop being used

        An override that does not have an Expiration Date always applies unless its Override Config is deactivated.

    4. Click Save & New

    5. Repeat steps c and d

  5. Apply the override configuration to price book items:

    1. Open the Price Book Items tab

    2. Open a price book item for a catalog item to which overrides apply.

    3. Click Edit

    4. In Override Price Method, select "Price Override by Customer"

    5. Click Save

    6. Repeat steps b to e

Example 2: Adding Price Overrides Based on QUANTITY

Scenario

In this example, we will add price overrides based on a quantity. More specifically, the price override will be based on well depth.

Once we set up the overrides:

Setup Instructions

  1. Access FieldFX Back Office

  2. Switch to Salesforce Classic

  3. If not already created in your Org, create the following custom fields:

    • WellDepthc field on Ticketc

    • TicketWellDepthc field on Ticket_Itemc as the following formula:

      FX5__Ticket__r.WellDepth__c
    • MinDepthc and MaxDepthc on Overrider__c

  4. If not already included, ensure the following fields are included on the specified page layouts:

    • IsAggregation, Sort Clause, and Limit on the Override Configs page layout

    • MinDepth, MaxDepth, and Price on the Overrides page layout

    • Override Price Method on the Price Book Item page layout

  5. Add an override configuration:

    1. Open the Override Configs tab

    2. Click New

    3. Enter "Price Override by Well Depth" in Name

    4. In Applies to SObject, add "Ticket" and "Quote" to Chosen

    5. Enter "FX5Pricec" in Override Fields

    6. Select "Price" in Override Type to map the Price field on overrides to the Price field on quote items and ticket items

    7. Enter the following formula in Filter Clause:

      FX5__CustomerAccount__c==$FX5__CustomerAccount__c && FX5__Catalog_Item__c==$FX5__Catalog_Item__c
    8. Enter "1" in Limit

    9. Enter "WellDepth__c" in Sort Clause to sort matching items by well depth

    10. Click Save

      Screenshot of the setups for the Override Config for Example 2
      Figure 1. Override Config settings for well depth override example
  6. Add the overrides:

    1. Open the Overrides tab

    2. Click New

    3. In Applies to SObject, add "Ticket" and "Quote" to Chosen

    4. Enter "50" to MinDepth

    5. Enter "500" to MaxDepth

    6. Enter "100" to Price

    7. Click Save & New

      Screenshot of setups for well depth override
      Figure 2. Entries in the setup screen for well depth override
  7. Repeat steps c–g with "500" to MinDepth, "599" in MaxDepth, and "200" in Price

  8. Repeat steps c–f with "600" to MinDepth, "699" in MaxDepth, and "300" in Price

  9. Click Save

  10. Edit Price Book Item Detail

  11. Select "Price Override by Well Depth" in Override Price Method

  12. Click Save

    Screenshot of a price book item detail showing the override selected
    Figure 3. Price book item detail showing the override selected

Cost Overrides

Example 1: Adding Cost Overrides Based on Location

Scenario

In this example, we will add cost overrides based on the office.

Once we set up the overrides:

Setup Instructions

  1. Access FieldFX Back Office

  2. Switch to Salesforce Classic

  3. Add an override configuration:

    1. Open the Override Configs tab

    2. Click New

    3. Complete the following:

      1. In Name, enter "Cost Override by Office"

      2. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      3. In Override Fields, enter "FX5__Cost__c"

        This entry maps the Cost field on overrides to the Cost field on quote items and ticket items.
      4. In Override Type, select "Cost"

      5. In Filter Clause, enter the following

        FX5__Office__c==$FX5__Office__c &&
        FX5__Catalog_Item__c==$FX5__Catalog_Item__c
        This entry ensures that overrides apply to quote items and ticket items with a matching office.
      6. In Limit, enter "1"

      7. In Sort Clause, enter "FX5__Office__c"

        This entry sorts matching items by office.
      8. Click Save

  4. Add overrides for each office:

    1. Open the Overrides tab

    2. Click New

    3. Complete the following:

      1. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      2. In Office, select an office

      3. In Catalog Item, select the catalog item for which to apply the override TIP: The override applies to all quote items and ticket items linked to the catalog item through a price book item.

      4. In Override Type, select "Cost"

      5. In Cost, enter the cost for the office

      6. Select IsActive

      7. (Optional) Set the date range in which to apply the override

    4. Click Save & New

    5. Repeat steps c and d for other offices as needed

  5. Apply the override configuration to price book items:

    1. Open the Price Book Items tab

    2. Open a price book item for a catalog item to which overrides apply

    3. Click Edit

    4. In Override Cost Method, select "Cost Override by Office"

    5. Click Save

    6. Repeat steps b to e for other price book items as needed

Price & Cost Overrides

Example 1: Adding Price & Cost Overrides Based on Treatment Facility

Scenario

In this example, we will add price and cost overrides based on the treatment facility.

Once we set up the overrides:

Setup Instructions

  1. Access FieldFX Back Office

  2. Switch to Salesforce Classic

  3. Add a Treatment Facility (Treatment_Facility__c) picklist to the following objects:

    • Quote Item

    • Ticket Item

    • Override

  4. Add an override configuration:

    1. Open the Override Configs tab

    2. Click New

    3. Complete the following:

      1. In Name, enter "Price & Cost Overrides by Treatment Facility"

      2. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      3. In Override Fields, enter "FX5__Cost__c, FX5__Price__c"

        This entry maps the Cost and Price fields on overrides to the Cost and Price fields on quote items and ticket items.
      4. In Override Type, select "Price"

      5. In Filter Clause, enter the following:

        (Treatment_Facility__c==$Treatment_Facility__c) &&
        (FX5__Catalog_Item__c==null ||
        FX5__Catalog_Item__c==$FX5__Catalog_Item__c)

        This entry ensures that overrides apply to items with a matching treatment facility.

        The advanced logic for catalog items in this example ensures that items with a matching treatment facility can have a matching catalog item or a null value entered for their catalog item.

      6. In Limit, enter "1"

      7. In Sort Clause, enter "Treatment_Facility__c, FX5__Catalog_Item__c NULLS LAST".

        This entry sorts matching items so that those with a matching treatment facility and catalog item are listed first.
      8. Click Save

  5. Add overrides for each treatment facility:

    1. Open the Overrides tab

    2. Click New

    3. Complete the following:

      1. In Applies to SObject, add "Ticket" and "Quote" to Chosen

      2. In Treatment Facility, select a treatment facility

      3. In Catalog Item, select the catalog item for which to apply the override TIP: The override applies to all quote items and ticket items linked to the catalog item through a price book item.

      4. In Override Type, select "Price"

      5. In Price, enter the price to charge for using the treatment facility

      6. In Cost, enter the cost for using the treatment facility

      7. Select IsActive

      8. (Optional) Set the date range in which to apply the override

    4. Click Save & New

    5. Repeat steps c and d for other treatment facilities

  6. Apply the override configuration to price book items:

    1. Open the Price Book Items tab

    2. Open a price book item for a catalog item to which overrides apply

    3. Click Edit

    4. In Override Price Method, select "Price & Cost Overrides by Treatment Facility"

    5. Click Save

    6. Repeat steps b to e for other price book items as needed