---
title: "Retrieve a policy (optionally masked)"
summary: "Retrieve a policy (optionally masked)."
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Core
reference_type: package
operation_id: "OP-001"
trigger: "caller requests a single policy by policy number"
---

# Retrieve a policy (optionally masked)

Retrieve a policy (optionally masked) describes the corresponding policy-core workflow and its BOF or Oracle touchpoints.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-001 |
| **Trigger** | caller requests a single policy by policy number |
| **Inputs** | data portal, policy number, mask-data flag (default `False`) |
| **Outputs** | populated `clsPolicy` |
| **Primary components** | ``clsPolicy.GetPolicy(inDataportal, inPolicyNumber, inMaskData)` (`clsPolicy.vb`)` |
| **Entry point** | `Business\SAIF.Business.Policy.Core` |

## Steps
1. Construct a `Criteria` instance carrying the policy number and the `MaskData` flag.
2. Execute `RetrieveSQL` against `POLICY` via the data portal.
3. `Fill` maps result columns to properties. If `MaskData` is `True`, `POLICYHOLDER_NAME` and `POLICYHOLDER_LEGAL_NAME` are replaced with `clsConstants.DataMaskingConstants` placeholders ([BR-020](../business-rules.md#br-020-when-masking-is-requested-policyholder-names-contact-identitycontact-method)).
4. Market type, financial system and issuance system codes are converted through `SAIF.Business.Policy.Enums` converters.
5. Return the populated object; navigation properties (periods, locations, contacts) are retrieved lazily on first access.*
6. Consolidate supporting references.
   - Related business rules: [BR-020](../business-rules.md#br-020-when-masking-is-requested-policyholder-names-contact-identitycontact-method)
   - Related SQL statements: [SQL-070](../sql/SQL-070-saif-business-policy-core.md), [SQL-071](../sql/SQL-071-saif-business-policy-core.md), [SQL-072](../sql/SQL-072-saif-business-policy-core.md), [SQL-073](../sql/SQL-073-saif-business-policy-core.md)
   - Related tables: [CANCELLATION](../database-tables.md#cancellation), [POLICY_PERIOD_MASTER](../database-tables.md#policy_period_master), [BUSINESS](../database-tables.md#business), [POLICY](../database-tables.md#policy)

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Trigger]) --> S1[Apply policy-core logic]
    S1 --> D{Validation or branch?}
    D -->|Continue| S2[Execute BOF SQL or Oracle call]
    D -->|Stop| EndErr([Return error or empty result])
    S2 --> EndOk([Return populated result])
```

## Failure and edge-case behavior
- Error, warning, and empty-result behavior follows the rules and SQL cited in the steps above.
- Stored-procedure-backed paths depend on Oracle-side logic outside this repository.**

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

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business.Policy.Core\clsPolicy.vb`
- `Business\SAIF.Business.Policy.Core\clsPolicyPeriodBase.vb`
- `Business\SAIF.Business.Policy.Core\clsPolicyPeriod.vb`
- `Business\SAIF.Business.Policy.Core\clsLegacyPolicyPeriod.vb`
- `Business\SAIF.Business.Policy.Core\clsCancelReasonOverride.vb`
- `Business\SAIF.Business.Policy.Core\WCISInquiry.vb`
