# Connect to Planfix

The integration lets a ChatRex bot find and save contacts, create CRM tasks, change approved statuses, add tasks and comments, and return links to Planfix records.

Planfix is a data source in this version. Automation events and conversations through Chat API are not available.

## Prepare Planfix

You need administrator access to configure API access, REST API availability in your Planfix plan, and an integration subscription in ChatRex. The ChatRex subscription is purchased within ChatRex.

1. Open **Account management → API → REST API** in Planfix.
2. Create a dedicated robot and select it when creating a token. It needs access to the contacts, templates, processes and tasks used by the bot.
3. Create a token with **Common metadata**, read access to processes, projects and employees, read/create/update access to contacts and tasks, and permission to add comments. Deletion and employee updates are not required.
4. Keep the token in a secure location. ChatRex needs this token, not your Planfix password.
5. Prepare the process and task template for customer requests. In the verified interface, use **Account management → Types of objects → Task → Processes** and **Task → Templates**. The template must belong to the selected process.

If your account only uses the newer Objects, verify that the required template and process are also available through REST API. Do not select an unrelated process just to complete the connection.

## Connect in ChatRex

1. Open **Integrations → Connect integration → Data sources** and select **Planfix**.
2. Enter your HTTPS account address, such as `https://company.planfix.com`, and paste the token.
3. Select **Connect**, wait for the connected status, and verify the account address.
4. The subscription selector opens after connection. Activate the appropriate subscription through the regular checkout.
5. Select the process, CRM task template, contact template, initial status and approved statuses in the integration settings.
6. Select **API token owner**, the employee or robot that owns this token. Their time zone is used for task deadlines. Optionally select a separate assignee. Set the task due interval, contact mode and duplicate matching policy.
7. Select **Save**.

Templates and statuses come from your connected account. Changing the process clears dependent selections. If Planfix configuration changes, select **Refresh references**, check your selections and save again.

**Find existing contacts only** prevents new contact creation. **Find or create with customer consent** permits creation after consent. By default, the bot tries an exact phone match, then email. It never matches by name alone. A phone and email belonging to different contacts stop the write.

Silent mode applies to task status updates. It does not suppress notifications for task creation or comments.

## Configure and verify a bot

Add actions in the bot's **Integrations and actions** section. The template catalog also provides **AI consultant with Planfix**. Select the connected account and save. Process settings belong to the integration and affect other bots using the same connection.

Use a dedicated test contact to verify search, save, CRM task creation, status updates, a follow-up task, a comment and a record link. See [Planfix actions](../../actions/integrations/planfix.md) for parameters.

A CRM request is a Planfix task in the configured template and process. Before creating one, ChatRex checks for an active CRM task for the contact. Multiple matches require human review.

A status update can wait for Planfix confirmation. The bot must not report success until it is confirmed. If a write result is unknown, inspect Planfix before starting another creation request.

## Disconnect

Open the Planfix card and select **Disconnect**. ChatRex erases the saved token and stops executing actions. To revoke access completely, delete the token in Planfix REST API settings.

Reconnect the same account using this integration. Create a separate integration for a different account address. Review and save the mapping again after reconnecting.

A revoked token makes the connection inactive. Create a replacement token with the required permissions and reconnect.
