# Close Destination

[Close](https://close.com/) is the inside sales CRM of choice for startups and small and midsize businesses (SMBs.)

## Getting started

1. Go to your Close app and select the Organization you want to use.
2. Click **Settings** in the bottom left, then click **API Keys** in the left menu. Create a new API Key.
3. From the Segment web app, click **Catalog**, then click **Destinations**.
4. Find the Destinations Actions item in the left navigation, and click it.
5. Click the "Close" item to select it and click Configure.
6. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)

## Destination Settings

| Field                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Required | Type     |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API key                             | Your Close API key.                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes      | password |
| Contact Custom Field ID for User ID | Enter the ID of a Contact Custom Field that'll be used to store User ID. You'll need to create this Contact Custom Field in Close first, and then the integration will use this field to store the User ID when creating new contacts, and/or will be used as a lookup key when updating existing Contacts. The Custom Field type must be a text. If this field is not filled out, it will only look up and de-dupe based on email.      | No       | string   |
| Lead Custom Field ID for Company ID | Enter the ID of a Lead Custom Field that'll be used to store Company ID. You'll need to create this Lead Custom Field in Close first, and then the integration will use this field to store the Company ID when creating new contacts, and/or will be used as a lookup key when updating existing Lead. The Custom Field type must be a text. If this field is not filled out, it will only lookup and de-dupe based on Contact's email. | No       | string   |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Close-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Create or Update Contact and Lead](#create-or-update-contact-and-lead)

### Create or Update Contact and Lead

Create or Update Contact and/or Lead. At first, Close will try to find Lead via Lead Company ID. If Lead is not found, Close will try to find a Contact either via Contact User ID or via Contact Email. If Contact is not found, Close will create a new Lead and Contact. It will also create a new Lead and Contact if Contact is found but exists under a Lead with different Lead Company ID. If the Action does not specify Lead Company ID, Close will update the Contact and also the Contact’s Lead. It might happen that Close will find multiple Contacts with the same Contact User ID or Contact Email. In such case, Close will update up to 10 Contacts, ordered by creation date.

Create or Update Contact and Lead is a **Cloud** action. The default Trigger is `type = "identify"`

| Field                                                  | Description                                                                                                                                        | Required | Type    |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Lead Name                                              | The name of the Lead.                                                                                                                              | No       | STRING  |
| Lead Company ID                                        | Your ID that identifies the Lead. Lead Custom Field ID for Company must be defined in the global integration settings.                             | No       | STRING  |
| Lead Description                                       | Description of the Lead.                                                                                                                           | No       | STRING  |
| Lead Status ID                                         | ID of the Lead Status (\`stat\_xxxx\`). You can get it in Close in the Statuses & Pipelines page.                                                  | No       | STRING  |
| Lead Custom Fields                                     | Custom Fields to set on the Lead. Key should be Custom Field ID (\`cf\_xxxx\`).                                                                    | No       | OBJECT  |
| Contact Name                                           | The name of the Contact.                                                                                                                           | No       | STRING  |
| Contact Email                                          | Used to lookup Contact if Contact User ID is not set. If the Contact already has different email address, this value will be appended.             | No       | STRING  |
| Contact Phone                                          | If the Contact already has different phone number, this value will be appended.                                                                    | No       | STRING  |
| Contact URL                                            | If the Contact already has different URL, this value will be appended.                                                                             | No       | STRING  |
| Contact Title                                          | The title of the Contact.                                                                                                                          | No       | STRING  |
| Contact User ID                                        | Your ID that identifies the Contact. Contact Custom Field ID for User ID must be defined in the global integration settings.                       | No       | STRING  |
| Contact Custom Fields                                  | Custom Fields to set on the Contact. Key should be Custom Field ID (\`cf\_xxxx\`).                                                                 | No       | OBJECT  |
| Allow creating new Leads                               | Whether the integration is allowed to create new Leads.                                                                                            | No       | BOOLEAN |
| Allow updating existing Leads                          | Whether the integration is allowed to update existing Leads.                                                                                       | No       | BOOLEAN |
| Allow creating new Contacts                            | Whether the integration is allowed to create new Contacts.                                                                                         | No       | BOOLEAN |
| Allow updating existing Contacts                       | Whether the integration is allowed to update existing Contacts.                                                                                    | No       | BOOLEAN |
| Allow creating duplicate Contacts under different Lead | Whether the integration is allowed to create duplicate Contact (same email or Contact User ID) under a different Lead (different Lead Company ID). | No       | BOOLEAN |
