Affinity Design
Agency Guide

Agency GoHighLevel Configuration

Setting up agency-level GoHighLevel integration for client sync and field mapping

Overview

The Agency GHL configuration is a platform-level GoHighLevel connection that handles:

  • Custom field bootstrap — Creates standardized custom fields across all client GHL locations
  • Client contact sync — Pushes client business data into GHL as agency-level contacts
  • Token management — Manages the agency GHL OAuth token for bulk operations

This is separate from per-client GHL connections (which each client authorizes individually).

Setting Up Agency GHL

  1. Navigate to Settings → Agency GHL
  2. Enter your agency GHL OAuth credentials:
    • Access Token — From your GHL agency OAuth flow
    • Refresh Token — For automatic token renewal
    • Location ID — Your agency's GHL location ID
  3. Click Save

Getting Your Agency OAuth Token

  1. Create a GHL Marketplace app (see the deployment guide for full setup)
  2. Use the OAuth flow with your agency's GHL account
  3. Copy the resulting access and refresh tokens into the Agency GHL settings

Bootstrapping Custom Fields

When you connect GHL for a new client, the platform needs certain custom fields to exist in that client's GHL location — for example, fields to store call summaries, outcomes, and recording URLs.

Bootstrap Fields creates these fields automatically:

  1. Go to Settings → Agency GHL
  2. Click Bootstrap Fields
  3. The system creates the standard set of custom fields in all connected GHL locations:
    • Call datetime
    • Call outcome
    • Call summary
    • Call duration
    • Recording URL
    • Transcript
    • Sentiment
    • Qualification status
    • And more (12 fields total)

You only need to run this once per client, but it's safe to re-run — existing fields are detected and skipped.

Syncing Client Data

Sync All pushes your client records into GHL as contacts:

  1. Go to Settings → Agency GHL
  2. Click Sync All
  3. Each active client is created or updated as a contact in your agency's GHL location

For individual clients:

  1. Open the client detail page
  2. In the Agency GHL section, click Sync
  3. Only that client's data is pushed

What Gets Synced

Platform FieldGHL Contact Field
Business NameCompany name
Contact NameFirst/Last name
PhonePhone
EmailEmail
Service TypeTags
Client StatusCustom field

Token Health

GHL access tokens expire periodically. The platform automatically refreshes them using the stored refresh token. To check token health for a specific client:

  1. Open the client detail page
  2. Look for the GHL Token Status indicator
  3. Green = healthy, Yellow = expiring soon, Red = expired

If a token expires and can't be refreshed, you'll need to re-authorize that client's GHL connection.

Troubleshooting

IssueCauseFix
Bootstrap fails with "field already exists"Fields were created manuallySafe to ignore — existing fields are skipped
Sync creates duplicatesClient was previously synced as a different contactMerge duplicates in GHL, then re-sync
Token expiredGHL token TTL exceededRe-authorize the client's GHL connection
Missing custom fields on new clientBootstrap wasn't run for this locationRun Bootstrap Fields again

On this page