---
id: object/codeunit/3345
type: object
title: Codeunit 3345 "PA Work Item Intake"
summary: Codeunit 3345 "PA Work Item Intake" in PayablesAgent (Microsoft.Agent.PayablesAgent). 3 public procedures. Introduced in BC30.
tier: official
language: en
tags:
  - codeunit
  - payablesagent
versions:
  introduced: "30"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-12-01T01:00:51.425Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 56bbc7208aa00cf353b1a2208da4d90a98a6f6fa5111087dfb626b26499c922e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671/src/Apps/W1/PayablesAgent/app/Flows/Intake/PAWorkItemIntake.Codeunit.al
    title: src/Apps/W1/PayablesAgent/app/Flows/Intake/PAWorkItemIntake.Codeunit.al (main)
    date: null
    commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/13361
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/payables-agent
      title: Payables Agent Overview in Business Central
      label: possibly related
      why: Processes incoming vendor invoices and credit notes from email
      by: model
object_type: codeunit
object_id: 3345
name: PA Work Item Intake
namespace: Microsoft.Agent.PayablesAgent
app: PayablesAgent
extends: null
first_version: "30"
last_version: "30"
present_in:
  - "30"
changed_in: []
source_major: "30"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 3
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 9
  called_by: 3
  implements: 0
---

# Codeunit 3345 "PA Work Item Intake"

> Codeunit 3345 "PA Work Item Intake" in PayablesAgent (Microsoft.Agent.PayablesAgent). 3 public procedures. Introduced in BC30.

PayablesAgent · Microsoft.Agent.PayablesAgent · BC30 · [source at f53bb0f1](https://github.com/microsoft/BCApps/blob/f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671/src/Apps/W1/PayablesAgent/app/Flows/Intake/PAWorkItemIntake.Codeunit.al) · facts from BC30

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata Agent = R, tabledata "Agent Task" = R, tabledata "PA Known Sender" = R |

## Procedures

- `ReceivePdf(FileName: Text; PdfInStream: InStream): Guid` (internal)
- `ReceivePdf(FileName: Text; PdfInStream: InStream; var WorkItem: Codeunit "PA Work Item"): Boolean` (internal)
- `Admit(var WorkItem: Codeunit "PA Work Item"): Boolean` (internal)

## Calls

From the extracted call graph of BC30 (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 3341 "PA Work Item"](../codeunit/3341.md) (12 calls: `Admit → AssociateAgentTask`, `Admit → GetAgentTaskExternalId`, `Admit → GetAgentTaskId`, …)
- [Codeunit 3318 "PA Trial"](../codeunit/3318.md) (4 calls: `Admit → CheckActiveAndEndIfExhausted`, `Admit → GetTrialInvoiceCount`, `Admit → GetTrialInvoiceLimit`, …)
- [Codeunit 3325 "PA Telemetry"](../codeunit/3325.md) (3 calls: `Admit → LogTrialTaskCreated`, `Admit → LogWorkItemAdmitted`, `Admit → LogWorkItemRejected`)
- [Codeunit 3333 "PA Draft Work Item Intake"](../codeunit/3333.md) (2 calls: `Admit → TryGetAgentTaskMessage`, `ReceivePdf → TryProcessIncomingWorkItem`)
- [Codeunit 3343 "PA Setup"](../codeunit/3343.md) (1 call: `Admit → FindAgentAndReconcileSetup`)
- [Codeunit 3349 "PA Agent Instructions"](../codeunit/3349.md) (1 call: `Admit → EnsureAgentInstructionsMatchConfiguration`)
- [Codeunit 3351 "PA Known Senders"](../codeunit/3351.md) (1 call: `Admit → ShouldRequestReview`)
- [Codeunit 4315 "Agent Task Builder"](../codeunit/4315.md) (1 call: `Admit → Initialize`)
- [Codeunit 4316 "Agent Task Message Builder"](../codeunit/4316.md) (1 call: `Admit → Initialize`)

## Called by

- [Codeunit 3312 "PA Draft Based Subscribers"](../codeunit/3312.md) (1 call: `ImportStepOfEDocumentCompleted → Admit`)
- [Codeunit 3326 "PA Test Fixtures"](../codeunit/3326.md) (1 call: `EnsureActivatedAndReceivePdf → ReceivePdf`)
- [Codeunit 3344 "PA Setup Update"](../codeunit/3344.md) (1 call: `ProcessTrialUploadIfPending → ReceivePdf`)

## Recent changes

- 2026-11-14 [#13361 Foundation for Payables Agent V2.0](../../changes/bcapps/13361.md) (main, BC30, refactor, added)

## Across versions

- Present in: BC30
- Changed (declaration) in: none

## Possibly related

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

- [Payables Agent Overview in Business Central](https://learn.microsoft.com/dynamics365/business-central/payables-agent) — possibly related: Processes incoming vendor invoices and credit notes from email (model-linked)

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 BC30 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: "codeunit", object_name: "PA Work Item Intake")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
