Configuration Builder
LOCAL PROTOTYPEA project by Jack Tam

REQUIREMENTS → CONFIGURATION

Less scripting.
More clarity.

Define your order item types. Turn the details into a consistent, reviewable SQL seed template.

SQL SERVEROrder item type

Three fields. One focused template. ID, fee description, and display name. Other configuration columns are deliberately excluded from this demo.

01 / DEFINE

Order Item Type

3 FIELDS
Used for new items

Start at a known available ID. IDs already in this script are skipped.

Assigned from Next ID. Override it if needed.

The name shown to users.0/100

Describe available fees. This text is not a fee calculation.0/500

02 / REVIEW

Your seed rows 0

Ready when you are

A clear starting point.

Add your first order item type above.
Each saved item becomes one SQL row.

03 / GENERATE

Script preview

T-SQL
order-item-type.sql
0 ROWS · AWAITING INPUT
-- ORDER ITEM TYPE
-- Demo seed template: ID, fee description, and display name only.
-- Review before adapting to a destination schema. No database is connected.
-- This table variable has no identity column; IDENTITY_INSERT is not required.

DECLARE @ORDER_ITEM_TYPE_TEMP_TABLE TABLE
(
    [ORDER_ITEM_TYPE_ID] INT NOT NULL PRIMARY KEY,
    [ORDER_ITEM_TYPE_DESC] NVARCHAR(500) NOT NULL,
    [ORDER_ITEM_TYPE_DISPLAY_NAME] NVARCHAR(100) NOT NULL
);

-- Add an order item type to generate VALUES rows.

Demo table variable only. No destination-table insert or database ID check. Review and adapt the script before use.

Changes stay in this tab. Add an item to update the SQL preview.

SECOND SECTION / DEFINE THE BREAKDOWN

Fee Groups

Add a display name for each fee component, then link it to an Order Item Type. Add as many rows as you need.

TWO CONNECTED EXPORTS

Names and assignments only. Fee amounts and calculation rules are not inferred. Fee Group defaults are active 1, convenience fee 0. Assignment IDs use a separate sequence.

01 / DEFINE & REVIEW

Your Fee Groups 0

Set the first IDs before adding a row. Later rows increment and skip used IDs; database IDs are not checked.

Create an Order Item Type first so each Fee Group has a valid parent.

Go to Order Item Type

The new row expands here. Its IDs start at the next unused values.

02 / GENERATE

Fee Group scripts

T-SQL
fee-group.sql
0 ROWS
-- FEE GROUP
-- Demo seed table variable. Persist these rows to your actual Fee Group table separately.
-- Template defaults: IS_ACTIVE = 1, IS_CONVENIENCE_FEE = 0.

DECLARE @FEE_GROUP TABLE
(
    [FEE_GROUP_ID] INT NOT NULL PRIMARY KEY,
    [FEE_GROUP_DISPLAY_NAME] NVARCHAR(50) NOT NULL,
    [IS_ACTIVE] BIT NOT NULL,
    [IS_CONVENIENCE_FEE] BIT NOT NULL
);

-- Add Fee Groups to generate VALUES rows.

This seed populates @FEE_GROUP only. It does not create records in a destination Fee Group table.

Fee Groups and their assignments remain in this tab until exported.

THIRD SECTION / DEFINE THE CALCULATION

Fee Calculations

Configure flat, after-free-count, or penalty Fee Codes, then select the Fee Groups they belong to. Groups are filtered by their Order Item Type.

Structured fee inputs. Flat amount, per-item cost, Pages/Names, and skipped counts generate parameter rows. Penalty adds its procedure row only; no penalty parameter contract has been supplied.

01 / DEFINE & ASSIGN

Fee Codes 0

Five digits, preserving leading zeros. Example default: 48000. Format is checked; county existence is not verified.

[VG48000].CalcFlatFee

Parameter IDs are generated in saved-code order. After edits, regenerate both parameter files together; do not mix different snapshots.

Save an Order Item Type and at least one Fee Group first.

02 / GENERATE

Fee Calculation scripts

T-SQL
fee-code.sql
-- FEE CODE
-- Seeds a table variable only. It does not deploy or execute stored procedures.
-- Amounts and count inputs are in the separate parameter and parameter-link exports.
-- Penalty parameters/signature were not supplied; no penalty parameter rows are invented.

DECLARE @FEE_CODE TABLE
(
    [FEE_CODE_ID] INT NOT NULL PRIMARY KEY,
    [FEE_CODE_DISPLAY_NAME] NVARCHAR(50) NOT NULL,
    [IS_ACTIVE] BIT NOT NULL,
    [IS_FORMULA] BIT NOT NULL,
    [IS_SP] BIT NOT NULL,
    [FORMULA] NVARCHAR(50) NULL,
    [SP_NAME] NVARCHAR(100) NULL
);

-- Add a Fee Code to generate VALUES rows.

No procedures or calculations run here. Parameter output is an INSERT fragment: its @FEE_CODE_PARAMETER declaration was not supplied. Other seeds are table variables only. Destination records must exist before running relationship inserts. SQL Server execution remains unverified.

Fee Group selection is saved in this configuration and exported in the assignment script.