> ## Documentation Index
> Fetch the complete documentation index at: https://docs.younegotiate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EcoLetter Template

> ABC Collections creates an EcoLetter template called "Upcoming Payment Reminder".

## Real-World Example

ABC Collections creates an EcoLetter template called "Upcoming Payment Reminder". Later, when the creditor prepares an EcoLetter campaign for consumers with payments due soon, that template should be available for selection.

The template should stay connected to ABC Collections and should not appear as editable content for another creditor.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Creditor creates EcoLetter template"] --> B["Template is saved for that creditor"]
    B --> C["Creditor prepares EcoLetter communication"]
    C --> D["Creditor selects saved template"]
    D --> E["EcoLetter is sent or scheduled for selected consumers"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A actor;
    class B,D,E outcome;
    class C system;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should allow the creditor to create or update reusable EcoLetter content.
* It should keep templates connected to the correct creditor account.
* It should make templates available for the related communication flows.

## How It Should Not Work

* It should not expose one creditor's templates to another creditor.
* It should not send template drafts as final communications unless the user intentionally schedules or sends them.
* It should not remove required consumer or creditor details from the letter.

## Developer Notes

* Always check audience, creditor ownership, template selection, and opt-out/communication rules before sending.
* Background campaign work should record enough status for the tracker to explain sent, pending, and failed activity.

## Related App Areas

* `routes/creditor/index.php`
* `app/Livewire/Creditor/Communications`
* `app/Console/Commands/RunCampaignCommand.php`
* `app/Jobs/SendCampaignEmailSmsOrELetterJob.php`
