# How to choose the right Custom User ID to use in Batch?

Batch allows you to store a **Custom User ID** that can automatically be tied to several push tokens from different OS' and Apps (web, mobile). This allows you to use the Batch-related features, such as [Batch APIs](/developer/api/cep.md) ([Profile API](/developer/api/cep/profiles/update.md), [Campaign API](/developer/api/cep/campaigns/create.md), etc.), import [Audiences](/getting-started/features/customer-engagement-platform/profiles/audiences.md), etc.

The **Custom User ID** you communicate with Batch should be a **unique ID** that you use to identify your users across different tools and databases in your technical ecosystem. This ID will allow you to connect your other tools (internal and external) with Batch.

If you are wondering which ID you should use as a custom user identifier, here are a few examples:

## Login System <a href="#login-system" id="login-system"></a>

If you have a login system, you probably have a **unique user ID** associated with the user's account. Simply set this ID as your user identifier, and don't forget to reset it *(by setting it to nil)* when the user logs out.

While email addresses are an appropriate identifier, we suggest you hash them before setting them as your identifier, for privacy reasons.

## PaaS Datastore <a href="#paas-datastore" id="paas-datastore"></a>

Your data store probably has a **stable ID** associated with your installation. You just need to make sure it is *unique* between installations, and you can easily retrieve it from your backend code.

## Specific Backend And Database <a href="#specific-backend-and-database" id="specific-backend-and-database"></a>

Anything that can identify a user uniquely will work. Email address, phone number, etc. We suggest you hash this information before setting it up and using the same hash on your backend.

Otherwise, you will need to create a stable identifier for your app installation and send it to your backend. The most common way to do that is to generate an [RFC4122 UUID](https://www.ietf.org/rfc/rfc4122.txt).


---

# 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://doc.batch.com/developer/technical-guides/how-to-guides/how-to-choose-the-right-custom-user-id-to-use-in-batch.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.
