---
id: object/codeunit/8026
type: object
title: Codeunit 8026 "Process Usage Data Billing"
summary: Codeunit 8026 "Process Usage Data Billing" in Subscription Billing (Microsoft.SubscriptionBilling). 1 public procedures, 8 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - subscription billing
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 49cbee8b2165e79adb210b94fcdc9268dd4acaad7c5236e3ec2fbcc99a136b01
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Usage%20Based%20Billing/Codeunits/ProcessUsageDataBilling.Codeunit.al
    title: src/Apps/W1/Subscription Billing/app/Usage Based Billing/Codeunits/ProcessUsageDataBilling.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9293
    - change/bcapps/9876
    - change/bcapps/8553
object_type: codeunit
object_id: 8026
name: Process Usage Data Billing
namespace: Microsoft.SubscriptionBilling
app: Subscription Billing
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 21
  events: 8
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 8026 "Process Usage Data Billing"

> Codeunit 8026 "Process Usage Data Billing" in Subscription Billing (Microsoft.SubscriptionBilling). 1 public procedures, 8 events. Introduced in BC29, still in BC30.

Subscription Billing · Microsoft.SubscriptionBilling · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Usage%20Based%20Billing/Codeunits/ProcessUsageDataBilling.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Usage Data Import |

## Events published

- `OnBeforeProcessUsageDataBilling(UsageDataImport: Record "Usage Data Import")` (integration)
- `OnAfterProcessUsageDataBilling(UsageDataImport: Record "Usage Data Import")` (integration)
- `OnUsageBasedPricingElseCaseOnProcessSubscriptionLine(var UnitCost: Decimal; var NewServiceObjectQuantity: Decimal; var SubscriptionLine: Record "Subscription Line"; LastUsageDataBilling: Record "Usage Data Billing"; var IsHandled: Boolean)` (integration)
- `OnUsageBasedPricingElseCaseOnCalculateCustomerUsageDataBillingPrice(var UnitPrice: Decimal; var Amount: Decimal; var UsageDataBilling: Record "Usage Data Billing"; CustomerSubscriptionContract: Record "Customer Subscription Contract"; var IsHandled: Boolean)` (integration)
- `OnBeforeProcessSubscriptionLine(var SubscriptionLine: Record "Subscription Line")` (integration)
- `OnAfterProcessSubscriptionLine(var SubscriptionLine: Record "Subscription Line")` (integration)
- `OnBeforeCalculateUsageDataUnitPriceForPeriod(UnitPrice: Decimal; var ServiceCommitment: Record "Subscription Line"; var UsageDataBilling: Record "Usage Data Billing")` (integration): Raised before UnitPriceForPeriod is called in CalculateUsageDataPrices. Passes the UnitPrice that was calculated prior to the period scaling (for example, a tier-calculated per-unit price from GetSalesPriceForItem). Subscribers can observe this value and store it for later use. No code is skipped - ...
- `OnAfterCalculateUsageDataUnitPriceForPeriod(var UnitPrice: Decimal; var ServiceCommitment: Record "Subscription Line"; var UsageDataBilling: Record "Usage Data Billing")` (integration): Raised after the unit price for the billing period has been calculated via UnitPriceForPeriod. Subscribers can override UnitPrice with a custom value (for example, a price from a different source or price list).

## Procedures

- `SetRoundingPrecision(var RoundingPrecision: Decimal; UnitPrice: Decimal; Currency: Record Currency)` (internal)

Plus 12 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 8013 "Usage Data Import"](../table/8013.md)

## Recent changes

- 2026-09-25 [#9293 [Bug][SubscriptionBilling] Process Usage Data Billing uses lines marked Processing Status = Error (currency mismatch)](../../changes/bcapps/9293.md) (main, BC30, fix)
- 2026-07-31 [#9876 [Subscription Billing] Rename progress tracker](../../changes/bcapps/9876.md) (main, BC30, refactor)
- 2026-07-30 [#8553 [Bug][SubscriptionBilling]: Performance: Billing document creation does not scale to large datasets (4M+ subscription lines)](../../changes/bcapps/8553.md) (main, BC30, performance)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Process Usage Data Billing")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
