Status
Similar to select attributes, originally designed for use in Lists
Just like select attributes, status attributes are a constrained input type, where the user must pick from a predefined list. They are used in the Attio UI to define the different columns on a kanban board, but they can also be used with objects directly.
There's only one predefined status attribute, available on the deal object as stage
.
The possible values of a status attribute are known as "statuses", and there are separate APIs for managing them.
All status attributes are single-select.
Reading values
Status values have a status
property, which is an object describing which status was used:
{
"active_from": "2023-04-03T15:21:06.447000000Z",
"active_until": null,
"created_by_actor": {...},
"attribute_type": "select",
"status": {
"id": {
"workspace_id": "4f9a01be-3792-4ab9-926f-ca7f9005700c",
"object_id": "5f1feef5-fe73-4c0e-9d97-5b0a96a7d32b",
"attribute_id": "a4977b52-d367-4e28-a671-b5c4fa401fc5",
"status_id": "11f07f01-c10f-4e05-a522-33e050bc52ee"
},
"title": "In Progress",
"is_archived": false,
"target_time_in_status": null,
"celebration_enabled": false
}
}
Writing values
You can find a list of available statuses using the list statuses API.
To write status values, pass the title of the status as a string.
You can also pass an object with a status
property which references either the status_id
or the title
of the status.
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 status.
{
"stage": "Lead"
}
{
"stage": [
{
"status": "Lead"
}
]
}
{
"stage": [
{
"status": "11f07f01-c10f-4e05-a522-33e050bc52ee"
}
]
}
Filtering
Status attributes can be filtered by equality, using either the implicit syntax or the explicit one, with either the title or status ID:
{
"filter": {
"stage": "In Progress"
}
}
{
"filter": {
"stage": {
"status": {
"$eq": "11f07f01-c10f-4e05-a522-33e050bc52ee"
}
}
}
}
You can also filter for multiple possible matching values using the $or
syntax:
{
"filter": {
"$or": [
{"stage": "In Progress"},
{"stage": "Lead"}
]
}
}
Status 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": {
"stage": {
"active_from": {
"$gte": "2023-11-20"
}
}
}
}
{
"filter": {
"stage": {
"active_from": {
"$lt": "2023-01-01"
}
}
}
}
Updated about 1 year ago