---
id: change/bcapps/12539
type: change
title: "#12539 Add Expense Agent consumption V2 and trial support"
summary: Expense Agent adds a V2 consumption API and a 50-expense feature trial, with trial status in the billing overview and remaining free expenses in setup. Quota checks go through an internal interface so tests can inject a mock, and telemetry now logs a static message with selected metadata dimensions instead of the raw request.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - page expense user cons. api
  - page ea billing overview
  - table expense agent env. consumption
  - interface expense agent quota
  - codeunit expense agent quota impl.
  - codeunit expense consumption handler
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-28T10:56:15.279Z"
  flags: []
generated:
  at: "2026-11-03T00:16:51.180Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 6c85fdb57aa3ebd7566ab0269f81afb7123d1143
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12539
    title: "microsoft/BCApps#12539: Add Expense Agent consumption V2 and trial support"
    date: "2026-10-26"
    commit: 6c85fdb57aa3ebd7566ab0269f81afb7123d1143
    t: null
    quote: Add the Expense Agent V2 consumption API and a 50-expense feature trial.
links:
  learn: []
  objects:
    - object/page/6968
    - object/page/7079
    - object/table/6969
    - object/interface/expense-agent-quota
    - object/codeunit/6913
    - object/codeunit/6969
    - object/permissionset/6952
    - object/permissionset/6904
    - object/page/6991
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/tenant-admin-center-manage-consumption-billing
      title: Manage consumption-based billing
      label: possibly related
      why: Documents consumption-based billing model for Expense Agent capabilities that this change implements.
      by: model
number: 12539
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12539
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-26T22:29:26Z"
author: encimita
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 13
  additions: 1045
  deletions: 42
  al: 9
apps:
  - ExpenseAgent
objects_touched:
  - key: page/6968
    page: page/6968
    type: page
    id: 6968
    name: Expense User Cons. API
    app: ExpenseAgent
    status: modified
  - key: page/7079
    page: page/7079
    type: page
    id: 7079
    name: EA Billing Overview
    app: ExpenseAgent
    status: modified
  - key: table/6969
    page: table/6969
    type: table
    id: 6969
    name: Expense Agent Env. Consumption
    app: ExpenseAgent
    status: modified
  - key: interface/expense agent quota
    page: interface/expense-agent-quota
    type: interface
    id: null
    name: Expense Agent Quota
    app: ExpenseAgent
    status: added
  - key: codeunit/6913
    page: codeunit/6913
    type: codeunit
    id: 6913
    name: Expense Agent Quota Impl.
    app: ExpenseAgent
    status: added
  - key: codeunit/6969
    page: codeunit/6969
    type: codeunit
    id: 6969
    name: Expense Consumption Handler
    app: ExpenseAgent
    status: modified
  - key: permissionset/6952
    page: permissionset/6952
    type: permissionset
    id: 6952
    name: Expense Agent - Objects
    app: ExpenseAgent
    status: modified
  - key: permissionset/6904
    page: permissionset/6904
    type: permissionset
    id: 6904
    name: Expense Management - Objects
    app: ExpenseAgent
    status: modified
  - key: page/6991
    page: page/6991
    type: page
    id: 6991
    name: Expense Agent Setup Wizard
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 13311
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/13311
fixes_issues: []
work_items:
  - 653453
systems:
  - copilot
quote: Add the Expense Agent V2 consumption API and a 50-expense feature trial.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #12539 Add Expense Agent consumption V2 and trial support

> Expense Agent adds a V2 consumption API and a 50-expense feature trial, with trial status in the billing overview and remaining free expenses in setup. Quota checks go through an internal interface so tests can inject a mock, and telemetry now logs a static message with selected metadata dimensions instead of the raw request.

[Pull request](https://github.com/microsoft/BCApps/pull/12539) · merged into `main` (BC30) on 2026-10-26 by encimita · 13 files (+1045 -42), 9 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- V2 consumption API validates nested v1 fields and required identifiers and rejects null usage values
- 50-expense trial; policy-evaluation operations do not count toward trial usage
- Trial status shown in billing overview and remaining free expenses in setup wizard
- Saved trial classification is preserved on retries, and consumption is allowed when trial quota is available
- Internal quota interface with a default production implementation and test injection
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 6968 "Expense User Cons. API"](../../objects/page/6968.md), ExpenseAgent: modified
- [Page 7079 "EA Billing Overview"](../../objects/page/7079.md), ExpenseAgent: modified
- [Table 6969 "Expense Agent Env. Consumption"](../../objects/table/6969.md), ExpenseAgent: modified
- [Interface "Expense Agent Quota"](../../objects/interface/expense-agent-quota.md), ExpenseAgent: added
- [Codeunit 6913 "Expense Agent Quota Impl."](../../objects/codeunit/6913.md), ExpenseAgent: added
- [Codeunit 6969 "Expense Consumption Handler"](../../objects/codeunit/6969.md), ExpenseAgent: modified
- [Permission set 6952 "Expense Agent - Objects"](../../objects/permissionset/6952.md), ExpenseAgent: modified
- [Permission set 6904 "Expense Management - Objects"](../../objects/permissionset/6904.md), ExpenseAgent: modified
- [Page 6991 "Expense Agent Setup Wizard"](../../objects/page/6991.md), ExpenseAgent: modified

## Also merged into

- [#13311](https://github.com/microsoft/BCApps/pull/13311) into `releases/29.x` on 2026-11-02

## Context

- Work items: AB#653453
- Labels: AL: Apps (W1), Team: Finance
- Systems: copilot
- From the description: "Add the Expense Agent V2 consumption API and a 50-expense feature trial."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Manage consumption-based billing](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/tenant-admin-center-manage-consumption-billing) — possibly related: Documents consumption-based billing model for Expense Agent capabilities that this change implements. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
