---
id: object/table/6930
type: object
title: Table 6930 "Expense Agent Setup"
summary: Table 6930 "Expense Agent Setup" in ExpenseAgent (Microsoft.ExpenseAgent). 76 fields, 29 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - expenseagent
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: 7df769f3889e8ae9d0f06c7e0379a4e9e8999147e2c0666eaeaa5e344b1ba775
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/Setup/Tables/ExpenseAgentSetup.Table.al
    title: src/Apps/W1/ExpenseAgent/app/src/Setup/Tables/ExpenseAgentSetup.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-agent
    - https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-per-diem-mileage
    - https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-setup
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/expense-management-preview/set-up-expense-management
    - topic/business-central/business-functionality/expense-management-preview/understand-expense-agent
    - topic/business-central/copilot-and-agent-capabilities/expense-agent-preview/expense-agent-overview
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10825
    - change/bcapps/10956
    - change/bcapps/10312
    - change/bcapps/10675
    - change/bcapps/10631
    - change/bcapps/10031
    - change/bcapps/9859
object_type: table
object_id: 6930
name: Expense Agent Setup
namespace: Microsoft.ExpenseAgent
app: ExpenseAgent
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: 76
  procedures: 37
  events: 0
  subscribers: 0
relations:
  out: 4
  referenced_by: 1
  pages: 4
  extended_by: 0
  event_subscribers: 2
  calls: 12
  called_by: 0
  implements: 0
---

# Table 6930 "Expense Agent Setup"

> Table 6930 "Expense Agent Setup" in ExpenseAgent (Microsoft.ExpenseAgent). 76 fields, 29 public procedures. Introduced in BC29, still in BC30.

