# Potok connection

Integration allows the bot to find vacancies and candidates in Potok, save screening results in the candidate card and transfer the candidate to the allowed funnel stage.

Potok connects as a data source and a set of actions. This is not a communication channel: the candidate continues to write a bot through a connected messenger, hh.ru, email or other channel.

## What do you need?

- Potok account;
- API token with access to the right company;
- the right to read vacancies and candidates;
- rights to create candidates, add comments, and change stage if the bot performs these operations;
- The selected Potok environment in which your account is located.

Get an API token from your company administrator in Potok or request it from Potok support. The set of available data and transactions depends on the rights of the token.

!!!warning
Store the API token as a password. Do not add it to the system prompt, knowledge base, messages, screenshots or public files.
!!!

## Connecting to ChatRex

1. Open **Integrations** in the left-hand ChatRex menu.
2. Press **Connect integration**.
3. In the search bar, enter `Potok`. The card is among the data sources.
4. Press **Connect**.
5. Open the tab **Connection installation**.
6. Insert the API token and select the Potok environment that matches your account.
7. Press **Connect**.

After a successful check, ChatRex will show the status of **Connected** and the name of the Potok account.

## Connection check

1. Find Potok under **Integrations**.
2. Make sure the integration is enabled and the card is connected.
3. Press **Configure**.
4. On the **Connection installation** tab, check the status of **Connected** and the name of the desired account.
5. Add the test action **Find jobs** and make sure that the bot gets vacancies from the right company.

If the connection is not established, check the Potok environment, the expiration date of the token and its rights. To verify, use the new token without publishing the old one in correspondence.

## Shutdown

Open **Configure>Configure>Configure>Connect** and press **Break connection**. Once disabled, the bot will not be able to read and modify Potok data, and integration operations will cease to be performed.

If integration is no longer needed, it can also be turned off or removed from the shared list. Before removing, check if it is used in bot actions.

## Next step.

After connecting, configure [**Potok actions**](<../../actions/integrations/potok.md>): search for vacancies and candidates, create a card, save the conversation result and translate through the funnel.

!!!warning
Candidates contain personal data. Before launching, limit access to the token, get the necessary consents and check the script for the test vacancy and test candidate.
!!!
