# Integration Architecture

## Purpose

The integration prevents HighLevel and Constant Contact from becoming two independent contact databases that must be maintained manually.

Instead, each system has a clearly defined role.

## System Responsibilities

### HighLevel

HighLevel is the master CRM.

HighLevel stores:

- Contact name
- Email address
- Phone number
- Mailing address
- Membership information
- FareHarbor information
- Donations and other CRM activity
- Internal tags
- Communication history
- Constant Contact synchronization metadata

Staff should make ordinary contact-record changes in HighLevel.

### Constant Contact

Constant Contact is primarily responsible for:

- Newsletter delivery
- Email marketing lists
- Confirmed opt-in
- Subscription status
- Unsubscribe processing
- Delivery status
- Bounce information
- Email campaign reporting

Constant Contact should not be treated as the primary CRM.

### n8n

n8n acts as the integration layer.

It is responsible for:

- Calling the Constant Contact API
- Calling the HighLevel API
- Receiving HighLevel webhook events
- Processing Constant Contact changes
- Updating HighLevel custom fields
- Applying email DND status
- Processing contacts in manageable batches
- Preventing the two systems from creating synchronization loops

## Data Flow

The overall architecture is:

```
                     CONTACT / CRM DATA

HighLevel ------------------------------------> Constant Contact
 Source of Truth                                  Email Platform

     ^                                                |
     |                                                |
     |                                                |
     +------------- n8n Integration -----------------+
                      Consent,
                      subscription,
                      delivery state
```

Profile information generally flows:

```
HighLevel → Constant Contact
```

Subscription and delivery information generally flows:

```
Constant Contact → HighLevel
```