---
title: Evaluate agency status predicates
summary: Derive Boolean status flags and display names from loaded agency state.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Agency
reference_type: package
operation_id: OP-011
trigger: A caller reads agency status or display properties.
---

# Evaluate agency status predicates

This operation interprets loaded agency state into business-friendly Boolean helpers and formatted display values.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-011 |
| **Trigger** | A caller reads status, flag, or display properties on `clsAgency`. |
| **Inputs** | Loaded agency state, optional as-of date |
| **Outputs** | Boolean flags and formatted name strings |
| **Primary components** | `clsAgency.IsActive`, `IsExpired`, `IsDirectWriter`, `IsSAIF`, `Name`, `NameAbbreviated` |
| **Entry point** | `Business\SAIF.Business.Policy.Agency\clsAgency.vb` |

## Steps
1. Evaluate date-window predicates by comparing the requested date to the agency's effective and expiration dates ([BR-008](../business-rules.md#br-008-active-status-uses-effective-and-expiration-windows)).
2. Translate persisted `Y`/`N` flags such as direct-writer, EFT, paperless, and no-touch-quote exclusion through the framework Boolean helpers ([BR-018](../business-rules.md#br-018-yn-flags-convert-through-framework-boolean-helpers)).
3. Compare the loaded sequence number to the published special constants to determine whether the row represents SAIF itself or the not-yet-appointed agency ([BR-019](../business-rules.md#br-019-special-agency-sequence-numbers-identify-saif-and-not-yet-appointed-agencies)).
4. Format the display name with title casing, and derive the abbreviated variant by shortening `Insurance` and `Services` ([BR-020](../business-rules.md#br-020-agency-and-producer-display-names-are-title-cased-and-abbreviated-consistently)).
5. Reuse the loaded `AGENCY` state originally supplied by [SQL-001](../sql/SQL-001-retrieve-agency-by-sequence-number.md) or [SQL-002](../sql/SQL-002-search-agencies-by-feid-and-contract-types.md).

## Process flow

The following diagram visualizes status and display evaluation.

```mermaid
flowchart TD
  Start([Read property]) --> Date[Evaluate date window]
  Date --> Flags[Convert Y/N flags]
  Flags --> Special[Check special sequence numbers]
  Special --> Name[Format display names]
  Name --> End([Status returned])
```

## Failure and edge-case behavior
- Status helpers rely on the agency object already being loaded with current data.

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)
- [SQL catalog](../sql/index.md)
- [API reference](../api/index.md)

## Sources
- `Business\SAIF.Business.Policy.Agency\clsAgency.vb`
