> For the complete documentation index, see [llms.txt](https://developer.kizen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/synchronize-medicare-enrollments-from-healthsherpa-to-agentcrm.md).

# Synchronize Medicare Enrollments from HealthSherpa to AgentCRM

Receive Medicare enrollment submissions from HealthSherpa for adding or updating AgentCRM Contact Records.

{% hint style="success" %}
**Audience:** Admins, Developers, Solution Architects

**Purpose:** Describes how AgentCRM handles Medicare enrollment submissions from HealthSherpa&#x20;
{% endhint %}

## Overview

The HealthSherpa integration receives Medicare enrollments from HealthSherpa and, when possible, associates the enrollments with existing <code class="expression">space.vars.contacts</code> in AgentCRM and synchronizes these <code class="expression">space.vars.entities</code> accordingly.

***

## Before You Begin

To synchronize Medicare enrollments from HealthSherpa to AgentCRM, you need an active connection to HealthSherpa. For details, see [Connect HealthSherpa to AgentCRM](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/connect-healthsherpa-to-agentcrm.md).

***

## Synchronize Medicare Enrollments from HealthSherpa to AgentCRM

Medicare enrollment information from HealthSherpa comes into AgentCRM through the integration automatically upon submission. The integration refreshes the data in your AgentCRM <code class="expression">space.vars.contact</code> <code class="expression">space.vars.entities</code> within one minute of receipt.

### Record Matching

When the integration receives a Medicare enrollment from HealthSherpa, the integration decides whether to update an existing <code class="expression">space.vars.contact</code> in AgentCRM or create a new <code class="expression">space.vars.contact</code> based on the following logic:

1. If the HealthSherpa contact is already linked to an AgentCRM <code class="expression">space.vars.contact</code>, update the AgentCRM <code class="expression">space.vars.contact</code>.
2. If the email address of the HealthSherpa contact matches the email address of an AgentCRM <code class="expression">space.vars.contact</code>, and the first name, date of birth, and Medicare number don't conflict, update the AgentCRM <code class="expression">space.vars.contact</code>.
3. If the Medicare number of the HealthSherpa contact matches the Medicare number of an AgentCRM <code class="expression">space.vars.contact</code>, update the AgentCRM <code class="expression">space.vars.contact</code>.
4. If the first name and phone number of the HealthSherpa contact matches the first name and the mobile phone, home phone, or business phone of the AgentCRM <code class="expression">space.vars.contact</code>, update the AgentCRM <code class="expression">space.vars.contact</code>.
5. If the last name and the carrier of the HealthSherpa contact matches the last name and carrier of the AgentCRM <code class="expression">space.vars.contact</code>, and there is no information about the email address, phone number, and Medicare number of the HealthSherpa contact, update the AgentCRM <code class="expression">space.vars.contact</code>.

If none of these rules applies, AgentCRM creates a new <code class="expression">space.vars.contact</code>. However, if a rule returns more than one possible match in AgentCRM and no higher rule resolves the match cleanly, the integration sets the submission aside until you manually review it.

### Update Behavior

When the integration updates an existing <code class="expression">space.vars.contact</code>, it never overwrites existing data values. Therefore, a new submission can add new links to enrollments, drugs, providers, and pharmacies, but it doesn't remove the old ones.

Also, the integration doesn't assign an email address to the <code class="expression">space.vars.contact</code> if a different <code class="expression">space.vars.contact</code> in AgentCRM already has the same email address.

***

## What's Next

Continue to [Troubleshoot HealthSherpa](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/troubleshoot-healthsherpa.md) to find solutions to common issues with the integration.

<details>

<summary><strong>Related Topics</strong></summary>

* [HealthSherpa](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa.md)
* [Connect HealthSherpa to AgentCRM](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/connect-healthsherpa-to-agentcrm.md)
* [Start a Medicare Quote in HealthSherpa from AgentCRM](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/start-a-medicare-quote-in-healthsherpa-from-agentcrm.md)
* [Troubleshoot HealthSherpa](https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/troubleshoot-healthsherpa.md)

</details>

***

*HealthSherpa's name, logo, and all related names, logos, product and service names, designs and slogans are trademarks of HealthSherpa. Kizen's HealthSherpa integration is not affiliated with, sponsored by, or endorsed by HealthSherpa.*


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.kizen.com/docs/apps-and-integrations/integrations/healthsherpa/synchronize-medicare-enrollments-from-healthsherpa-to-agentcrm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
