# Close

Close is a powerful all-in-one customer relationship management service which offers a fleet of services including calling, email automation, predictive.

## Overview

Close is a powerful all-in-one customer relationship management service which offers a fleet of services including calling, email automation, predictive dialers, and more. It is a powerful set of tools to support and strengthen your sales teams.

## Authentication

Add a Close connector step to your workflow. Click on the 'New Authentication' option now available in the right hand panel and name as appropriate.
![add-auth](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-550b03d3_../../../../../images/add-auth.png)
In order to fully authenticate with Tray.io and Close, you will need a Close 'API Key' which can be accessed by following the steps displayed below:

1. Log into your Close account and select 'Settings' on the side panel.
   ![select-settings](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-e1201265_1close-select_settings.png)
2. Select 'API Keys' from the Integrations section of the interior side panel.
   ![select-api-key](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-2a0b9bca_2close-select_api_key.png)
3. Click the '+ New API Key' button.
   ![click-new-api-key](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-5b92d614_3close-click_new_api_key.png)
4. Give your API Key a name and click 'Create API Key'.
   ![name-your-api-key](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-c09d2bc5_4close-name_your_key.png)
5. Click the copy to clipboard button. It's worth noting that the API Key will not be displayed again. Make sure to store it safely.
   ![copy-key-to-clipboard](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-fbdc4388_5close-copy_to_clipboard.png)
6. Paste the API Key into the Api key section of your new authentication and click the 'Add authentication' button.
   ![paste-key-in-auth](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-e387def1_6close-add_to_auth.png)
7. You have now successfully authenticated your Close account in the Tray platform.

## Available Operations

The examples below show one or two of the available connector operations in use.
Please see the [Full Operations Reference](#operationsFull) at the end of this page for details on all available operations for this connector.

## Example usage - Listing contacts, Looping through the list and Getting each contact

Create a new workflow with a Manual Trigger, a Close connector, a Loop Collection and a second Close connector.
![create-workflow](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-43428e5e_7close-create-workflow.png)
Select the Close connector, authenticate as above and choose the **List contacts** operation.
![select-list-contacts](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-5844fe74_8select-list-contacts.png)
If you were to run the finished workflow, the log from a successful output would show that this operation returns a **data** array containing the contacts objects.
![check-data-array](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-b7ae0772_9check-the-data-array.png)
Then set the Loop Collection connector to **Loop List** and enter `$.steps.close-1.data` as the **List** in order to grab the above contacts one-by-one.
![set-loop-connector](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-959675b0_91set-loop-connector.png)
You will note from the output from **List contacts** that each contact object has an `id` output field. You can then, for each contact that is fed by the loop, grab the `id` and pass it into the second Close connector.
![set-get-contact](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-571cd475_92set-get-contact.png)
The **Get contact** operation is chosen and `$.steps.loop-1.value.id` gets the `id` of the contact from the Loop connector to enter it as the **Contact** to pull the contact from Close.
Once the workflow is set up, click 'Run Workflow' and then click on the 'Debug' tab to look through all the inputs and outputs of a successful run of the workflow.
![complete-workflow](https://tray.ai/documentation/images/connectors/service/close/bb5d8d92-7075fe5c_93complete-workflow.png)
In real life situations, you will likely be dealing with large numbers of records - dozens, hundreds or thousands. In this case you should make use of pagination tokens returned by the operation, and build a more complex loop as described in our [pagination documentation](https://tray.ai/documentation/platform/automation-integration/advanced-use-cases/batching-queueing/pagination).
