---
title: "SQL-018: Insert CUSTOMER_AGENCY for `mdlCustomerContact`"
summary: Insert statement for `mdlCustomerContact` against CUSTOMER_AGENCY.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.CustomerContact
reference_type: package
---

# SQL-018: Insert CUSTOMER_AGENCY for `mdlCustomerContact`

This statement supports `mdlCustomerContact` by executing a create operation against CUSTOMER_AGENCY.

## Classification

| Field | Value |
| --- | --- |
| SQL ID | SQL-018 |
| Operation type | Create |
| Execution method | Inline via SqlHelper.DataQuery |
| Database | Oracle |
| Schema | `[unqualified]**` |
| Command type | Text |
| Business object | `mdlCustomerContact` |
| Criteria property | CreateAgency |
| Lifecycle method | CreateAgency |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:CustomerID` | Input | Decimal | N/A | Customer primary key |
| `:AgencyID` | Input | Decimal | N/A | Agency sequence number |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CUSTOMER_AGENCY](../database-tables.md#customer-agency) | INSERT | AGENCY_SEQ_NUM, COMPANY_SEQ_NUM |

## Sample SQL

```sql
INSERT INTO CUSTOMER_AGENCY (COMPANY_SEQ_NUM, AGENCY_SEQ_NUM) VALUES (:CustomerID, :AgencyID)
```

## Operations and processes
- [Agency, agent, and provider customer resolution](../operations/agency-agent-provider-resolution.md)

## Business rules
- [BR-008: Generated agency, agent, and provider records can be forced inactive](../business-rules.md#br-008-generated-agency-agent-and-provider-records-can-be-forced-inactive)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business.CustomerContact\mdlCustomerContact.vb`
