# ActivateSalesPriceList

## Permission Scope

salesPricing

## Overview

ActivateSalesPriceList moves a draft SalesPriceList into ACTIVE status so it can participate in downstream commercial processing.

## Business Rules

- Only DRAFT SalesPriceList records may be activated.
- Company must be ACTIVE or otherwise eligible for commercial configuration.

## Process Flow

```mermaid
flowchart TD
    A[Receive activate request] --> B[Load SalesPriceList]
    B --> C{Status is DRAFT?}
    C -->|No| D[Return INVALID_SALESPRICELIST_STATUS]
    C -->|Yes| E[Validate activation prerequisites]
    E --> F[Set status to ACTIVE]
    F --> G[Return activated 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
- **INVALID_SALESPRICELIST_STATUS**: SalesPriceList status does not allow this operation
- **COMPANY_NOT_FOUND**: Referenced company does not exist.

## Test Cases

- activates a draft SalesPriceList
- throws when SalesPriceList is not in DRAFT status
- throws when SalesPriceList does not exist
- throws when the referenced company does not exist