ExpenseAgent · Microsoft.ExpenseAgent · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/ExpenseAgent/app/src/Setup/Tables/ExpenseAgentSetup.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 6996 "Expense Agent Setup"](../page/6996.md) (3 Learn pages).

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Extensible | false |
| DataClassification | CustomerContent |
| Permissions | tabledata "Expense Agent Setup" = ri |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Primary Key | Code[10] | — |  |
| 2 | Expense Reports Nos. | Code[20] | Specifies the number series used to create new expense reports. | TableRelation No. Series |
| 3 | Posted Expense Reports Nos. | Code[20] | Specifies the number series used for posted expense reports. | TableRelation No. Series |
| 4 | Expense Nos. | Code[20] | Specifies the number series used to create expenses. | TableRelation No. Series |
| 5 | Use Rules | Boolean | Specifies whether configured expense management rules are applied. |  |
| 6 | Enable Agent | Boolean | Specifies whether the agent is enabled to process expense submissions from email and calendar. |  |
| 7 | Exchange Rate for Expenses | Enum "Expense Exchange Rate" | Specifies which exchange rate to use when converting foreign currency expenses. | enum [Enum 6904 "Expense Exchange Rate"](../enum/6904.md) |
| 8 | Do Not Allow Exp. Older Than | DateFormula | Specifies a date formula; expenses older than the resulting date are not allowed. |  |
| 9 | If Exp. Is Older Than Allowed | Enum "Expense Age Handling" | Specifies how the system handles expenses older than the allowed date: warn, require justification, or block submission. | enum [Enum 6982 "Expense Age Handling"](../enum/6982.md) |
| 10 | Allow Prepayment-Cash Advance | Boolean | Specifies whether prepayments and cash advances are allowed. |  |
| 11 | Allow Grp. of Trans. in Report | Boolean | Specifies whether similar transactions are grouped together in expense reports. |  |
| 12 | Exp. Report Rounding Precision | Decimal | Specifies the rounding precision for amounts in expense reports. | obsolete Pending 29.0 |
| 13 | Expense Report Rounding Type | Enum "Expense Report Rounding Type" | Specifies how amounts are rounded: nearest, up, or down. | obsolete Pending 29.0; #if not CLEANSCHEMA29; enum [Enum 6987 "Expense Report Rounding Type"](../enum/6987.md) |
| 14 | Check Category/SubCat. Usage | Boolean | Specifies whether both category and subcategory are required on each expense. |  |
| 15 | Create Exp. Rep. Automatically | Boolean | Specifies whether the system automatically creates expense reports according to the selected frequency. |  |
| 16 | When to Create Expense Reports | Enum "Expense Report Frequency" | Specifies how often the system automatically creates expense reports, for example daily or weekly. | enum [Enum 6906 "Expense Report Frequency"](../enum/6906.md) |
| 17 | Custom Report Creation Formula | DateFormula | Specifies a custom date formula used when creating expense reports automatically. |  |
| 18 | Communication Channel | Enum "Expense Communication Channel" | Specifies the communication channel used to send expense notifications. | enum [Enum 6900 "Expense Communication Channel"](../enum/6900.md) |
| 19 | System Communication Channel | Text[100] | Specifies the identifier or email address used as the system communication channel. |  |
| 20 | Approval Reminder After | DateFormula | Specifies how long to wait before sending approval reminders for pending expense reports. |  |
| 21 | Standard Rate of Mileage | Decimal | Specifies the default mileage reimbursement rate. |  |
| 22 | Full Per-Diem Calculation | Enum "Exp. Full Per Diem Calculation" | Specifies the rule used to calculate full per diem, for example by calendar day or by hours. | enum [Enum 6913 "Exp. Full Per Diem Calculation"](../enum/6913.md) |
| 23 | Per Diem Rounding Precision | Decimal | Specifies the rounding precision for per diem amounts. | obsolete Pending 29.0 |
| 24 | Minimum Hours for Per Diem | Decimal | Specifies the minimum number of hours required to qualify for per diem. |  |
| 25 | Partial Day Rules | Enum "Expense Partial Day Rules" | Specifies how per diem for partial days is determined. | enum [Enum 6915 "Expense Partial Day Rules"](../enum/6915.md) |
| 26 | Reduction for Breakfast % | Decimal | Specifies the percentage deducted from the per diem when breakfast is provided. |  |
| 27 | Reduction for Lunch % | Decimal | Specifies the percentage deducted from the per diem when lunch is provided. |  |
| 28 | Reduction for Dinner % | Decimal | Specifies the percentage deducted from the per diem when dinner is provided. |  |
| 29 | Time Tolerance for Calendar | Decimal | Specifies the allowed time deviation when matching calendar events to expenses. |  |
| 30 | Enable Anti-Corp. Statement | Boolean | Specifies whether users must confirm an anti-corruption attestation before submitting expenses. |  |
| 31 | Evaluate Policies | Boolean | Specifies whether the agent automatically evaluates expenses against the configured policies. This feature consumes additional AI credits. | DataClassification SystemMetadata |
| 32 | Submitter-run Evaluation | Boolean | Specifies whether submitters can preventively run policy evaluation before submitting expense reports. This evaluation will consume additional AI credits. | DataClassification SystemMetadata |
| 34 | Expense User Nos. | Code[20] | Specifies the number series for creating individual Expense Users. | TableRelation No. Series |
| 35 | Expense Vendor Nos. | Code[20] | Specifies the number series used when creating Expense Vendor records for accountant review. | TableRelation No. Series |
| 37 | Min Hours for Partial Per Diem | Decimal | Specifies the minimum number of hours required to qualify for a partial per diem. |  |
| 38 | Percentage For Partial Day | Decimal | Specifies the percentage of the full per diem to apply for partial days. |  |
| 39 | Receipt No. Mandatory | Boolean | Specifies whether a receipt number is mandatory for expenses. |  |
| 40 | Merchant Name Mandatory | Boolean | Specifies whether a merchant name is mandatory for expenses. |  |
| 41 | Default Mileage UOM | Code[10] | Specifies the default unit of measure for mileage. | TableRelation [Table 204 "Unit of Measure"](../table/204.md) (Unit of Measure) |
| 42 | Only Shortest Route | Boolean | Specifies whether only the shortest route is shown for mileage expenses. When enabled, alternative routes are not displayed on the map and only the shortest route is used for distance calculation. |  |
| 52 | User Security ID | Guid | — | DataClassification SystemMetadata |
| 53 | Email Account ID | Guid | — | DataClassification SystemMetadata |
| 54 | Email Connector | Enum "Email Connector" | — | enum Email Connector; DataClassification SystemMetadata |
| 60 | Email Address | Text[250] | Specifies the email address used by the agent. |  |
| 61 | Email Folder | Text[2048] | Specifies the email folder the agent monitors. |  |
| 62 | Email Folder Id | Text[2048] | Specifies the unique identifier of the email folder the agent monitors. | DataClassification SystemMetadata |
| 76 | Open Report Notif. Freq. | Enum "Expense Report Frequency" | Specifies how often the system should send notifications for open expense reports (Daily, Weekly, etc.). | enum [Enum 6906 "Expense Report Frequency"](../enum/6906.md) |
| 80 | Enable Approval Workflow | Boolean | Specifies whether expense reports use the traditional approval workflow instead of the Expense Agent approval experience. |  |
| 81 | Day of Week | Enum "Day of Week" | Specifies the day of the week used when expense reports are created weekly. | enum [Enum 6917 "Day of Week"](../enum/6917.md) |
| 82 | Day In A Month | Integer | Specifies the day of the month used when expense reports are created monthly. |  |
| 83 | Expense Report Grouping | Enum "Expense Reports Grouping" | Specifies how expense reports are grouped when they are created automatically. | enum [Enum 6916 "Expense Reports Grouping"](../enum/6916.md) |
| 84 | Enable Open Report Notif. | Boolean | Specifies whether the system sends periodic notifications for open expense reports. Notifications are only sent when a mailbox is configured. |  |
| 85 | Notif. Day of Week | Enum "Day of Week" | Specifies the day of the week for weekly open report notifications. | enum [Enum 6917 "Day of Week"](../enum/6917.md) |
| 86 | Notif. Day In A Month | Integer | Specifies the day of the month for monthly open report notifications. |  |
| 87 | Custom Notif. Formula | DateFormula | Specifies a custom date formula to use for open report notification scheduling. |  |
| 88 | Enable Approval Notif. | Boolean | Specifies whether the system sends email notifications when expense reports are submitted, approved, or rejected. Notifications are only sent when an email account is configured. | DataClassification SystemMetadata |
| 89 | Enable Email with Receipts | Boolean | Specifies whether the agent reads its mailbox and processes incoming emails containing expense receipts. Receipts are only processed when a mailbox is configured. | DataClassification SystemMetadata |
| 90 | Posting Groups Applied | Boolean | Specifies whether the default expense posting groups (including the employee posting group) have been created. | not editable; DataClassification SystemMetadata |
| 91 | Exp. Categories Applied | Boolean | Specifies whether the default expense categories and subcategories have been created. | not editable; DataClassification SystemMetadata |
| 92 | Exp. Locations Applied | Boolean | Specifies whether the default expense locations have been created. | not editable; DataClassification SystemMetadata |
| 93 | Management Rules Applied | Boolean | Specifies whether the default management rules have been created. | not editable; DataClassification SystemMetadata |
| 94 | Payment Methods Applied | Boolean | Specifies whether the default expense payment methods (Card, Cash, Bank) have been created. | not editable; DataClassification SystemMetadata |
| 95 | No. Series Applied | Boolean | Specifies whether the default number series for expenses, expense users, expense reports, and posted expense reports have been created. | not editable; DataClassification SystemMetadata |
| 96 | Noreply Email Account ID | Guid | — | DataClassification SystemMetadata |
| 97 | Noreply Email Connector | Enum "Email Connector" | — | enum Email Connector; DataClassification SystemMetadata |
| 98 | Noreply Email Address | Text[250] | Specifies the noreply email address used for outgoing messages. If empty, the main email account is used. | DataClassification SystemMetadata |
| 100 | Default Approver No. | Code[20] | Specifies the expense user who by default is set as approver. | TableRelation [Table 6923 "Expense User"](../table/6923.md) (Expense User) |
| 101 | Default Approver Name | Text[100] | Specifies the name of the expense user who by default is set as approver. | FlowField: lookup("Expense User".Name where("No." = field("Default Approver No."))); not editable |
| 102 | Create Emp. for Expense Users | Boolean | Specifies whether Employees should be automatically created from Expense Users when no matching Employee exists. Employees and their connection with Expense Users are critical for correct processing and posting in Expense Agent, but this setting may impact your HR data. |  |
| 103 | Default VAT Bus. Posting Group | Code[20] | Specifies the default VAT Business Posting Group for expense transactions. | TableRelation [Table 323 "VAT Business Posting Group"](../table/323.md) (VAT Business Posting Group) |
| 104 | Allow VAT Reclaim | Boolean | Specifies whether VAT reclaim is allowed on expenses. |  |
| 105 | VAT Rates Applied | Boolean | Specifies whether the default VAT rates have been applied. | not editable; DataClassification SystemMetadata |
| 120 | Enable Project Fields | Boolean | Specifies whether project and project task fields are visible in the expense web app for submitters. |  |
| 121 | Project Visibility | Enum "Expense Project Visibility" | Specifies which projects are visible to submitters: only projects assigned to the user, or all active projects. | enum [Enum 6983 "Expense Project Visibility"](../enum/6983.md) |
| 122 | Enable Communication | Boolean | Specifies whether the agent sends outgoing emails to users: welcome emails, reimbursement notifications, approval updates, and unsubmitted-report reminders. Turn this off to stop all outgoing emails. Incoming receipt processing is controlled separately. | DataClassification SystemMetadata |
| 150 | Use Canary Endpoint | Boolean | Specifies whether Expense Agent service calls from this environment are routed to the canary endpoint. | not editable; DataClassification SystemMetadata |

