Select

An option from a predefined list

Select attributes are a constrained input type, where the user must pick from a predefined list.

Company has several select attributes (they are mostly enriched attributes): categories, estimated_arr_usd and employee_range. strongest_connection_strength is also available on both person and company.

Attio provides a separate API for managing the select options available.

Select attributes may be either single-select or multi-select. In the API, these two variants are represented using the same underlying type, select. However, in web and mobile clients, users will see these attributes as two separate types: select and multi-select.

Please note that select attributes cannot be configured to be unique.

Reading values

Select attribute values have an option property, which is an object describing which select option was used:

{
  "active_from": "2023-04-03T15:21:06.447000000Z",
  "active_until": null,
  "created_by_actor": {...},
  "attribute_type": "select",
  "option": {
    "id": {
      "workspace_id": "4f9a01be-3792-4ab9-926f-ca7f9005700c",
      "object_id": "5f1feef5-fe73-4c0e-9d97-5b0a96a7d32b",
      "attribute_id": "a4977b52-d367-4e28-a671-b5c4fa401fc5",
      "option_id": "14938464-cae9-4e50-8856-0fb584844f24"
    },
    "title": "Aerospace & Defense",
    "is_archived": false
  }
}

Writing values

You can find a list of available options using the list select options API.

To write select values, pass the title of the select option as a string. If it's a multi-value select attribute, you'll need to pass an array.

You can also pass an object with an option property, which references either the option_id or the title of the select option.

If you attempt to write a value where the ID or title cannot be found, you will receive an error rather than create a new select option.

{
  "categories": ["3D Printing"]
}
{
  "categories": ["3D Printing", "Architecture"]
}
{
  "categories": [
    {
      "option": "3D Printing"
    }
  ]
}
{
  "categories": [
    {
      "option": "14938464-cae9-4e50-8856-0fb584844f24"
    }
  ]
}

Filtering

Select attributes can be filtered by equality, using either the implicit syntax or the explicit one:

{
  "filter": {
    "categories": "Aerospace & Defense"
  }
}
{
  "filter": {
    "categories": {
      "option": {
        "$eq": "Aerospace & Defense"
      }
    }
  }
}

It's also possible to use $or to find records which match one of several categories:

{
  "filter": {
    "$or": [
      {"categories": "Aerospace & Defense"},
      {"categories": "Biotechnology"}
    ]
  }
}

Select attributes can also be filtered based on when they were modified, using the active_from property. This allows automations based on when the attribute was changed. This filter supports the $lt, $lte, $gt, $gte operators:

{
  "filter": {
    "categories": {
      "active_from": {
        "$gte": "2023-11-20"
      }
    }
  }
}
{
  "filter": {
    "categories": {
      "active_from": {
        "$lt": "2023-01-01"
      }
    }
  }
}