# What syncs

How GoHighLevel CRM events become server-side conversions, and how the results are written back onto contacts and opportunities.

Once an account is connected, Zernio relays the GoHighLevel events that are real money signals and writes the results back. You do not host or maintain the endpoint; GoHighLevel posts to Zernio.

## Receive events

GoHighLevel posts events to `/api/webhook/gohighlevel`. Zernio verifies the `X-GHL-Signature` (Ed25519) against GoHighLevel's public key, deduplicates on the webhook id, acknowledges at once, and processes on a queue.

A retried or duplicated delivery is never processed twice, and a slow downstream never drops an event.

## Events relayed

| GoHighLevel event | Becomes |
|-------------------|---------|
| `ContactCreate` | `Lead` |
| `OpportunityCreate` | `QualifiedLead` |
| `OpportunityStatusUpdate`, `OpportunityStageUpdate`, `OpportunityMonetaryValueUpdate` | `Purchase` with the deal value when the status is won; a lost or abandoned deal retracts it |
| `AppointmentCreate` | `Schedule` |
| `InvoicePaid`, `InvoicePartiallyPaid` | `Purchase` with the amount paid |
| `OrderCreate`, `OrderStatusUpdate` | `Purchase` once paid; a refund retracts it |

Each relayed event is stored with `source: "gohighlevel"` and a stable event id built from the location, the conversion and the GoHighLevel object, so a repeated update never counts twice.

## Forward to ad platforms

With `reportToAds` on, each relayed event is sent through `POST /v1/events` to the profile's ad platform destinations, each one through its own server-side API, with deduplication and an attribution ladder.

Read the stored conversions back with `GET /v1/events`, filtered by `source=gohighlevel`.

## Write results back

With `writeBackAttribution` on, Zernio writes each relayed conversion onto a `Zernio Conversions` text custom field on the GoHighLevel contact, creating the field the first time. It holds one line, for example `Purchase · 40.00 USD · Meta, Google · 2026-11-21`.

## Start a workflow on a conversion

The app adds the **Zernio conversion received** workflow trigger (key `zernio_conversion_received`). Each time Zernio stores a relayed conversion for a sub-account, every workflow there that uses the trigger starts with:

| Field | Value |
|-------|-------|
| `eventName` | The conversion, such as `Lead` or `Purchase` |
| `eventId` | Zernio's event id |
| `value`, `currency` | The conversion value, when it has one |
| `contactId` | The GoHighLevel contact |
| `platforms` | The ad platforms the event reached |
| `occurredAt` | When it happened, ISO 8601 |

The **Send a Zernio conversion event** workflow action does the reverse: it sends a conversion from a GoHighLevel automation to Zernio, stored with `source: "gohighlevel"`.

## How it behaves

- Settings control each half: `relayConversions` turns the relay on, `reportToAds` forwards to ad platforms, `writeBackAttribution` writes results back. See [Settings](/platforms/gohighlevel/settings).
- Turning `reportToAds` on forwards events received from then on; it does not backfill earlier events.
- An agency install fans out: every sub-account relays on its own location token.

## Related

- [Settings](/platforms/gohighlevel/settings)
- [Limits and errors](/platforms/gohighlevel/reference)