## Keys

- PK: Primary Key (clustered)

## Trigger event subscribers

- OnAfterValidateEvent(Email Account ID): [Codeunit 6968 "Expense Audit Subscribers"](../codeunit/6968.md) OnAfterValidateEmailAccountId
- OnAfterValidateEvent(Enable Agent): [Codeunit 6968 "Expense Audit Subscribers"](../codeunit/6968.md) OnAfterValidateEnableAgent

## Procedures

- `ShouldScheduleAgentTask(AgentEnabled: Boolean): Boolean` (internal): Returns whether the agent background task should be scheduled for the current setup. The task runs when the agent is enabled and there is work with a usable account: inbound receipt processing (receipts on + a mailbox) or outbound communication (welcome/reimbursement/approval/reminders on + a norepl...
- `IsOutgoingCommunicationConfigured(): Boolean` (internal): Returns whether outgoing communication is fully configured: the master toggle is on and a no-reply sender account is set. Outbound emails (welcome, reimbursement, approval, reminders) are only sent from the no-reply account; there is no fallback.
- `RemoveAllScheduledTasks()` (internal)
- `ClearMailboxAndDependents()` (internal)
- `AssistEditNoreplyMailbox()` (internal)
- `AssistEditMailbox()` (internal)
- `GetFeatureName(): Text` (internal)
- `LogAgentEnabledTelemetry()` (internal)
- `LogAgentDisabledTelemetry()` (internal)
- `ValidateIncomingMailboxAccess(): Boolean` (internal)
- `ValidateNoreplyMailboxAccess(): Boolean` (internal)
- `CheckIncomingMailboxAccessOrError()` (internal)
- `CheckNoreplyMailboxAccessOrError()` (internal)
- `CheckMailboxAccessOrError()` (internal)
- `CheckSchedulingMailboxAccessOrError()` (internal): Verifies the current user can access every mailbox the enabled features will use before the agent task is (re)scheduled: the receipts mailbox when incoming receipts are on, and the no-reply mailbox when outgoing communication is on. Each check is skipped when its feature is off or its account is uns...
- `ShowDeactivationAccessWarning(): Boolean` (internal)
- `InitRecord()` (internal)
- `GetRecordOnce()` (internal)
- `CreateNoSeriesDefaults()` (internal)
- `CreatePostingGroupsDefaults()` (internal)
- `GetRegisteredUsersText(): Text` (internal)
- `CreateExpenseCategoriesDefaults()` (internal)
- `CreateExpenseLocationsDefaults()` (internal)
- `CreateManagementRulesDefaults()` (internal)
- `CreateCountryVATRatesDefaults()` (internal)
- `CreatePaymentMethodsDefaults()` (internal)
- `CreateAccountingDefaults()` (internal)
- `CreateManagementDefaults()` (internal)
- `CreateDefaultSettings()` (internal)

Plus 8 local procedures.

## Relations

- Default Mileage UOM: TableRelation [Table 204 "Unit of Measure"](../table/204.md)
- Default VAT Bus. Posting Group: TableRelation [Table 323 "VAT Business Posting Group"](../table/323.md)
- Default Approver Name: CalcFormula [Table 6923 "Expense User"](../table/6923.md)
- Default Approver No.: TableRelation [Table 6923 "Expense User"](../table/6923.md)

## Referenced by

1 fields in 1 objects relate to this table (TableRelation or CalcFormula).

- [Table 6943 "Expense Agent Access Control"](../table/6943.md): Setup System ID

## Pages and codeunits on this table

- [Page 6942 "Expense Agent Setup API"](../page/6942.md) (source table)
- [Page 6991 "Expense Agent Setup Wizard"](../page/6991.md) (source table)
- [Page 6994 "Exp. Per Diem Partial Settings"](../page/6994.md) (source table)
- [Page 6996 "Expense Agent Setup"](../page/6996.md) (source table)
- [Codeunit 6936 "EA Agent Error Handler"](../codeunit/6936.md) (codeunit runs on it)
- [Codeunit 6937 "EA Agent Recovery"](../codeunit/6937.md) (codeunit runs on it)
- [Codeunit 6938 "EA Agent Dispatcher"](../codeunit/6938.md) (codeunit runs on it)
- [Codeunit 6940 "EA Retrieve Emails"](../codeunit/6940.md) (codeunit runs on it)
- [Codeunit 6942 "EA Mailbox Access"](../codeunit/6942.md) (codeunit runs on it)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 6942 "EA Mailbox Access"](../codeunit/6942.md) (8 calls: `CheckSelectedIncomingMailboxAccessOrError → (object)`, `CheckSelectedIncomingMailboxAccessOrError → SetTestAccount`, `CheckSelectedNoreplyMailboxAccessOrError → (object)`, …)
- [Codeunit 6972 "Create Expense No. Series"](../codeunit/6972.md) (6 calls: `CreateNoSeriesDefaults → (object)`, `CreateNoSeriesDefaults → ExpenseNoSeries`, `CreateNoSeriesDefaults → ExpenseReportNoSeries`, …)
- [Codeunit 6973 "Create Expense Categories"](../codeunit/6973.md) (4 calls: `CreateExpenseCategoriesDefaults → InsertDefaultExpenseCategories`, `CreateExpenseLocationsDefaults → InsertDefaultExpenseLocations`, `CreateManagementRulesDefaults → InsertDefaultManagementRules`, …)
- [Codeunit 6970 "Create Expense Agent Setup"](../codeunit/6970.md) (2 calls: `CreatePaymentMethodsDefaults → CreateDefaultPaymentMethods`, `CreatePostingGroupsDefaults → (object)`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `LogAgentDisabledTelemetry → LogUptake`, `LogAgentEnabledTelemetry → LogUptake`)
- [Page 8886 "Email Account Wizard"](../page/8886.md) (2 calls: `AssistEditMailbox → (object)`, `AssistEditNoreplyMailbox → (object)`)
- [Codeunit 4324 "Agent Setup"](../codeunit/4324.md) (1 call: `GetAgentConfiguredByName → GetSetupRecord`)
- [Codeunit 457 "Environment Information"](../codeunit/457.md) (1 call: `RaiseHttpClientErrorIfBlocked → IsSandbox`)
- [Codeunit 6935 "EA Agent Scheduler"](../codeunit/6935.md) (1 call: `RemoveAllScheduledTasks → RemoveAgentTask`)
- [Codeunit 6971 "Create Expense GL Account"](../codeunit/6971.md) (1 call: `CreatePostingGroupsDefaults → (object)`)
- [Codeunit 6975 "Create Expense VAT Rates"](../codeunit/6975.md) (1 call: `CreateCountryVATRatesDefaults → InsertDefaultRates`)
- [Codeunit 8894 "Email Account"](../codeunit/8894.md) (1 call: `CheckMailboxExists → GetAllAccounts`)

