# Data Views

This feature is available starting from version 1.5.0.

Concord CRM has transitioned from a filters feature to a more versatile data views feature. Data views allow users to create multiple views of the same table with different filters, columns, default sort etc..., applied to each view. This enhances the flexibility and usability of the data, providing a more tailored experience for each user.

## Key Features of Data Views

1. Default View: Users can set a data view as the default by dragging the view to be the first in the list.
2. Multiple Views: Users can add up to 5 active data views, which will be displayed above the table for easy access.
3. Shared Views: Data views can be shared with other team members, enabling consistent usage across the team.
4. Customized Table Columns: Data views allow customization of table columns to display only the relevant data.
5. Default Sort: Each view can have a default sort order specified, ensuring the most important data is prioritized.

## Using Data Views

Data views consist of filters and customized table. Each view can be tailored to display specific data by applying filters and organizing columns as needed. Additionally, default sorting can be applied to ensure the data is presented in a meaningful order.

### Filters

Filters in data views consist of rules, conditions, and groups. Rules are the available fields that conditions can be created from. For example, activity name does not start with "URGENT". In this example, the activity name is the rule and the condition is does not start with "URGENT".

Groups can contain conditions and other groups. Each group has, by default, a match type of either "all" (AND) or "any" (OR).

### Filter Groups

The filter groups feature is a feature to match multiple conditions in your filter, for example, you want to filter all contacts that are assigned to you AND the contact country is "United States" OR contact phone number begins with +1.

To retrieve those contacts we will apply the following conditions:

- In default group, create new group and set Match Type to All.
- In new group, add condition Owner and select Me.
- In the new group add sub group and set Match Type to Any.
- Add condition Country and select United States.
- Add condition Phone that begins with +1.
- Click Apply Filters.

### Creating a Filter Group

1. When the view is active click the "Advanced Filters" button to open the filters modal, you can add a new group by clicking on the `+ Add Group` dropdown item.
2. Define the conditions or sub-groups within this group.
3. Choose a match type for the group (all conditions must be met or any condition can be met).

### Match Type

Each filter group consist of Match Type for the applied conditions, there are 2 options, All and Any, when creating conditions, if you want all conditions to be matched in the filter group, you should select All, if you want to retrieve results where Any of the conditions are matched, select Any.

Consider the following example:

You can see from the screenshot that Match Type is set to Any, this filter will give us all records which have country United States or their Phone begins with +1.

If we set Match Type to All, the result will return only records that have country United States and their phone begins with +1, for example, if there is a record with country United States and the phone begins with +235, this record won't be matched and will be excluded from the results.

#### Example of Using Match Types

1. All (AND): A view that filters contacts where the status is "Active" and the last contact date is within the last 30 days.
2. Any (OR): A view that filters contacts where the status is "Active" or the last contact date is within the last 30 days.

### Saving Filters

Whenever a data view filter is modified and applied, Concord CRM will auto-save the filter for future usage. There are a few exceptions when the filter won't be saved:

- The view is shared and the logged-in user is not the view creator (except for admins).
- The view is a default system view.

## Managing Data Views

### Creating a New View

1. Click on the + Add View button above the table.
2. Click + Create New View.
3. Give the view a name and choose if it's private or shared with all users.
4. After save, click the "Advanced Filters" button to add any filters.
5. Customize the table columns or default order by clicking on the table last column settings icon.

### Setting a Default View

1. Drag the desired view to the first position in the list of views above the table.
2. This view will now be the default view for the current user whenever the table is accessed.

### Sharing a View

1. Click on the options menu (three dots) next to the view you want to share.
2. Select `Edit` and set the "Shared With" dropdown value to "Everyone".
3. Click Save.
4. Shared views will be accessible to all other users.

### Cloning a View

1. Click on the options menu (three dots) next to the view you want to clone.
2. Click `Clone View` from the dropdown menu.
3. Adjust the newly created view as per your requirements.

## System Views

Concord CRM installation comes with default views for few of the resources, these views are predefined and can be applied out of the box, however, because these views may be modified and enhanced in future there is no ability to modify, delete or save the filters of the views, you can modify the filters during runtime, but the filters won't be persisted.

However, the views filters already exists in Concord CRM, if you need to extend these views, you can clone the view with the same filters and conditions and optionally add/remove any other rules you are in need for the filter.

## Examples of Data View Use

Here are a few examples of how you and your team can utilize data views:

### 1. Prioritizing High-Value Deals

- Scenario: Focus on the most profitable opportunities.
- View Use:
  - Create a new view for high-value deals.
  - Set a filter for deals above a specific amount to prioritize deals with the highest potential revenue.
  - Customize the table columns to display relevant deal information.
  - Specify the default sort order to prioritize high-value deals.

### 2. Region-Specific Contacts

- Scenario: Tailor contact management to specific geographic areas.
- View Use:
  - Create a new view for region-specific contacts.
  - Leverage location fields like "Country," "State," and "Zip Code" in the contact's profile.
  - Apply filters based on these fields to segment contacts by their geographical location.
  - For instance, you could filter for all contacts in a specific state or zip code, or even narrow down to a particular city within a country.
  - Customize the table columns to display relevant contact information.
  - Specify the default sort order to prioritize region-specific contacts.

### 3. New Client Acquisition

- Scenario: Focus on building relationships with newly acquired clients.
- View Use:
  - Create a new view for new client acquisition.
  - Apply a filter on the "Created At" field to include contacts added within the last 30 days (or a preferred time frame).
  - Customize the table columns to display relevant contact information.
  - Specify the default sort order to prioritize newly acquired contacts.

### 4. Targeting Month-End Deal Closures

- Scenario: Strategize for closing deals by the end of the current month.
- View Use:
  - Create a new view for month-end deal closures.
  - Apply a filter on the "Expected Close Date" field to include dates from today to the last day of the current month.
  - Customize the table columns to display relevant deal information.
  - Specify the default sort order to prioritize deals expected to close by month-end.