---
title: "SQL-016: clsPaymentAllocation insert"
summary: Inserts a payment allocation record into PAYMENT_ALLOCATION.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Payment.EFT
reference_type: package
---

# SQL-016: clsPaymentAllocation insert

Inserts a payment allocation record into PAYMENT_ALLOCATION.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-016 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsPaymentAllocation` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert / AfterInsert` |


## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| :Amount | Input | Decimal | — | Binds `Amount` |
| :ApprovedPlanSeqNum | Input | Decimal | — | Binds `m_ApprovedPlanSeqNum`* |
| :OSCPolicyPeriodSeqNum | Input | Decimal | — | Binds `m_OSCPolicyPeriodSeqNum`* |
| :DynamicBalanceSeqNum | Input | Decimal | — | Binds `m_DynamicBalanceSeqNum`* |
| :SessionTransferSeqNum | Input | Decimal | — | Binds `SessionTransferSeqNum` |
| :BalanceTypeCode | Input | String | 5 | Binds `Code`* |
| :PaymentAllocationSeqNum | Input | Decimal | — | Binds `PaymentAllocationSeqNum`* |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PAYMENT_ALLOCATION](../database-tables.md#payment_allocation) | — | — |

## Sample SQL

```sql
Insert into PAYMENT_ALLOCATION ( SESSION_TRANSFER_SEQ_NUM, BALANCE_TYPE_CODE, PAYMENT_ALLOCATION_SEQ_NUM, AMOUNT, APPROVED_PLAN_SEQ_NUM, OSC_POLICY_PERIOD_SEQ_NUM, DYNAMIC_BALANCE_SEQ_NUM )
Values ( :SessionTransferSeqNum, :BalanceTypeCode, :PaymentAllocationSeqNum, :Amount, :ApprovedPlanSeqNum, :OSCPolicyPeriodSeqNum, :DynamicBalanceSeqNum)
```

## Operations and processes
- [Payment detail and allocation](../operations/payment-detail-and-allocation.md)*

> **Note:** 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.

## Business rules
- [BR-EFT-05: Insert/update operations require exactly one affected row](../business-rules.md#br-eft-05-insertupdate-operations-require-exactly-one-affected-row)*

## Sources
- `Business\SAIF.Business.Payment.EFT\clsPaymentAllocation.vb`
