---
title: Business rules
summary: Rules enforced around the call to the remote service.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# Business rules

`SimpleCertifiedMailServiceProxy` enforces several client-side rules around its one called operation, `getCertifiedLabel`: field truncation, a default account group, a preview/production mode selection, an in-band failure-to-exception conversion, and a page-count-based label size selection performed without calling the remote service.

---

## BR-SCM-001 Address field truncation

| Field | Value |
| --- | --- |
| Statement | `FromAddress1`, `FromAddress2`, and `ToName` are truncated to 46 characters before being sent to the remote service |
| Trigger | Evaluated in `GetCertifiedLabel` before the SOAP call |
| Enforcement | `SimpleCertifiedMailServiceProxy.GetCertifiedLabel` |
| Origin | wrapper |
| Outcome | A value longer than 46 characters is silently shortened; no exception is raised and no warning is logged |
| Related operation | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Reached from | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Source | `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:101-102,108` |

---

## BR-SCM-002 Default account group

| Field | Value |
| --- | --- |
| Statement | When the caller does not supply a `GroupName`, the request defaults to `"ADMINISTRATION"` |
| Trigger | Evaluated in `GetCertifiedLabel` before the SOAP call |
| Enforcement | `SimpleCertifiedMailServiceProxy.GetCertifiedLabel` |
| Origin | wrapper |
| Outcome | The remote service receives a default group name rather than a rejected or empty request |
| Related operation | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Reached from | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Source | `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:20,119` |

---

## BR-SCM-003 Preview/production mode selection

| Field | Value |
| --- | --- |
| Statement | The request `Mode` is `production` or `preview`, taken from `CertifiedLabelData.IsProductionMode` when the caller sets it; otherwise it follows `IEnvironmentService.IsProduction` |
| Trigger | Evaluated in `GetCertifiedLabel` before the SOAP call |
| Enforcement | `SimpleCertifiedMailServiceProxy.GetModeOption` / `GetCertifiedLabel` |
| Origin | wrapper |
| Outcome | A caller can force preview mode regardless of the hosting environment; otherwise the environment's production flag governs whether a real (billable) label is generated |
| Related operation | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Reached from | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Source | `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:125,143-151` |

---

## BR-SCM-004 In-band failure converted to exception

| Field | Value |
| --- | --- |
| Statement | A response with `StatusCode` other than `1` is converted to a `SimpleCertifiedException` carrying the remote `StatusMessage`, logged, and thrown |
| Trigger | Evaluated immediately after the SOAP call returns |
| Enforcement | `SimpleCertifiedMailServiceProxy.GetCertifiedLabel` |
| Origin | wrapper |
| Outcome | Callers that catch `SimpleCertifiedException` (only `SubpoenaLabelService` does) see a typed, logged failure; callers that do not catch it see the exception propagate. Transport-level exceptions are not converted and are not logged here |
| Related operation | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Reached from | [`getCertifiedLabel`](reference.md#getcertifiedlabel) |
| Source | `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:19,133-137` |

---

## BR-SCM-005 Page-count-based label size selection

| Field | Value |
| --- | --- |
| Statement | `GetDefaultLabelData` selects `EnvelopeSize10` for up to 10 pages, `Small` for 11–19 pages, and `Large` for 20 or more pages, and throws `InvalidNumberOfPagesException` for more than 76 pages |
| Trigger | Evaluated locally, before any call to the remote service, whenever a caller requests default label data by page count |
| Enforcement | `SimpleCertifiedMailServiceProxy.GetDefaultLabelData(int)` |
| Origin | wrapper |
| Outcome | No SOAP call is made by this rule; it only shapes the request that a later `getCertifiedLabel` call would use. A page count over 76 fails fast with a typed exception rather than sending an oversized request |
| Related operation | [`getCertifiedLabel`](reference.md#getcertifiedlabel) (feeds its request; makes no call itself) |
| Reached from | [`getCertifiedLabel`](reference.md#getcertifiedlabel) (feeds its request; makes no call itself) |
| Source | `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs:72-89` |

---

## Related documentation
- [Client index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Tech debt](tech-debt.md)

## Sources
- `Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs`
- `Services/SAIF.Services/Legal/Subpoenas/SubpoenaLabelService.cs`
