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

# UJ-M-021: Contact a Company (Generate Lead)

> Member contacts a company through the directory, generating a lead

## Journey Overview

| Attribute      | Value                                           |
| -------------- | ----------------------------------------------- |
| **Journey ID** | UJ-M-021                                        |
| **Actor**      | Member                                          |
| **Goal**       | Contact a company to inquire about services     |
| **Trigger**    | Member finds company of interest in directory   |
| **Outcome**    | Lead generated and delivered to company/sponsor |

## Preconditions

* Member is logged in
* Company profile exists and allows contact
* Company has lead capture enabled

## Journey Flow

```mermaid theme={null}
flowchart TD
    A[View company profile] --> B[Click Contact Company]
    B --> C[Contact form displayed]
    C --> D[Fill out inquiry form]
    D --> E[Submit form]
    E --> F[Lead created]
    F --> G[Confirmation to member]
    F --> H[Lead delivered to company]
    H --> I[Company follows up]
```

## Detailed Steps

<Steps>
  <Step title="View Company Profile">
    Member views company in directory and decides to make contact.

    **Contact Options:**

    * "Contact Company" button (primary)
    * Direct email link (if displayed)
    * Phone number (if displayed)
    * Website link
  </Step>

  <Step title="Open Contact Form">
    Clicking "Contact Company" opens inquiry form:

    ```
    ┌─────────────────────────────────────────────────────────────┐
    │ Contact Acme Consulting                                     │
    ├─────────────────────────────────────────────────────────────┤
    │                                                             │
    │ Your Details (pre-filled from profile)                      │
    │ ──────────────────────────────────────                      │
    │ Name: John Smith                                            │
    │ Email: john@email.com                                       │
    │ Phone: 0412 345 678                                         │
    │ Company: ABC Corp                                           │
    │                                                             │
    │ Your Inquiry                                                │
    │ ─────────────                                               │
    │ Subject: [Select a topic ▼]                                 │
    │ • General Inquiry                                           │
    │ • Request Quote                                             │
    │ • Schedule Consultation                                     │
    │ • Partnership Opportunity                                   │
    │                                                             │
    │ Message:                                                    │
    │ ┌─────────────────────────────────────────────────────────┐ │
    │ │                                                         │ │
    │ │                                                         │ │
    │ │                                                         │ │
    │ └─────────────────────────────────────────────────────────┘ │
    │                                                             │
    │ ☐ I consent to sharing my contact details with this        │
    │   company for follow-up purposes.                           │
    │                                                             │
    │ [Cancel]  [Send Inquiry]                                    │
    │                                                             │
    └─────────────────────────────────────────────────────────────┘
    ```
  </Step>

  <Step title="Complete Form">
    Form fields:

    | Field   | Pre-filled         | Required     |
    | ------- | ------------------ | ------------ |
    | Name    | Yes (from profile) | Yes          |
    | Email   | Yes                | Yes          |
    | Phone   | Yes (if available) | Configurable |
    | Company | Yes (if available) | Configurable |
    | Subject | No                 | Yes          |
    | Message | No                 | Yes          |
    | Consent | No                 | Yes          |

    **Additional Fields (optional, company-configurable):**

    * Budget range
    * Timeline
    * Project type
    * How did you hear about us
  </Step>

  <Step title="Submit Inquiry">
    Member clicks "Send Inquiry":

    1. Form validated
    2. Lead record created
    3. Confirmation displayed to member
    4. Lead delivered to company
  </Step>

  <Step title="Member Confirmation">
    Success message shown:

    ```
    ┌─────────────────────────────────────────────────────────────┐
    │ ✅ Inquiry Sent                                             │
    ├─────────────────────────────────────────────────────────────┤
    │                                                             │
    │ Your inquiry has been sent to Acme Consulting.              │
    │                                                             │
    │ What happens next:                                          │
    │ • The company has been notified of your inquiry             │
    │ • They will typically respond within 1-2 business days      │
    │ • Check your email for their response                       │
    │                                                             │
    │ Reference: INQ-2025-12345                                   │
    │                                                             │
    │ [Back to Directory]  [View My Inquiries]                    │
    │                                                             │
    └─────────────────────────────────────────────────────────────┘
    ```

    **Email Confirmation:**

    * Copy of inquiry sent to member
    * Reference number included
    * Company contact info (if public)
  </Step>

  <Step title="Lead Delivered to Company">
    Company receives lead via:

    **Email Notification:**

    * Member name and contact info
    * Inquiry subject and message
    * Member profile summary
    * Quick response button

    **Sponsor Portal:**

    * Lead appears in Leads dashboard
    * Full member details
    * Ability to respond, track, archive

    **CRM Integration:**

    * Lead pushed to Salesforce/HubSpot
    * Tagged with source "Directory"
  </Step>
</Steps>

## Lead Data Captured

| Data Point      | Description                    |
| --------------- | ------------------------------ |
| Member Info     | Name, email, phone, company    |
| Member Profile  | Job title, location, interests |
| Inquiry Details | Subject, message               |
| Source          | Directory listing              |
| Timestamp       | When submitted                 |
| Company         | Receiving company              |

## Member's Inquiry History

Members can view their sent inquiries:

```
┌─────────────────────────────────────────────────────────────┐
│ My Inquiries                                                │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│ March 15, 2025                                              │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Acme Consulting                                         │ │
│ │ Subject: Request Quote                                  │ │
│ │ Status: Sent • Ref: INQ-2025-12345                      │ │
│ │ [View Details]                                          │ │
│ └─────────────────────────────────────────────────────────┘ │
│                                                             │
│ March 10, 2025                                              │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Tech Solutions Inc                                      │ │
│ │ Subject: Partnership Opportunity                        │ │
│ │ Status: Sent • Ref: INQ-2025-12300                      │ │
│ │ [View Details]                                          │ │
│ └─────────────────────────────────────────────────────────┘ │
│                                                             │
└─────────────────────────────────────────────────────────────┘
```

## Privacy Considerations

* Consent required before sharing data
* Member can opt out of data sharing
* Data retention policies apply
* Member can request inquiry deletion

## Related Entities

* [`Company Profile`](/entities/core/company-profile)
* [`User/Member`](/entities/core/user-member)

## Related Journeys

* [UJ-M-020](/member/journeys/browse-directory)
* [UJ-S-012](/sponsor/journeys/receive-leads)

## Acceptance Criteria

### Frontend

* [ ] Contact button on company profiles
* [ ] Contact form modal/page
* [ ] Pre-filled member details
* [ ] Subject dropdown
* [ ] Message textarea
* [ ] Consent checkbox
* [ ] Success confirmation
* [ ] My Inquiries list
* [ ] Form validation

### Backend

* [ ] `POST /api/directory/companies/{id}/contact` - Submit inquiry
* [ ] `GET /api/member/inquiries` - List member's inquiries
* [ ] Lead record creation
* [ ] Email notifications (both parties)
* [ ] CRM integration (if enabled)

### Permissions

* [ ] Only authenticated members can contact
* [ ] Rate limiting on contact submissions

### Business Rules

* [ ] Consent required to proceed
* [ ] Lead attributed to company
* [ ] Duplicate inquiry prevention (same company, short time)
* [ ] Lead notification to sponsor

### Error Handling

* [ ] Form validation errors
* [ ] Submission failure handling
* [ ] Rate limit message
