# Criteria for organizing contacts in a contact group

The `criteria` object specifies which contact group to organize and how. This involves:

- Defining the target group

- Defining the target contact or contacts

- Defining whether to add the contacts to the group (associate) or remove the contacts from the group (disassociate)

- Optionally defining on which contacts database to perform the operation

The `criteria` object has three main properties: `Type`, `Data`, and `OperationType`. These are described in the following table. Properties enclosed in brackets are optional.

Note: All string values in the object are Unicode.

Table: Criteria object properties
Property | Description | Type | Value
--- | --- | --- | ---
`criteria.Type` | Specifies the type of contact information to organize. This is always `"Group"`. | string | Possible values: `"Group"`
`criteria.Data` | Specifies the contact group to organize. | object | Object with the properties specified below
`[criteria.Data.DBUri]` | Specifies the contacts database on which to perform the operation. If this property is not specified, the default database is used. | string |
`criteria.Data.id` | Specifies the unique identifier of the contact group to organize. Use `GetList` to retrieve this ID. | string |
`criteria.Data.IdList` | Specifies the unique identifiers of the contacts to add or remove. `Data.IdList[0]` contains the ID of the first contact. Use `GetList` to retrieve these IDs. | array of strings |
`criteria.OperationType` | Specifies whether to add the contacts to the group (associate) or remove the contacts from the group (disassociate). | string | Possible values: `"Associate"` `"Disassociate"`