Configuring FSM Billing Rules

Configure how Field Service Management (FSM) selects a Billing Rule on a customer relationship management (CRM) task. The selected rule sets billing results on related consumables, time entries, and expense report lines. You can use the standard options, add an option, change its billable results, or apply a price level to billable consumables and time entries.

For the capability's behavior, standard eight-option outcome table, and existing-record limitations, see FSM Billing Rules.

Use the following sections for the configuration task you need to complete:

Before You Begin

Prepare the following before changing the configuration:

  • Access to the field service configuration record and the applicable records. For an additional list option, use a role that can edit the Field Service Billing Type custom list. The Custom Lists permission in NetSuite and list ownership control list maintenance.

  • The account's internal IDs for the relevant Field Service Project, Case, and Task types, Billing Rule options, and any price level. Type conditions use type IDs, not the IDs of individual projects, cases, or tasks.

  • A CRM task with a Task Type for automatic rule selection. Related records must retain their Task links. A consumable requires the Item field (custrecord_nx_consitem), and a time entry requires the Service Item field (item). An expense line uses its expense category.

  • The supplied Field Service Client (customscript_nx_client) and Field Service User Event (customscript_nx_userevent) scripts for the applicable records. Expense-line evaluation uses the user event on expense report create and edit. See FSM Script Reference for deployment details.

When using Track Service Time, associate the relevant task types with service items for sale or resale and set their base prices. See Associating Field Service Task Types With Activity Types.

Important:

Changing a formula can affect every qualifying related record saved under the affected Billing Rule, including records on existing tasks.

Default Configuration and Choices

FSM supplies eight options in the Field Service Billing Type custom list (customlist_nx_billing_type), used by the task's Billing Rule field (custevent_nx_billing_type). The standard billing.task array is empty: the options do not supply automatic selection criteria. You can select an option manually or configure criteria for automatic selection.

The following table shows the standard results for related records with a populated Billing Rule.

Configuration

Standard Nonbillable Billing Rule IDs

Result for Other Populated Billing Rule IDs

billing.consumable

5, 6, 7, 8

Billable

billing.time

3, 4, 7, 8

Billable

billing.expense

2, 4, 6, 8

Billable

Adding or renaming a list option does not change these formulas. With the standard formulas unchanged, an added option whose ID is outside those sets produces billable results for all three record groups.

Task selection and related-record calculation are separate choices. You can configure automatic selection and retain the standard formulas, or change the formulas for manually selected options. These settings do not themselves create sales orders, fulfill orders, or generate invoices.

For selection-array replacement and inherited properties, see How Custom Configuration Combines with Core Configuration.

Settings and Locations

The billing object belongs at the root of the Field Service Configuration JSON, outside routes/mobile. Edit the configuration through Field Service > Administration > Configuration.

Prepare an inactive copy of the current configuration before changing billing settings. Edit and validate the copy before activation. For the complete revision procedure, see Updating and Validating FSM Configuration.

The following table lists billing settings, configuration locations, and pricing prerequisites.

Setting

Location

Configuration Purpose

Billing Rule choices

Customization > Lists, Records, & Fields > Lists

Field Service Billing Type (customlist_nx_billing_type)

Maintain choices available in the task's Billing Rule field.

Automatic selection

billing.task

Order conditions for project, case, and task types. Set billing to the chosen option's internal ID.

Consumable result

billing.consumable.item.map in the standard definition

Change the Formula Text result for the consumable's item. Retain its item search and filter.

Time-entry result

billing.time.item.map in the standard definition

Change the Formula Text result for the service item. Retain its item search and filter.

Expense-line result

billing.expense.category.map in the standard definition

Change the Formula Text result for the expense category. Retain its category search, filter, and Boolean result handling.

Multiple Prices

Setup > Company > Enable Features, Transactions subtab

Required for FSM price-level sourcing on consumables and time entries.

Override Rates on Time Records

Setup > Accounting > Preferences > Accounting Preferences, Time & Expenses subtab

Additionally required for FSM time-entry price-level and rate sourcing.

For NetSuite pricing setup, see Using Multiple Pricing and Time & Expenses Accounting Preferences.

