# Contacts

### Overview

The Contact Module manages customer information by creating, viewing, and exporting contact data as customers initiate chats. Key Features:

1. **IP Address Location**: Identifies the IP address for state, country, and province.
2. **Contact Data Synchronization**: Collects and updates contact information through a form in the chat.
3. **Contacts Management**: Provides a contacts section where agents can view and manage contacts for each project.
4. **Contact Export**: Enables agents to export contacts based on a date filter, generating a CSV file stored on AWS S3 and cleaning up local storage.

***

### Features

#### 1. Contact Creation

* **Description**: When a new customer initiates a chat, a new contact entry is automatically created.
* **Agent-Project Relationship**: An agent can belong to multiple projects, and each project can have multiple contacts.

#### 2. IP Address Location

* **Description**: The contact module locates the IP address details for better contextual understanding, mapping the IP to:
  * **State**
  * **Country**
  * **Province**

#### 3. Contact Data Synchronization

* **Description**: A form integrated into the chat collects additional information from the customer, filling any gaps in our contact records.
* **Data Sync Process**:
  * Contact-specific questions are asked to gather missing information.
  * The contact module automatically updates records with this information.

#### 4. Contacts Section

* **Description**: A dedicated section where agents can view and manage contacts associated with a project.
* **Contact Screen**: Displays a list of all contacts for the selected project, showing key details for easy access and management.

#### 5. Contact Export

* **Description**: Agents can export contacts using a date filter. The process triggers a job that generates a CSV file with contact data within the specified date range.
* **Export Process**:
  1. **Trigger Export Job**: When the export is initiated, a background job is triggered.
  2. **File Delivery**: Upon completion, the CSV file is sent to the agent via email or a notification.
* **Note**: Due to processing time, there may be a delay from export initiation to file delivery.

***

### FAQs

**Q1: How long does the export process take?**

* The time may vary depending on the amount of data to export. An email/notification is sent once the process completes.

**Q2: Can an agent see contacts from other projects?**

* No, agents only have access to contacts within projects they are assigned to.

**Q3: How is data synced from the chat form?**

* The chat form collects specific details from customers and automatically syncs this information to update the contact's record.

***


---

# Agent Instructions: 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:

```
GET https://docs.bodt.io/contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
