> For the complete documentation index, see [llms.txt](https://docs.middle.app/middle-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.middle.app/middle-docs/guides/app-reference/highlevel/integration-guides/antaris/client-and-membership-sync.md).

# Client and Membership Sync

## Client Contact Sync

A single **Client** workflow runs from an Antaris Client record and creates or updates the matching HighLevel contact. It syncs both basic contact information (name, email, phone, address) and membership-specific values (status, expiry date, cancellation date, freeze dates) in one pass.

### Identity resolution

The action requires either an email or phone number. HighLevel treats email and phone as unique identifiers, so passing an existing contact's email or phone updates that contact instead of creating a duplicate.

{% hint style="warning" %}
**Duplicate risk**

If a client has multiple emails or inconsistent phone formats, duplicates can be created.
{% endhint %}

#### Multiple memberships

If a client has more than one membership, the workflow decides which membership's data (status, expiry, freeze dates, etc.) to write to the contact. It picks a "primary membership" using this priority:

1. The membership the client uses to check into the facility
2. Otherwise, the membership that was most recently updated

## Check-In Sync

Middle keeps a contact's most recent gym or studio visit in sync, so HighLevel automations can react to recency of visits.

Rather than simply writing the date of the triggering check-in, the workflow looks up the client's full check-in history and writes the most recent sign-in date it finds. This means a late-arriving or out-of-order check-in event can never move the field backwards.

## Online Signup Sync

Middle flags contacts who joined through an online/web signup, so HighLevel can route or tag them differently from walk-in or front-desk signups. The worikflow runs from an Antaris Online Signup record and creates or updates the matching HighLevel contact.

## Data mapping

<table><thead><tr><th width="247.07421875">HighLevel Field</th><th width="108.7421875" data-type="checkbox">Custom?</th><th width="196.08984375">Antaris Field</th><th width="97.29296875">Dropdown options</th><th width="89.28515625">Type<select><option value="EQUb244lu6Md" label="Email" color="blue"></option><option value="3dAq12Y7Ia3Y" label="Date" color="blue"></option><option value="gbYWUcsZ9dLx" label="Date &#x26; Time" color="blue"></option><option value="1293n0HoppH6" label="Dropdown" color="blue"></option><option value="vrFh7gQ6Jua8" label="Phone" color="blue"></option><option value="rGRdFVmTBvfX" label="Text" color="blue"></option><option value="9SXk4gwWbGPA" label="Checkbox" color="blue"></option></select></th><th width="146.90234375">Antaris Source</th></tr></thead><tbody><tr><td>Email</td><td>false</td><td><code>email</code></td><td></td><td><span data-option="EQUb244lu6Md">Email</span></td><td>Client</td></tr><tr><td>Phone</td><td>false</td><td><code>home_phone</code> (falls back on <code>cell_phone</code> if <code>home_phone</code> does not exist)</td><td></td><td><span data-option="vrFh7gQ6Jua8">Phone</span></td><td>Client</td></tr><tr><td>First name</td><td>false</td><td><code>first_name</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td>Last Name</td><td>false</td><td><code>last_name</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td>Address</td><td>false</td><td><code>street</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td>City</td><td>false</td><td><code>city_id</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td>State</td><td>false</td><td><code>state_id</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td>Postal code</td><td>false</td><td><code>zipcode</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td><code>contact.antaris_client_id</code></td><td>true</td><td><code>client_id</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Client</td></tr><tr><td><code>contact.date_joined</code></td><td>true</td><td><code>date_joined</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Client</td></tr><tr><td><code>contact.membership_status</code></td><td>true</td><td><code>status</code></td><td>Active<br>Expired<br>Frozen<br>NSF<br>Pending</td><td><span data-option="1293n0HoppH6">Dropdown</span></td><td>Membership</td></tr><tr><td><code>contact.membership_expiry_date</code></td><td>true</td><td><code>current_expiry_date</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Membership</td></tr><tr><td><code>contact.membership_cancelled_date</code></td><td>true</td><td><code>cancelled_date</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Membership</td></tr><tr><td><code>contact.membership_freeze_start</code></td><td>true</td><td><code>freeze_start</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Membership</td></tr><tr><td><code>contact.membership_freeze_end</code></td><td>true</td><td><code>freeze_end</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Membership</td></tr><tr><td><code>contact.membership_start_date</code></td><td>true</td><td><code>start_date</code></td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Membership</td></tr><tr><td><code>contact.membership_type</code></td><td>true</td><td><code>name</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Membership Type</td></tr><tr><td><code>contact.home_location</code></td><td>true</td><td><code>loc_id</code></td><td></td><td><span data-option="rGRdFVmTBvfX">Text</span></td><td>Membership</td></tr><tr><td><code>contact.gender</code></td><td>true</td><td><code>gender</code></td><td>M<br>F<br>O</td><td><span data-option="1293n0HoppH6">Dropdown</span></td><td>Client</td></tr><tr><td><code>contact.last_check_in_date</code></td><td>true</td><td>most recent <code>date</code> accross the client's sign-ins</td><td></td><td><span data-option="3dAq12Y7Ia3Y">Date</span></td><td>Sign-In</td></tr><tr><td><code>contact.web_signup</code></td><td>true</td><td><code>true</code> if the signup's <code>type</code> is online, otherwise <code>false</code></td><td></td><td><span data-option="9SXk4gwWbGPA">Checkbox</span></td><td>Online Signup</td></tr></tbody></table>

{% hint style="info" %}
**Custom fields:** for the integration to work, you'll need to create [custom fields](https://help.gohighlevel.com/support/solutions/articles/48001161579-how-to-use-custom-fields) on the HighLevel contact object. The unique key will need to match the value in the in HighLevel field column in the table above.
{% endhint %}

{% embed url="<https://help.gohighlevel.com/support/solutions/articles/48001161579-how-to-use-custom-fields>" %}

## Tags

The Membership workflow also adds a HighLevel tag based on the Antaris membership status:

| Antaris membership status | HighLevel tag    |
| ------------------------- | ---------------- |
| Active                    | `active member`  |
| Expired                   | `expired member` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.middle.app/middle-docs/guides/app-reference/highlevel/integration-guides/antaris/client-and-membership-sync.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
