---
title: Register data clients
summary: Register the Guidewire data-client configuration, HTTP clients, and cache infrastructure in the DI container.
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
operation_id: OP-SD-01
trigger: Host application calls `AddDataClients` during startup.
---

# Register data clients

Register the Guidewire data-client configuration, HTTP clients, and cache infrastructure in the DI container.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SD-01 |
| **Trigger** | Host application calls `AddDataClients` during startup. |
| **Inputs** | `SystemType`, `systemName`, optional configure action |
| **Outputs** | Registered `IDataClientConfiguration` singleton, 7 API clients, cache infrastructure |
| **Primary components** | `ContainerBuilderExtensions.AddDataClients` |
| **Entry point** | `Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs` |

## Steps

1. Create a `DataClientConfiguration` with the `SystemType` and `systemName`, then apply the optional configure action ([SD-BR-001](../business-rules.md#sd-br-001-data-client-configuration-created-per-systemtype-and-systemname)).
   - Delegates: `SAIF.Data.Guidewire` / `DataClientConfiguration`.
3. Register `IDataClientConfiguration` as a singleton.
4. Register the 7 API clients per their configured lifetime scope (delegates to the Guidewire client classes).
5. Register the cache: `MemoryCacheProvider`, and a Polly `CacheAsync` policy keyed by `CachePolicyKey` with `MaxCacheDuration` ([SD-BR-002](../business-rules.md#sd-br-002-get-responses-cached-via-polly-unless-caching-disabled)).
6. Register the Options and `MemoryCache` infrastructure.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["Host application calls `AddDataClients` during startup."]) --> S1["`ContainerBuilderExtensions.AddDataClients`"]
	S1 --> S2{"Rules satisfied?"}
	S2 -->|Yes| EndOk([Result returned])
	S2 -->|No| EndErr([Exception / empty result])
```

## Failure and edge-case behavior
- Missing configuration action: defaults are used from `DataClientConfiguration`'s constructor.

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


## Sources
- `Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs`
