# Export Data

Concord CRM's export feature provides a seamless way to export your data into CSV, XLS, or XLSX formats, aiding in data analysis, reporting, or migration. However, due to technical constraints, not all resources are exportable. Below are the resources that support the export feature:

- Deals
- Contacts
- Companies
- Products
- Activities

You can access the export feature on the index page of each supported resource, for instance, on the contacts table.

## Performing an Export

Follow the steps outlined below to export data from a particular resource:

1. Navigate to the list view of the desired resource.
2. Click on the ellipsis button situated at the top right corner.
3. Select Export from the dropdown menu.
4. In the modal, choose the file format for the export.
5. Optionally, select a date range based on the creation date to filter the records to be exported.

Non-admin users with the without export permission can only export records they are able to view. The export feature adheres to the access control, ensuring users can't export unauthorized records.

### Using Filters

There might be scenarios where you need to export data based on specific criteria, like exporting all contacts created within a month, to achieve this, you should apply filters to the index view before performing the export.

1. Navigate to the Resource List View:

   - Go to the list view of the resource you want to export (e.g., Contacts, Deals, etc.).

2. Apply Filters:

   - Click on the filters dropdown and then click "New Filter".
   - Select the criteria for filtering. You can often filter data based on various fields like creation date, status, assigned user, etc.
   - Apply the desired filters to narrow down the list of records to your specified criteria.

3. Initiate Export:

   - Click on the ellipsis button situated at the top right corner.
   - Select Export from the dropdown menu.
   - In the export modal, tick the "Export records based on the applied filters" checkbox. This ensures that only the filtered records will be included in the export.

## Export Permission

By default, non-admin users are restricted from using the export feature. To grant export capabilities to a user:

1. Create a role with the necessary export permissions.
2. Assign this role to the desired user, thereby authorizing them to export specified resources.

## Customizing Fields

By default, Concord CRM exports all fields for a given resource. To customize the exported data:

1. Open Export Modal: Click on the Select Fields option within the export modal.
2. Select Fields: Tick the checkboxes next to the fields you wish to include in your export file.

This process allows you to tailor the exported data to your specific needs.

### Primary Fields

The application primary fields cannot be unselected from the list of available fields to be used for export.

### Choosing Date Range Field

In Concord CRM, when exporting records, the default date field used for filtering is the "Created At" date. However, you have the flexibility to choose a different date field based on the type of data you are exporting. This includes any custom field of type "Date" or "DateTime".

How to Select a Different Date Range Field:

- Look for the dropdown menu adjacent to the "Date Range" label.
- Select your preferred date field from this dropdown.

Usage Example:

- Suppose you want to export records based on a custom "Birthday" field. You can set the date range to include all records where the birthday falls within the current month.

This feature executes a MySQL 'between' query, offering a tailored approach to export records based on specific date criteria.

## Exporting Date Time Fields

When exporting data from Concord CRM, special attention is given to date fields to accommodate different time zones and ensure that the information remains clear and actionable across all users. Here's what happens with date fields during the export:

- Dual Column Date Fields: For each date field in your data, the export process generates two separate columns in the export file. This approach is designed to provide maximum flexibility and accuracy when dealing with date and time information.
  1. UTC Column: The first column represents the date and time in Coordinated Universal Time (UTC).
  2. User Time Zone Column: The second column displays the date and time adjusted to the time zone selected in the logged-in user's profile.

### Why Two Columns for Dates?

The two columns for dates in the exported file help you in two main ways:

- For Your Use: The column with your time zone makes it easy for you to understand dates and times.
- For Sharing or Other Systems: The UTC column is like a common language for dates and times. It's useful if you need to share your data with others or use it in different systems. Everyone can understand UTC, no matter where they are. This helps avoid confusion and makes sure your data stays accurate when moving between different places or programs.

This way, you get the best of both worlds: easy-to-read dates and times for you, and a standard format for sharing or using data elsewhere.