Partner enrollment Marketplace action setup
The code-side adapter isPOST /api/marketplace/partner-enrollment. It requires
Authorization: Bearer <location-bound token> and this JSON body:
GHL_PARTNER_ENROLLMENT_ACTION_TOKENS_JSON as a JSON object mapping each
allowed location ID to its bearer token, for example
{"location-a":"token-a","location-b":"token-b"}. For a single-location setup,
both GHL_PARTNER_ENROLLMENT_ACTION_LOCATION_ID and
GHL_PARTNER_ENROLLMENT_ACTION_TOKEN may be set instead. The fallback token is only
accepted when the request’s validated locationId exactly matches the configured
location. A token configured without a bound location is rejected.
The adapter validates all fields, scopes the actor and campaign to the supplied
location, verifies the contact through that location’s CRM connection, and reuses
the existing enrollment-workflow bridge. executionId is stored in a durable Convex
claim/completion ledger. Concurrent deliveries are rejected while the claim lease is
active, and completed successful results are replayed without executing enrollment
again. A provider success followed by a process crash before completion can be retried
after the lease; the CRM workflow-add operation must therefore remain idempotent.
Register and configure the custom workflow action in the Marketplace console.
That console-only registration and a live CRM enrollment are not performed by this
repository change. Use the console’s documented unique execution identifier; do
not substitute a constant.