Standard default JSON for these properties:

            {
  "billing": {
    "task": [],
    "time": {
      "join": true,
      "item": {
        "record": "item",
        "filters": "${ time.item }",
        "map": "formulatext:case when ${ task.billing } in (3,4,7,8) then 'F' else 'T' end"
      }
    },
    "expense": {
      "boolean": true,
      "category": {
        "record": "expensecategory",
        "filters": "${ expense.category }",
        "map": "formulatext:case when ${ task.billing } in (2,4,6,8) then 'F' else 'T' end"
      }
    },
    "consumable": {
      "join": true,
      "item": {
        "record": "item",
        "filters": "${ consumable.item }",
        "map": "formulatext:case when ${ task.billing } in (5,6,7,8) then 'F' else 'T' end"
      }
    }
  }
} 

          

Configure Automatic Selection

Automatic selection uses the type of the linked project, the type of the linked case, and the task's Task Type. It does not match arbitrary record fields.

To configure automatic selection:

  1. Go to Field Service > Administration > Configuration.

  2. Prepare an inactive copy of the current configuration.

  3. Open the inactive copy in edit mode.

  4. Identify the Billing Rule option and its internal ID.

  5. In the Editor, update billing.task using project, case, and task for the respective type IDs. Omit a condition to leave that type unrestricted.

  6. Place specific rules before a general default rule. FSM uses the first matching rule.

  7. Retain every existing selection rule that must continue to apply. Review the complete replacement array in Preview.

  8. Validate the revised JSON.

  9. Save the revised configuration.

  10. Activate the revised configuration while retaining the previous version as an inactive record.

  11. Check the saved task's Billing Rule.

  12. Check the Billable values on the applicable related records.

Preview does not confirm that rule selection works.

This illustrative fragment selects Billing Rule 1 for Task Type 205 under Case Type 104:

Note:

Replace the Billing Rule, Case Type, and Task Type IDs with the IDs required in your account.

            {
  "billing": {
    "task": [
      { "case": [104], "task": [205], "billing": 1 }
    ]
  }
} 

          

Merge the fragment into the existing configuration. The fragment is not a complete account configuration and replaces all existing billing.task entries.

For arrays of allowed type IDs and conditions for populated and empty values, see Shared Rule Matching.

Important:

Automatic selection is ongoing sourcing. With a Task Type selected, changes to Task Type, Case, or Project retrigger selection and replace a manually selected Billing Rule. When selection runs and no rule matches, the Billing Rule is cleared. Include an appropriate general rule if unmatched typed tasks should receive a default option.

Add a Billing Rule Option

Add the choice before using its internal ID in selection criteria or formulas. Use the existing Field Service Billing Type list.

To add a billing rule option:

  1. Go to Customization > Lists, Records, & Fields > Lists.

  2. On the Custom Lists page, click Field Service Billing Type. Confirm that its ID is customlist_nx_billing_type.

  3. On the Values subtab, enter a label for the added option without changing existing options. Save the list.

  4. Reopen the list and record the added value's Internal ID. Use the value's ID, rather than the list's ID or the number written in its label.

  5. Define the intended consumable, time-entry, and expense-line outcomes. Update the applicable formulas as described in Change Billable Results and Price Levels.

  6. If the option should be selected automatically, reference its internal ID in billing.task.

For general list maintenance, see Custom Lists. For information about viewing list-value internal IDs, refer to General Prerequisites for Creating a Connection.

Change Billable Results and Price Levels

The standard definitions use SQL Formula Text mappings with server-side template tags. ${ task.billing } supplies the task's selected option ID. The item and category filters restrict each search to the current related record's item or category.

To change billable results and price levels:

  1. Go to Field Service > Administration > Configuration.

  2. Prepare an inactive copy of the current configuration.

  3. Open the inactive copy in edit mode.

  4. Inspect the effective billing.consumable, billing.time, and billing.expense definitions, including existing account changes.

  5. In the Editor, edit each relevant map formula. Retain outcomes for other options and the current-record restrictions: ${ consumable.item }, ${ time.item }, and ${ expense.category }.

  6. Return 'F' for a nonbillable result or 'T' for a billable result using the standard definitions.

  7. (Optional) For billable consumables or time entries, confirm the pricing prerequisites and item pricing for the intended level. Return the price-level internal ID as text instead of 'T'.

    A result of '3' means price-level ID 3, not a rate of $3.

  8. Keep expense billing as a Boolean result. The calculation updates each line's Billable box without setting a price level or expense amount.

  9. Validate the revised JSON and review the merged configuration in Preview.

  10. Save the revised configuration.

  11. Activate the revised configuration while retaining the previous version as an inactive record.

