# External ID properties

To connect your source-app data with HubSpot objects, create a custom property in HubSpot that stores the primary ID from the source system.

For example, when syncing customer data to HubSpot contacts, define a property (e.g., `external_customer_id`) to hold the customer ID from the source app. This enables workflows to look up and match HubSpot records using that unique identifier.

## Unique properties

HubSpot also allows you to enforce uniqueness on custom properties across a given object type. By setting your customer ID property to be unique, HubSpot will prevent duplicate contacts from being created with the same ID—ensuring data integrity and supporting reliable record lookups in workflows.

<figure><img src="/files/d8gW1S7oapNIpcAHw3hz" alt=""><figcaption><p>When setting up a new property you can select "Require uinque values for this property" on the Rules page</p></figcaption></figure>

{% hint style="danger" %}
Once a property is created in HubSpot, you cannot retroactively set it as unique. To enforce uniqueness, you’ll need to create a new property with the unique setting enabled, then [use a workflow](https://knowledge.hubspot.com/workflows/create-workflows) to copy values from the original property to the new one.
{% endhint %}

As an integrator, using unique properties in HubSpot offers several advantages:

* **Secondary Identifier**: Unique properties can serve as secondary IDs when importing data manually or through the API
* **Streamlined API Updates**: Certain HubSpot APIs—such as the [Deals API](https://developers.hubspot.com/docs/guides/api/crm/objects/deals)—allow you to update records directly using a unique property, eliminating the need for additional lookup steps


---

# Agent Instructions: 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:

```
GET https://docs.middle.app/middle-docs/guides/app-reference/hubspot/external-id-properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
