# Labels



import Image from 'next/image';

Labels can be used to categorize [tasks](./tasks) and manage task workflows according to your specific business needs. Each tenant can configure up to 100 labels.

Use Cases [#use-cases]

The following examples illustrate how labels can be used to organize tasks:

* Tasks that can't be completed yet might have a `blocked` or `onHold` label.
* Tasks that require review and approval by a manager might have a `pendingReview` or `escalated` label.
* Tasks that require action from a customer might have an `awaitingCustomer` or `pendingSignature` label.

Configuration [#configuration]

Before labels can be associated with a task, labels must be configured through <ApiLink name="LabelRef">LabelRef</ApiLink> configuration objects within the <ApiLink name="WorkManagementRef">WorkManagementRef</ApiLink> tenant configuration.

Here's an example of a <ApiLink name="WorkManagementRef">WorkManagementRef</ApiLink> configuration that includes `blocked`, `escalated`, and `awaitingCustomer` labels:

```json
{
	"labels": {
		"blocked": {},
		"escalated": {},
		"awaitingCustomer": {}
	}
}
```

<ApiLink name="LabelRef">LabelRef</ApiLink> configuration objects are currently
empty, but properties may be added in future releases.

<Callout>
  Label configurations cannot be removed or renamed after deployment.
</Callout>

Adding Labels to Tasks [#adding-labels-to-tasks]

Task Dashboard [#task-dashboard]

Once your configuration changes have been deployed, you can start adding labels to tasks within the Task Dashboard.

Access the Task Dashboard by navigating to the [Operations Workbench](https://ui-ec-sandbox.socotra.com/en/operations) and selecting a tenant.

You can add labels to existing tasks in the Task Dashboard by clicking the *+* or *Add label +* button in the label column. Click the *x* button next to a label to remove the label.

<Image src="/images/labels/task-dashboard.png" alt="Task Dashboard" width={1600} height={1600} unoptimized />

Alternatively, you can add labels to a task from the task sidebar. You can open the task sidebar from the Task Dashboard by clicking on the link for a given task in the *Task* column.

<Image src="/images/labels/task-sidebar.png" alt="Task Dashboard" width={1600} height={1600} unoptimized />

If you're currently viewing an entity such as a quote or policy in the Operations Workbench, you can open the task sidebar by clicking the blue *Task* button on the right side of the screen. You can add and remove labels directly from this task list view. Click the arrow to the right of your task in the task list view to modify additional task details.

<Image src="/images/labels/tasks-button.png" alt="Task Dashboard" width={1600} height={1600} unoptimized />

You can also add labels from the task sidebar when creating a new task. See the [Managing Tasks in the Operations Workbench](./task-management) feature guide for more information on creating new tasks.

<Image src="/images/labels/new-task.png" alt="New Task" width={1600} height={1600} unoptimized />

API Endpoints [#api-endpoints]

You can also add labels to tasks when creating and updating tasks through the <ApiLink name="addTask">Add Task</ApiLink> and <ApiLink name="updateTask">Update Task</ApiLink> API endpoints.

Here's an example request for the <ApiLink name="addTask">Add Task</ApiLink> API endpoint:

```json
{
	"type": "underwriting",
	"deadlineTime": "2027-01-15T09:30:00Z",
	"references": [
		{
			"referenceType": "quote",
			"referenceLocator": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
		}
	],
	"labels": ["blocked", "escalated"]
}
```

Here's an example request for the <ApiLink name="updateTask">Update Task</ApiLink> API endpoint:

```json
{
	"addLabels": ["awaitingCustomer"],
	"removeLabels": ["escalated"]
}
```

<Callout>
  The same label cannot be present in both the `addLabels` and `removeLabels` fields. Requests will also fail if a specified label does not exist.
</Callout>

Search [#search]

Search for tasks with a specific label by using the label filter in the Task Dashboard.

<Image src="/images/labels/filters.png" alt="Filters" width={1600} height={1600} unoptimized />

See Also [#see-also]

* [Tasks](./tasks)
* [Managing Tasks in the Operations Workbench](./task-management)
* <ApiLink name="LabelRef">
    LabelRef
  </ApiLink>
* <ApiLink name="WorkManagementRef">
    WorkManagementRef
  </ApiLink>
* [Work Management API](/api/work-management)
* [Operations Workbench](https://ui-ec-sandbox.socotra.com/en/operations)
