> For the complete documentation index, see [llms.txt](https://city-protocol.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://city-protocol.gitbook.io/docs/software-development-kit/aml/common-integration-flows.md).

# Common Integration Flows

#### Deposit Screening

1. When a user initiates a deposit, call `amlClient.analyzeWallet()` with their source address.
2. Inspect the analysis response for risk scores and flagged categories.
3. If the risk score exceeds your threshold, block the deposit and route the case to your compliance queue. Otherwise, proceed with the vault `deposit` or `mint` call via `CityClient`.

#### Transaction Monitoring

1. After a deposit transaction confirms on-chain, call `amlClient.analyzeTransaction()` with the transaction hash and a `customer_reference` tying it to the user and action.
2. Store the returned analysis ID in your database.
3. Poll with `getTransactionAnalysis()` or consume a webhook (if your backend supports it) to retrieve the final result.
4. Apply your risk policy — flag, freeze, or allow — based on the returned exposure breakdown.

#### Reference Data Sync

For the best operator experience, we recommend pre-fetching reference data at startup or on a scheduled interval. Call `listSupportedAssets()` to validate your asset coverage, `listRiskRules({ includeIdMap: true })` to populate your rule-label cache, and `listCriteriaCategories()` to keep category displays in your compliance dashboard current. This avoids redundant calls on each analysis request and keeps your internal tooling responsive.
