One Lead, Two Systems, Kept in Step

Leads travel in from the CRM. What happens to them at the clinic travels back out.

The agency Marketing CRM HighLevel or any CRM that sends and receives webhooks
New leadContact, campaign, landing page, service asked about, notes
Lead converted to patientlead.converted
Lead matched to an existing patientlead.linked
New lead entered by stafflead.created
The clinic Moonshot EHR Leads board, charts and the front desk

What Flows In, What Flows Back

The CRM keeps running the ads, the forms and the follow-up. The EHR keeps the patient record. Each tells the other what it needs to know.

In · From the CRM to the EHR

Every new lead, with its campaign

The CRM posts each new lead to the clinic's lead webhook address, with the clinic's key. Email is the one required field.

  • Field labels work as sent. "UTM Source", "utm-source" and "utm_source" are the same field, and "Appointment Type" is read as the appointment type.
  • Campaign attribution. UTM fields, ad click ids, landing page and referrer land in the lead's Attribution.
  • Appointment type or service. What the visitor asked about shows on the lead's card on the Leads board.
  • Message and notes. The form's free-text box lands on the lead's timeline, labelled From the form.
  • Any other question. Other form answers show on the lead under their own labels, up to 25 per lead, with no change on the Moonshot side.
  • A receipt in the answer. The response tells the CRM which fields landed and whether the lead matched someone already in the clinic's records.
Back · From the EHR to the CRM

Three lead events, each by tickbox

The clinic switches each event on in Settings > Notifications > Marketing webhook. Each is sent to one https address the clinic saves.

  • Lead converted to patient (lead.converted). Sent once per lead when it becomes a new patient: staff convert it, or create a chart from its online registration.
  • Lead matched to an existing patient (lead.linked). Sent once per lead when it turns out to be someone who is already a patient. Same body as a conversion, with its own event name.
  • New lead entered by staff (lead.created). A lead the front desk adds by hand on the Leads page. Leads that came from the CRM are never sent back, so nothing loops.
  • What each one carries. The lead's name, email and phone, its source, the campaign attribution captured with it and the service asked about.

Existing Patients Are Not New Wins

Ads reach people who are already patients. A current patient sees a promotion, fills in the form, and becomes a lead in the CRM like anyone else. If the CRM only ever hears about new patients, that lead either sits open forever, or someone closes it by hand and it gets counted as a new patient the campaign won. Either way the agency's report is wrong.

Moonshot EHR keeps the two apart. A lead that matches a current patient reaches the front desk flagged Already a patient. When staff put it on the existing chart, the CRM receives Lead matched to an existing patient instead of Lead converted to patient.

The agency closes the contact without counting a new patient. Open leads are people still deciding, new-patient counts are new patients, and the clinic owner and the agency read the same numbers.

What the Front Desk Sees

The desk works leads in the EHR, and every lead shows what came in and what was sent back.

Leads on the Leads board

Each lead arrives with its source badge and the service the visitor asked about. Event and webinar sign-ups are filed under Event or Webinar, with the ad platform kept on the lead.

The form, on the lead

The visitor's message is on the lead's timeline, labelled From the form. Other answers sit in the lead drawer under their own labels, and the campaign in Attribution.

Already a patient, flagged

A lead that matches a current patient lands in New flagged Already a patient, so the desk knows a patient responded. Link to patient puts it on the existing chart.

A receipt on the lead's timeline

Every conversion or match sent to the CRM writes a line on the lead's timeline: delivered, or not delivered with the reason and a prompt to tell the marketing team.

A delivery log in Settings

The Marketing webhook card lists the last 50 events with Delivered, Pending or Failed, the HTTP code and the number of attempts.

Send test

Pick an event and send a sample to the CRM. The result, delivered with the HTTP status or failed and why, shows next to the button.

How to Connect

The clinic and the agency each do their half. The clinic's steps are on one Settings card.

1
The clinic shares its lead address and key
In Settings > Notifications > Marketing webhook, the card shows the address new leads are sent to. Show key reveals the key. Give both to the agency and treat the key like a password; the clinic can rotate it at any time.
2
The agency adds a webhook step to its lead workflow
Post each new contact as JSON to the address, with the headers X-Tenant-Slug and X-Webhook-Key. In HighLevel, a Custom Webhook action sends the contact's fields as flat pairs, which is what the address expects.
3
The clinic saves the CRM's inbound webhook URL
Paste the URL the agency's CRM receives webhooks on. It must be https on a public host. Generate a signing secret and give it to the agency so its system can check each delivery's HMAC-SHA256 signature.
4
Tick the events
Lead converted to patient, Lead matched to an existing patient and New lead entered by staff. Tick the ones the agency's workflows use.
5
Send a test, then map the events in the CRM
Send a test of each event and check the result next to the button. In the CRM, move converted leads to the new-patient stage and close matched leads without counting them as new patients.

What Is Sent, and Where to Read More

Lead events carry the lead's name, email and phone, the lead source, the campaign attribution captured with the lead and the service they asked about. Converted and matched events also carry the chart id and the time. Deliveries go only to the https address the clinic saved, and are signed with HMAC-SHA256 when the clinic sets a secret. The clinic points that address only at a system covered by its agreements with that vendor (a BAA where one is required).

Field names, the response receipt, event bodies, headers and signature checks are in the developer reference: Send leads and Receive signed events.

HighLevel is named on this page as an example CRM. This integration is independently developed by Moonshot Clinic LLC and is not affiliated with or endorsed by HighLevel.

Frequently Asked Questions

Does the lead sync work with HighLevel?
Yes. A HighLevel Custom Webhook action sends leads in as flat field pairs, which is what the clinic's lead address expects, and the clinic points its Marketing webhook at a HighLevel inbound webhook URL to receive events back. It works the same way with any CRM that can send and receive webhooks. HighLevel is named as an example only; Moonshot EHR is independently developed and not affiliated with HighLevel.
Will leads our CRM sent come back to it as new leads?
No. New lead entered by staff is sent only for leads the front desk adds by hand on the Leads page. Leads that arrived through the lead webhook, website forms, website chat or the public intake forms are never sent back, so the CRM never receives its own leads.
What happens if the CRM sends the same lead twice?
Sending the same lead again within 24 hours does not create a second lead. The answer says it was deduplicated, and a note from the form is attached to the existing lead once.
How does the CRM know an event really came from the clinic?
Events go only to the https address the clinic saved. When the clinic sets a signing secret, every delivery carries an X-Moonshot-Signature header: an HMAC-SHA256 of the exact request body, which the receiving system can check with the same secret.
What if a conversion does not reach the CRM?
The lead's timeline says so, with the reason, and prompts the front desk to tell the marketing team. The convert confirmation shows the same outcome, and the Marketing webhook card in Settings shows the result of the last conversion.
What information is sent to the CRM?
Lead events carry the lead's name, email and phone, the lead source, the campaign attribution captured with the lead and the service they asked about. Converted and matched events also carry the chart id and the time. The clinic decides where those go and points the address only at a system covered by its agreements with that vendor (a BAA where one is required).

See the Lead Sync Live

Book a demo and bring your agency. We'll walk through the Leads board, the Marketing webhook card and exactly what your CRM receives.

Book a Demo