## Recent changes

- 2026-09-15 [#10825 [Master]-Bug 645041: Expense Agent - Rename Enable approval workflow caption and tooltip](../../changes/bcapps/10825.md) (main, BC30, fix)
- 2026-09-04 [#10956 [ExpenseAgent] Refactor agent setup for policies](../../changes/bcapps/10956.md) (main, BC30, feature)
- 2026-08-31 [#10312 Update expense VAT specification source](../../changes/bcapps/10312.md) (main, BC30, feature)
- 2026-08-27 [#10675 Temporarily suppress AS0072 (ObsoleteTag 29.0) on 10 Base App elements for v30 prep](../../changes/bcapps/10675.md) (main, BC30, fix)
- 2026-08-26 [#10631 Integration/main to releases 29.x 31a860b5](../../changes/bcapps/10631.md) (releases/29.x, BC29, feature)
- 2026-08-21 [#10031 Add AI-assisted policy evaluation backend to Expense Agent](../../changes/bcapps/10031.md) (main, BC30, feature)
- 2026-08-04 [#9859 [Master] - Move Expense Agent (Preview) app into BCApps](../../changes/bcapps/9859.md) (main, BC30, feature, added)

## Across versions

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

## Deprecations

- field Exp. Report Rounding Precision: Pending 29.0, "This field is no longer required and will be removed in a future release."
- field Expense Report Rounding Type: Pending 29.0 (#if not CLEANSCHEMA29), "This field is no longer required and will be removed in a future release."
- field Per Diem Rounding Precision: Pending 29.0, "This field is no longer required and will be removed in a future release."

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). The call sections above are our own, per object, from the BC29 call graph. 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: "table", object_name: "Expense Agent Setup")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
