Apple Marketplace

← Back to shop

Integration

Client data to GoHighLevel (GHL)

Built, not sending The sync code is in place and runs in dry-run mode: it builds each GHL payload and logs it, but sends nothing until the GHL token and IDs are set in Netlify.

What gets sent

SourceFieldsUsed for
Quote request formName, work email, organization, phone, buyer type, ship-to address, notes, and the list of products and quantitiesCreate or update the contact and add an Apple quote opportunity
Buy now checkoutProduct, quantity, order status, and the buyer details Stripe returnsRecord the order and move the opportunity to paid
Hero email captureWork email onlyStart a contact with the source set to the Apple funnel

Built

  • Sync function ghl-sync.js: upserts the contact (tags source:apple-funnel and type:quote or type:order) and creates or updates one opportunity with the products and quantities.
  • Stripe webhook in checkout.js: a signed checkout.session.completed moves the order to the paid stage. Unsigned or stale calls are refused.
  • Test contacts: any name containing TEST is tagged test-contact so it can be removed in GHL.

What is needed to connect it

  • The GHL location ID for the VSI Apple sub-account (GHL_LOCATION_ID).
  • A GHL API token, stored in Netlify as GHL_TOKEN. It is never written into the site code.
  • The pipeline ID (GHL_PIPELINE_ID) and the quote and paid stage IDs (GHL_STAGE_QUOTE, GHL_STAGE_PAID).
  • The Stripe webhook signing secret (STRIPE_WEBHOOK_SECRET) for the endpoint that points at the checkout function.
  • Written approval of the fields above and of how long the data is kept.

Controls

  • Only the fields above are sent. Card details are never sent to GHL; payment is handled by Stripe.
  • Each contact is tagged with its source, so Apple leads stay separate from other VSI lines.
  • Test submissions must use the name TEST so they can be removed from GHL.