For reusable SQL mapping and tag syntax, see FSM Searches and Field Mapping and FSM Expressions and Template Tags.

Example: A New Option With Consumable Pricing

Assume the added Billing Rule has internal ID 109. It should make consumables billable at price-level ID 3, with time and expenses nonbillable.

This fragment changes only the three Formula Text maps inside the standard definitions. The standard search records, filters for items and categories, and result handling remain inherited. Inspect the merged definitions if your account already customizes these definitions.

Note:

Replace Billing Rule ID 109 and price-level ID 3 with valid IDs from your account.

              {
  "billing": {
    "consumable": {
      "item": {
        "map": "formulatext:case when ${ task.billing } in (5,6,7,8) then 'F' when ${ task.billing } = 109 then '3' else 'T' end"
      }
    },
    "time": {
      "item": {
        "map": "formulatext:case when ${ task.billing } in (3,4,7,8,109) then 'F' else 'T' end"
      }
    },
    "expense": {
      "category": {
        "map": "formulatext:case when ${ task.billing } in (2,4,6,8,109) then 'F' else 'T' end"
      }
    }
  }
} 

            

The fragment preserves the standard outcomes for options 1 through 8. Before applying it, preserve any additional formula branches specific to your account. Select the added option manually or add its automatic-selection criteria separately.

Pricing and Processing Dependencies

FSM applies consumable and time pricing through price levels. Without a numeric billable formula result, the pricing paths use customer pricing or default pricing. For a consumable without a customer, the fallback is List Price (1). For a consumable, a Custom price-level result (-1) is stored as a blank Price Level. A blank value does not mean that downstream pricing is absent.

For time-entry rate sourcing, retain the Customer/Project relationship used by customer and service-item pricing. With no Customer/Project entity, the FSM pricing path uses List Price and a blank calculated rate. If you use Charge-Based Billing, time-based charge rules override changes made directly on time transactions. For more information, see Time & Expenses Accounting Preferences.

Changing a displayed field or its initial value does not prevent billing validation from replacing Billable or sourcing pricing. Preserve the required task links and record-model mappings. For more information, see FSM Record Model Configuration. Expense evaluation also depends on the views/expensereport/billing handler. For more information, see FSM NetSuite View Configuration.

The root billing settings apply to existing related-record processing without requiring a copied or added resource for FSM Mobile. The Sales Order tab in FSM Mobile does not use these settings. For more information, see Deciding Between the Consumables and Sales Order Tabs.

Consumable sales-order creation and fulfillment have separate controls. See FSM Consumable Processing and Configuring FSM Consumable Processing. Setting Billable to false gives the consumable's sales-order line a zero rate when the line is added. This setting does not prevent line creation.

When Billing Changes Apply

Changing configuration or a Billing Rule does not recalculate every related record immediately. Billable results and prices are evaluated during the applicable record's validation or save. That evaluation can replace a manually entered Billable value.

Editing a consumable already processed onto a sales order does not update its existing sales order line through this billing validation. Task completion and consumable transaction processing are separate operations. For more information, see FSM Consumable Processing.

See FSM Script Reference for processing behavior.

For performance measurement and data capture, see FSM Performance and Data Collection.

The following table lists the fields that billing evaluation updates.

Record

Fields

Consumable

Billable (custrecord_nx_consbillable) and, with Multiple Prices, Price Level (custrecord_nx_consprice_level).

Time bill

Billable (isbillable) and, with the pricing prerequisites, Price Level (price) and Rate (rate).

Expense report

Billable on each affected expense line (expense.isbillable).

Disabling Automatic Selection

Set billing.task to [] to turn off automatic rule selection. Later validation can clear the selected Billing Rule on a typed task. This configuration change does not immediately update every task. Billable evaluation through billing.time, billing.expense, and billing.consumable remains separate.

Removing a custom property restores its inherited value. Changed rules apply during subsequent applicable validation and processing. These changes do not reverse Billable values, prices, rates, or transactions already written.

Related Topics

General Notices