---
title: SAIF.Data.Guidewire business rules
summary: Enumerated business rules with per-rule trigger, enforcement, and outcomes.
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.Guidewire
reference_type: package
---

# SAIF.Data.Guidewire business rules

This page captures business rules enforced by this library's Guidewire HTTP clients.

## SDG-BR-001 Base URL resolved from environment configuration

| Field | Value |
| --- | --- |
| **Statement** | Each client's base URL must come from its environment config key |
| **Trigger** | Client construction |
| **Enforcement** | `HttpClientBase` constructor sets `client.BaseAddress = IEnvironmentService.GetConfigSetting(UrlKey)` |
| **Outcome** | `BaseAddress` is set before any request is made |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/HttpClientBase.cs` |

---

## SDG-BR-002 Basic credentials read from secure configuration

| Field | Value |
| --- | --- |
| **Statement** | Basic credentials come from a secure setting decrypted with the system hash, in the format `user\|password` |
| **Trigger** | First request with a non-blank `AuthKey` |
| **Enforcement** | `HttpClientBase.InitializeClientAuthorization()` computes the hash via `SystemHashUtil.ComputeHash(SystemType, SystemName)` (when `SystemName` is set) or `SystemHashUtil.Get(SystemType)`, then reads `GetSecureConfigSetting(AuthKey, hash)`, splits on `\|`, and Base64-encodes `user:password` into the `Authorization: Basic` header |
| **Outcome** | Authorization header set on the `HttpClient` |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/HttpClientBase.cs` |

---

## SDG-BR-003 Responses cached unless caching is disabled

| Field | Value |
| --- | --- |
| **Statement** | Responses are cached for `MaxCacheDuration` (default 30 seconds) unless `UseCache` is `false`. The obsolete constructors disable caching |
| **Trigger** | Cached GET/POST request |
| **Enforcement** | `HttpClientBase.GetAsyncCached<T>` builds a cache key `{Type}-{url}-{ensureSuccess}[-bodyhash]` and executes through the Polly policy from `IDataClientConfiguration.CachePolicyKey`, or a NoOp policy when `UseCache` is `false` |
| **Outcome** | Cached response reused within `MaxCacheDuration`, or a fresh request via a NoOp policy |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/HttpClientBase.cs`, `Data/SAIF.Data.Guidewire/Clients/DataClientConfiguration.cs` |

---

## SDG-BR-010 Null activity properties omitted from serialized request

| Field | Value |
| --- | --- |
| **Statement** | Null properties are omitted from activity requests |
| **Trigger** | Create activity |
| **Enforcement** | `ActivityDataApiClient.CreateActivityRequest` serializes the `Activity` payload with null values ignored |
| **Outcome** | Serialized payload excludes unset fields |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/ActivityDataApiClient.cs` |

---

## SDG-BR-011 Non-success responses throw with status and content

| Field | Value |
| --- | --- |
| **Statement** | Write operations and ensure-success reads throw on a non-success HTTP status, including the status code and response content |
| **Trigger** | Non-2xx HTTP response |
| **Enforcement** | `ActivityDataApiClient.CreateActivityRequest`, `FinancialDataApiClient.CreateCheckAsync` / `CreateRecoveryAsync`, and `WorkerDataApiClient`'s `ensureSuccess=true` calls throw with the response status and content; other exceptions are wrapped |
| **Outcome** | Exception raised to the caller |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/ActivityDataApiClient.cs`, `Data/SAIF.Data.Guidewire/Clients/FinancialDataApiClient.cs`, `Data/SAIF.Data.Guidewire/Clients/WorkerDataApiClient.cs` |

---

## SDG-BR-012 Empty bulk claim request short-circuits

| Field | Value |
| --- | --- |
| **Statement** | A bulk claim request with an empty list returns an empty result without an API call |
| **Trigger** | Bulk claims request with an empty id list |
| **Enforcement** | `ClaimDataApiClient` checks the input list before issuing the `POST claims` request |
| **Outcome** | Empty result returned, no HTTP call made |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/ClaimDataApiClient.cs` |

---

## SDG-BR-013 Zero-pay payments included only when requested

| Field | Value |
| --- | --- |
| **Statement** | Zero-pay payments are included only when requested (`includeZeroPays=true`) |
| **Trigger** | Payments-by-issue-date request |
| **Enforcement** | `FinancialDataApiClient` appends `&includeZeroPays=true` (lowercase) to the query string only when the caller requests zero-pay inclusion |
| **Outcome** | Query string composition varies by caller intent |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/FinancialDataApiClient.cs` |

---

## SDG-BR-014 Provider address changes are fire-and-forget

| Field | Value |
| --- | --- |
| **Statement** | Provider address add/update is fire-and-forget: the response status is not checked and the result is unused* |
| **Trigger** | Provider address add or update |
| **Enforcement** | `ProviderDataApiClient` posts/puts a `ProviderAddressRequest` and does not inspect the response status |
| **Outcome** | Caller receives no confirmation of success or failure; whether this is intentional is unknown** |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/ProviderDataApiClient.cs` |

---

## SDG-BR-015 Null or 0 worker id short-circuits lookup

| Field | Value |
| --- | --- |
| **Statement** | A null or `"0"` worker/claim id returns `null` without an API call |
| **Trigger** | Worker or claim lookup by id |
| **Enforcement** | `WorkerDataApiClient` checks the id argument before issuing the `GET worker/{id}` or `GET claims/{id}` request |
| **Outcome** | `null` returned, no HTTP call made |
| **Source** | `Data/SAIF.Data.Guidewire/Clients/WorkerDataApiClient.cs` |

---

## SDG-BR-020 Guidewire code constants classify consumer data

| Field | Value |
| --- | --- |
| **Statement** | Payment categories, transaction type payment codes, check statuses, reserve categories, vocational status codes, claim contact roles, and delivery methods are represented as fixed Guidewire code constants |
| **Trigger** | Consumers classify claim, payment, or reserve data |
| **Enforcement** | Constants and enums defined under `Models/ClaimDataApi/*` and `Models/FinancialDataApi/Constants.cs` |
| **Outcome** | Consumers (for example `SAIF.Data`'s `ClaimQueryProvider`) classify Guidewire data using these shared code values |
| **Source** | `Data/SAIF.Data.Guidewire/Models/ClaimDataApi/ReservesData.cs`, `Data/SAIF.Data.Guidewire/Models/FinancialDataApi/Constants.cs` |

## Notes
- 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.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [API reference](api/index.md)

## Sources
- `Data/SAIF.Data.Guidewire/Clients/HttpClientBase.cs`
- `Data/SAIF.Data.Guidewire/Clients/DataClientConfiguration.cs`
- `Data/SAIF.Data.Guidewire/Clients/ActivityDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Clients/ClaimDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Clients/FinancialDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Clients/ProviderDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Clients/WorkerDataApiClient.cs`
- `Data/SAIF.Data.Guidewire/Models/ClaimDataApi/ReservesData.cs`
- `Data/SAIF.Data.Guidewire/Models/FinancialDataApi/Constants.cs`
- `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs`
