---
title: Determine producer-commission eligibility
summary: Check whether an agency has an active producer-commission contract.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Agency
reference_type: package
operation_id: OP-013
trigger: A caller checks producer-commission eligibility for one or more agencies.
---

# Determine producer-commission eligibility

This operation filters an agency's loaded contracts to those active on a requested date and then checks whether any surviving contract is classified as a producer-commission contract.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-013 |
| **Trigger** | A caller invokes `HasActiveProducerCommissionContract`, `ProducerCommissionContracts`, or `ActiveProducerCommissionContract`. |
| **Inputs** | Agency or agency collection, as-of date |
| **Outputs** | Boolean result or filtered agency collection |
| **Primary components** | `clsAgency.HasActiveProducerCommissionContract`, `clsAgencyContractCollection.ProducerCommissionContracts`, `clsAgencyCollection.ActiveProducerCommissionContract` |
| **Entry point** | `Business\SAIF.Business.Policy.Agency\clsAgency.vb`, `clsAgencyContractCollection.vb`, `clsAgencyCollection.vb` |

## Steps
1. Ensure the agency's contracts are loaded, lazily retrieving them with [SQL-004](../sql/SQL-004-retrieve-agency-contracts.md) against [AGENCY_CONTRACT](../database-tables.md#agency_contract) when necessary.
2. Filter the contracts to those active on the requested date ([BR-008](../business-rules.md#br-008-active-status-uses-effective-and-expiration-windows)).
3. Filter the active contracts again to those whose commission GL type maps to `ProducerCommission` (`AGT`) ([BR-013](../business-rules.md#br-013-producer-commission-contracts-require-gl-code-agt)).
4. Return `True` when at least one qualifying contract remains; otherwise return `False`.
5. On the collection helper, add only agencies with at least one qualifying contract to the result set.

## Process flow

The following diagram visualizes producer-commission eligibility evaluation.

```mermaid
flowchart TD
  Start([Producer-commission check]) --> Load[Ensure contracts loaded]
  Load --> Active[Filter active contracts]
  Active --> GL[Filter AGT contracts]
  GL --> Any{Any qualifying contract?}
  Any -->|Yes| Yes[Agency qualifies]
  Any -->|No| No[Agency does not qualify]
```

## Failure and edge-case behavior
- Agencies without any loaded or active contracts return `False`.

## 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`
- `Business\SAIF.Business.Policy.Agency\clsAgencyCollection.vb`
- `Business\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb`
