---
id: object/codeunit/4305
type: object
title: Codeunit 4305 "SOA Filters Impl."
summary: Codeunit 4305 "SOA Filters Impl." in SalesOrderAgent (Microsoft.Agent.SalesOrderAgent). 23 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - salesorderagent
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: 1fcee3e4914be5037bb08c5d8a099e54a0c5337636664f374391cd97237aab2d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al
    title: src/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.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/10842
    - change/bcapps/10411
    - change/bcapps/10302
    - change/bcapps/10036
    - change/bcapps/8875
object_type: codeunit
object_id: 4305
name: SOA Filters Impl.
namespace: Microsoft.Agent.SalesOrderAgent
app: SalesOrderAgent
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: 32
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 7
  implements: 0
---

# Codeunit 4305 "SOA Filters Impl."

> Codeunit 4305 "SOA Filters Impl." in SalesOrderAgent (Microsoft.Agent.SalesOrderAgent). 23 public procedures. Introduced in BC29, still in BC30.

SalesOrderAgent · Microsoft.Agent.SalesOrderAgent · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata Contact = m, tabledata "Agent Task Message" = r, tabledata "SOA Task Contact Override" = RIMD |

## Procedures

- `GetSecurityFiltersForCustomers(ContactsFilter: Text): Text` (internal)
- `GetSecurityFiltersForContacts(AgentTaskID: Integer): Text` (internal)
- `IsContactOverrideTrusted(SOATaskContactOverride: Record "SOA Task Contact Override"): Boolean` (internal): Determines whether an override belongs to an existing input message and was created and last modified by that message's configured owner or agent. Overrides affect security filters, contact lookup, and reply routing, so consumers must ignore rows that fail this provenance check.
- `GetExcludeAllFilter(): Text` (internal)
- `ShowMissingContactNotification(FromEmail: Text; ContactName: Text; TaskID: BigInteger; TaskMessageID: Guid)` (internal)
- `RecallMissingContactNotification()`
- `ShowDuplicateContactNotification(FromEmail: Text; ContactCount: Integer; TaskID: BigInteger; TaskMessageID: Guid)` (internal)
- `RecallDuplicateContactNotification()`
- `CreateContactFromEmail(MissingContactNotification: Notification)`
- `InvokeContactLinkFlow(ContactEmail: Text; ContactName: Text; TaskID: BigInteger; TaskMessageID: Guid)` (internal)
- `SelectContactAndSetOverride(TaskID: BigInteger; TaskMessageID: Guid): Boolean` (internal)
- `SelectMatchingContactAndSetOverride(ContactEmail: Text; TaskID: BigInteger; TaskMessageID: Guid): Boolean` (internal)
- `ClearContactOverride(TaskID: BigInteger; TaskMessageID: Guid): Boolean` (internal)
- `CreateContact(ContactEmail: Text; SenderName: Text): Boolean` (internal)
- `SelectContactAndUpdateEmail(ContactEmail: Text; TaskID: BigInteger; TaskMessageID: Guid): Boolean` (internal)
- `CanChangeContactMapping(TaskID: BigInteger; TaskMessageID: Guid): Boolean` (internal)
- `HandleUnknownSenderFromNotification(MissingContactNotification: Notification)` (internal)
- `HandleDuplicateContacts(DuplicateContactNotification: Notification)` (internal)
- `LearnMoreNotRegisteredEmail(MissingContactNotification: Notification)` (internal)
- `GetSafeFromEmailFilter(FromEmail: Text): Text` (internal)
- `ContactExistsByEmail(EmailAddress: Text): Boolean` (internal)
- `FindContactByEmail(var Contact: Record Contact; EmailAddress: Text; var ContactCount: Integer): Boolean` (internal)
- `FindContactByAlternateEmail(var Contact: Record Contact; EmailAddress: Text; var ContactCount: Integer): Boolean` (internal)

Plus 9 local procedures.

## 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 4400 "SOA Setup"](../codeunit/4400.md) (3 calls: `GetContactsInvolvedInTask → GetFeatureName`, `GetSecurityFiltersForCustomers → GetFeatureName`, `LogContactLinkChoice → GetFeatureName`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (3 calls: `GetContactsInvolvedInTask → LogError`, `GetSecurityFiltersForCustomers → LogUsage`, `LogContactLinkChoice → LogUsage`)
- [Page 5050 "Contact Card"](../page/5050.md) (1 call: `CreateContact → (object)`)

## Called by

- [Page 4404 "SOA Email Message"](../page/4404.md) (9 calls: `FindContact → FindContactByEmail`, `FindContact → IsContactOverrideTrusted`, `InvokeContactLinkFlow → InvokeContactLinkFlow`, …)
- [Codeunit 4306 "SOA Session Filter"](../codeunit/4306.md) (8 calls: `OnAfterInitPage → GetSecurityFiltersForContacts`, `OnAfterInitPage → GetSecurityFiltersForCustomers`, `SetFilterOnSalesHeader → GetExcludeAllFilter`, …)
- [Codeunit 4400 "SOA Setup"](../codeunit/4400.md) (5 calls: `GetAgentTaskPageContext → GetSecurityFiltersForContacts`, `GetAgentTaskPageContext → GetSecurityFiltersForCustomers`, `GetCommunicationLanguageCodeAndFormat → GetExcludeAllFilter`, …)
- [Codeunit 4398 "SOA Task Message"](../codeunit/4398.md) (3 calls: `GetSentMessageToAddress → FindContactByEmail`, `GetSentMessageToAddress → IsContactOverrideTrusted`, `MessageRequiresReview → ContactExistsByEmail`)
- [Codeunit 4419 "SOA Send Reply"](../codeunit/4419.md) (2 calls: `GetMappedContactEmail → FindContactByAlternateEmail`, `GetMappedContactEmail → IsContactOverrideTrusted`)
- [Codeunit 4411 "SOA Contact Search Impl"](../codeunit/4411.md) (1 call: `FindRecordContact → IsContactOverrideTrusted`)
- [Page 4412 "SOA Contact Lookup"](../page/4412.md) (1 call: `SetEmailFilter → GetSafeFromEmailFilter`)

## Recent changes

- 2026-09-01 [#10842 [SOA] Clarify Email 2 contact mapping action](../../changes/bcapps/10842.md) (main, BC30, fix)
- 2026-08-20 [#10411 [SOA] Allow changing or clearing manually selected contacts](../../changes/bcapps/10411.md) (main, BC30, feature)
- 2026-08-18 [#10302 [SOA] Clarify contact mapping options for unknown email senders](../../changes/bcapps/10302.md) (main, BC30, other)
- 2026-08-13 [#10036 [SOA]: Bugbash for releases 28.x - Contact unable to find due to Qasim map to Megan, different names](../../changes/bcapps/10036.md) (main, BC30, fix)
- 2026-07-08 [#8875 [master] SOA: Bugbash for releases 28.x - Select an existing contact, or create a new one - Use another contact always](../../changes/bcapps/8875.md) (main, BC30, fix)

## 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). 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: "codeunit", object_name: "SOA Filters Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
