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

# HighLevel Setup

> Connect your HighLevel CRM account with OAuth, webhooks, and attribution tracking.

Step-by-step guide for connecting HighLevel CRM to WisePilot for form attribution, conversation tracking, and AI agent management.

## Prerequisites

* HighLevel account with API access
* Form(s) configured in HighLevel
* Webhook access enabled

## Step 1: Connect HighLevel Account

<Info>You do NOT need to create your own OAuth app. The WisePilot platform provides shared OAuth credentials that all users can connect with.</Info>

1. Go to **Integrations → HighLevel**
2. Click **"Connect HighLevel"**
3. You'll be redirected to HighLevel to authorize
4. Select your location/company
5. Authorize the app
6. You'll be redirected back to WisePilot

### How OAuth Works

* **Platform OAuth App** — WisePilot has a pre-configured OAuth app in HighLevel Marketplace
* **User Authorization** — Each user authorizes their own HighLevel account
* **User-Specific Tokens** — Your access/refresh tokens are stored securely per account

### For Platform Administrators

If you're setting up WisePilot for the first time, you'll need to:

1. Create an OAuth app at [HighLevel Marketplace](https://marketplace.gohighlevel.com/)
2. Configure redirect URI: `https://your-domain.com/api/integrations/highlevel/callback`
3. Add the required environment variables

## Step 2: Configure Webhook

<Warning>Webhooks are configured in your OAuth app in the HighLevel Developer Portal, not in subaccount settings.</Warning>

1. Go to [HighLevel Marketplace](https://marketplace.gohighlevel.com/)
2. Navigate to **My Apps** → Select your app
3. Go to **Advanced Settings** → **Webhook** section
4. Add webhook URL: `https://your-domain.com/api/integrations/highlevel/webhook`
5. Subscribe to events:
   * **ContactCreate** (required) — Triggers on new form submissions
   * **ContactUpdate** (recommended) — Triggers on existing contact updates
6. Save the webhook configuration

<Note>This is a one-time setup per OAuth app. All users connecting with this app use the same webhook endpoint.</Note>

## Step 3: Create cr\_attrib Custom Field

<Warning>This is the most important step for attribution to work.</Warning>

### Option A: Automatic Creation (Recommended)

1. Go to the HighLevel integration page in WisePilot
2. Click **"Check & Create Custom Field"** in the "Custom Field Setup" section
3. The system checks if `cr_attrib` exists and creates it if needed

### Option B: Manual Creation

1. In HighLevel, go to Forms → \[Your Form] → Settings
2. Add a custom field named `cr_attrib`
3. Add a hidden field in the form builder
4. Configure it to read from URL parameter `cr_attrib`

## Step 4: Test Attribution

1. Visit a page with a CTA that includes `cr_attrib` in the URL
2. Click the CTA
3. Submit the HighLevel form
4. Check the [Data Quality Console](/optimization/data-quality) to verify attribution

## What Gets Synced Automatically

Once connected, WisePilot syncs HighLevel data on two cadences:

**Real-time (via webhook):**

* New form submissions with attribution data arrive immediately

**Nightly (automated sync):**

* Conversations — full message history with outcome classification
* Appointments — booking status, show rates, linked to conversations
* Opportunities — pipeline stage, monetary value, won status
* Agent prompt versions — detects when AI agent prompts change
* Contacts — anonymized metadata (tags, lifecycle stage, custom fields — no PII stored)
* Daily performance snapshots — per-agent metrics aggregated for trend tracking

Conversation quality scoring runs after the nightly sync completes. See [Automation & Data Freshness](/optimization/automation) for the full schedule.

<Tip>Use the conversation import wizard to backfill historical conversations rather than waiting for them to accumulate day by day.</Tip>

## Next Steps

Once connected, set up your HighLevel features:

* **[Conversations](/integrations/highlevel/conversations)** — Track AI agent conversations and outcomes
* **[Agents](/integrations/highlevel/agents)** — Configure AI agent prompts and knowledge bases
* **[Sequences](/integrations/highlevel/sequences)** — Build email/SMS nurture sequences

## Troubleshooting

### Form submissions not showing attribution\_id

* Verify `cr_attrib` custom field exists in HighLevel
* Verify form hidden field is reading from URL parameter
* Check webhook payload in HighLevel logs
* Verify webhook is enabled and receiving events

### Low join coverage

* Check [Data Quality Console](/optimization/data-quality) → Coverage By Source
* Verify CTA links include `cr_attrib` parameter
* Verify attribution script is loaded on all pages
* Check if forms are arriving from other sources (not CTAs)
