# CreateSalesPriceList

## Permission Scope

salesPricing

## Overview

CreateSalesPriceList creates a draft company-scoped price list used to group reusable sales pricing rules.

## Business Rules

- Record is always created in DRAFT status.
- Company must be ACTIVE or otherwise eligible for commercial configuration.

## Process Flow

```mermaid
flowchart TD
    A[Receive create request] --> B[Validate references and required fields]
    B --> C{Validation passed?}
    C -->|No| D[Return validation error]
    C -->|Yes| E[Insert draft SalesPriceList record]
    E --> F[Return created SalesPriceList]
```

## External Dependencies

- [organization::GetCompany](../../../organization/docs/queries/GetCompany.md) - Validate company scope for the price list.

## Error Scenarios

- **SALESPRICELIST_NOT_FOUND**: Referenced SalesPriceList does not exist
- **COMPANY_NOT_FOUND**: Referenced company does not exist.

## Test Cases

- creates a draft price list for a valid company
- throws when required SalesPriceList fields are missing
- creates the SalesPriceList in DRAFT status
- throws when the company does not exist
