> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CounterValue table

> Visible for rights

## CounterValue Table (197)

Visible for rights

## Fields

| Name                      | Description                                                                                                  | Type                                                | Nullable |
| ------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | :------: |
| CounterValue\_id          | Primary key                                                                                                  | PK                                                  |    No    |
| contact\_id               | Link to contact, 0 if this counter is not for contacts                                                       | FK [contact](./contact.mdx)                         |    No    |
| person\_id                | Link to person, 0 if this counter is not for person (always 0 in 6.0)                                        | FK [person](./person.mdx)                           |    No    |
| project\_id               | Link to project, 0 if this counter is not for project                                                        | FK [project](./project.mdx)                         |    No    |
| extra1\_id                | Spare ID for future links                                                                                    | Id                                                  |    No    |
| extra2\_id                | Spare ID for future links                                                                                    | Id                                                  |    No    |
| record\_type              | Same as task.record\_type: 1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo - see EAppntRecordTypes | Enum [AppntRecordType](./enums/appntrecordtype.mdx) |    No    |
| direction                 | Same as task.direction: Direction: 0 = none, 1 = incoming, 2 = outgoing                                      | Enum [AppntDirection](./enums/appntdirection.mdx)   |    No    |
| intent\_id                | Link to Intent list                                                                                          | FK [Intent](./intent.mdx)                           |    No    |
| sale\_status              | Sale status: 0 = Unknown, 1 = open, 2 = closed, 3 = lost, 4 = all sales                                      | Enum [SaleStatus](./enums/salestatus.mdx)           |    No    |
| amountClassId             | Sale amount class, for splitting sale counters by amounts                                                    | FK [AmountClass](./amountclass.mdx)                 |    No    |
| totalReg                  | Total registered records of this type                                                                        | UInt                                                |    No    |
| totalRegInPeriod          | Total registered records of this type in the first period (there are up to three period definitions)         | UInt                                                |    No    |
| notCompleted              | Total records with status Not Completed                                                                      | UInt                                                |    No    |
| notCompletedInPeriod      | Total records with status Not Completed in the first period (there are up to three period definitions)       | UInt                                                |    No    |
| lastRegistered            | ActiveDate/SaleDate/CreatedAt of last activity/sale/ticket of this type                                      | DateTime                                            |    Yes   |
| lastCompleted             | ActiveDate/SaleDate/CreatedAt of last COMPLETED activity/sale/ticket of this type                            | DateTime                                            |    Yes   |
| lastDoBy                  | ActiveDate/SaleDate/CreatedAt of last NOT COMPLETED activity/sale/ticket of this type                        | DateTime                                            |    Yes   |
| extra1\_count             | Total registered records of this type in the second period (there are up to three period definitions)        | UInt                                                |    Yes   |
| extra2\_count             | Total records with status Not Completed in the second period (there are up to three period definitions)      | UInt                                                |    Yes   |
| extra3\_count             | Total registered records of this type in the third period (there are up to three period definitions)         | UInt                                                |    Yes   |
| extra4\_count             | Total records with status Not Completed in the third period (there are up to three period definitions)       | UInt                                                |    Yes   |
| registered                | Registered when                                                                                              | UtcDateTime                                         |    No    |
| registered\_associate\_id | Registered by whom                                                                                           | FK [associate](./associate.mdx)                     |    No    |
| updated                   | Last updated when                                                                                            | UtcDateTime                                         |    No    |
| updated\_associate\_id    | Last updated by whom                                                                                         | FK [associate](./associate.mdx)                     |    No    |
| updatedCount              | Number of updates made to this record                                                                        | UShort                                              |    No    |

<img src="https://mintcdn.com/superofficeas/-KbDeS3ObOMH8eFq/media/loc/en/database/tables/CounterValue.png?fit=max&auto=format&n=-KbDeS3ObOMH8eFq&q=85&s=5bf4283e78fedeedd8778f5eb59f7ebb" alt="CounterValue table relationship diagram" width="727" height="624" data-path="media/loc/en/database/tables/CounterValue.png" />

## Indexes

| Fields                              | Types          | Description |
| ----------------------------------- | -------------- | ----------- |
| contact\_id, record\_type           | FK, Enum       | Index       |
| contact\_id, sale\_status           | FK, Enum       | Index       |
| project\_id, record\_type           | FK, Enum       | Index       |
| project\_id, sale\_status           | FK, Enum       | Index       |
| record\_type, direction, intent\_id | Enum, Enum, FK | Index       |
| sale\_status, amountClassId         | Enum, FK       | Index       |

## Relationships

| Table                        | Description                                                                                                                                                                                                                                                                  |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AmountClass](./amountclass) | Amount Class list for SuperOffice Sales Intelligence (Saint) - used to group sales by amounts, into bins (low --> high) called amount classes. More information regarding SuperOffice Sales Intelligence on [http://techdoc.superoffice.com](http://techdoc.superoffice.com) |
| [associate](./associate)     | Employees, resources and other users - except for External persons                                                                                                                                                                                                           |
| [contact](./contact)         | Companies and Organizations.                                                                                                                                                                                                                                                 |
| [Intent](./intent)           | Intent list for SAINT. More information regarding SuperOffice Sales Intelligence on [http://techdoc.superoffice.com](http://techdoc.superoffice.com)                                                                                                                         |
| [person](./person)           | Persons                                                                                                                                                                                                                                                                      |
| [project](./project)         | Projects                                                                                                                                                                                                                                                                     |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [SAINT in Settings and maintenance](/en/saint/admin/index.md)
- [Intent table](/en/database/tables/intent.md)
- [AmountClass table](/en/database/tables/amountclass.md)
- [SaintConfiguration table](/en/database/tables/saintconfiguration.md)
- [SuperOffice.WebApi.Data.SaleStatus](/en/api/reference/webapi/SuperOffice.WebApi.Data.SaleStatus.md)
- [Enum values for AppntDirection](/en/database/tables/enums/appntdirection.md)
