> For the complete documentation index, see [llms.txt](https://support.closer.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.closer.app/guide/getting-deeper/identify-leads.md).

# Identify leads

### Set up the contact bot

While you are away, Closer’s bot can help you to gather contact information from the clients who reached out to you. To be able to do that, it needs to be set for the job correctly. In the Profile & Settings>widget configuration, you should add three mandatory fields:

**1. Bot's welcome message**

Customer leaving their contact data may depend on the tone of this message. You can learn more about this subject [here](https://blog.prototypr.io/a-guide-to-developing-bot-personalities-c6eba213d77b)

![Bot's welcome message](/files/-Lh_ae3cnIYoMMrDQ09e)

**2. GDPR agreement**

![Closer GDPR settings](/files/-Lh_aqHk7WxQeKB-qdYw)

**3. Default prefix number**

![Phone default setting for faster entering data](/files/-Lh_b01oOSJXUZgeriKp)

### Identify a customer via our JS SDK

The **apiKey** parameter allows you to identify customers logged in to your website or app, so that their conversation history is stored and synced. To get it, [enter your endpoint’s URL](https://closer.app/dashboard/settings/webhooks) to listen for the **conversation.created** webhook:

![](/files/-Lh_bJ-t4T0ZBQwJeReO)

The data structure being sent contains the **apiKey** parameter. Store it and use it in the **closer.init** method every time the user is logged in with the same credentials.

```
closer.init({
  orgId: "00000000-0000-0000-0000-000000000000",
  apiKey: "00000000-0000-0000-0000-000000000000",
})
```

### Push customer contact data to Closer

Your website or app usually has customer’s contact information at some point. You can use the **closer.identify** method to send this data to Closer. It will be automatically displayed on the dashboard and in the mobile app. You can call this method multiple times, every time some piece of information is added.

```
closer.identify({
  firstName: "Jon",
  lastName: "Snow",
  email: "jon.snow@winterfell.com",
  phone: {
    region: "PL",
    number: "+48123456789",
  },
});
```

To remove data that is no longer valid for the current customer, just use the **closer.identify** with an empty string:

```
closer.identify({
  email: "",
});
```

### Send custom data about the customer

**Closer** also allows you to send custom data in the **key: value** format - you should use the **additionalData** parameter for that purpose. You can use it to send insights that will be visible to your team. You can also define the customer’s language via the **languageLocale** parameter, so that your team know in which language the customer was reading the website.

```
closer.identify({
  languageLocale: "en",
  additionalData: {
    internalId: "value",
    customerGroup: "premium",
  },
});
```

### Use widget in sidebar mode

**Closer** widget can also be displayed in a sidebar instead of floating on top of the page. In order to do that, you need to prepare a container that will hold the widget’s body after opening, and provide this container’s selector via the container parameter of the **closer.init** method.

```
closer.init({
  orgId: "00000000-0000-0000-0000-000000000000",
  container: "#widget-sidebar",
});
```


---

# 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://support.closer.app/guide/getting-deeper/identify-leads.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.
