> ## 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.

# Manage Creditors

> EcoMail Hub users manage creditor profile records, contacts, member status, and outreach details.

## Real-World Example

ABC Collections appears in a consumer notice, but it is not an active creditor member yet. Maya opens Manage Creditors, finds the ABC profile, checks its pending notice response counts, edits profile details, adds up to three contacts, and sends an outreach email to the correct contact.

If ABC later becomes an active verified creditor company, the profile should be protected from edits that could break the linked company record.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["User opens Manage Creditors"] --> B["Portal lists profiles and active companies"]
    B --> C["User searches or opens a profile"]
    C --> D{"Profile tied to active company?"}
    D -->|Yes| E["Show protected company view"]
    D -->|No| F["Allow profile/contact edits"]
    F --> G["Optional contact email is sent"]
    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,C actor;
    class B,F,G system;
    class D decision;
    class E risk;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## View And Edit Actions

| Action Or Route         | Expected Behavior                                                                                              |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- |
| Creditor profile view   | Shows company name, profile status, contact details, address, and related notice responses.                    |
| Active company view     | Shows protected active-company information and related notice responses without allowing unsafe profile edits. |
| Edit creditor profile   | Allows editing company details only when the profile is not protected by an active company.                    |
| Add/Edit contact        | Supports up to three contacts with first name, last name, email, and phone.                                    |
| Send contact email      | Sends an outreach email to the selected contact after subject and body are provided.                           |
| Export notice responses | Downloads notice responses connected to that creditor profile or company.                                      |
| Delete profile          | Allowed only for non-active/non-created creditor profile rows.                                                 |

Related notice-response tables inside creditor profile and company views should keep the same View Notice, Close, and Change Creditor Profile rules used by Manage Notice Response.

## Profile Status Badges

Manage Creditors displays abbreviated profile status badges. These same sender classifications are reused by notice-response rows and exports.

| Badge | Full Label            | Meaning                                                                               |
| ----- | --------------------- | ------------------------------------------------------------------------------------- |
| `AM`  | Active Member         | Active company row, or creditor profile linked to an active company.                  |
| `PM`  | Pending Member        | Non-active company row, or creditor profile linked to a non-active company.           |
| `YP`  | YouNegotiate Prospect | Creditor profile created or owned by an EcoMail Hub user and not linked to a company. |
| `CP`  | Consumer Prospect     | Creditor profile created from a consumer notice response and not linked to a company. |

## How It Should Work

* It should list creditor profiles and active creditor companies in one operational view.
* It should show pending, added, and returned notice-response counts for profile work.
* It should allow edits only when the profile is not protected by an active verified company.
* It should allow up to three contacts per creditor profile.
* It should keep profile status badge sorting aligned with the expected order: active members, pending members, YouNegotiate prospects, then consumer prospects.

## How It Should Not Work

* It should not delete active or created creditor profiles tied to active verified companies.
* It should not allow more than three contacts on one profile.
* It should not send profile outreach email without a subject and body.

## Developer Notes

* Active company protection depends on company status and verified TIN state.
* Profile search includes company name, phone, address, city, and URL.
* Profile status is resolved in the creditor profile service and rendered through the shared profile-status badge component.

## Related App Areas

* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/ListPage.php`
* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/ViewPage.php`
* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/CompanyViewPage.php`
* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/EditPage.php`
* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/NoticeResponse.php`
* `app/Livewire/ConsumerResponseManager/ManageCreditorProfiles/CompanyNoticeResponse.php`
* `app/Livewire/ConsumerResponseManager/Forms/CreditorProfileForm.php`
* `app/Livewire/ConsumerResponseManager/Forms/CreditorProfileContactForm.php`
* `app/Services/ConsumerResponseManager/CreditorProfileService.php`
* `resources/views/components/consumer-response-manager/profile-status-badge.blade.php`
