Task Model

Represents a task that is stored in Capsule. These are generally used as a simple way to create a reminder of something the user needs to do.

Tasks can be categorized for such things as a meeting, phone call or submission deadline using task categories and can be linked to a party, opportunity or case.

Name Type Description
id Long Read only

The unique id of this task

createdAt Date Read only

The ISO DateTime when this party was created. This field is automatically set by Capsule and cannot be edited

updatedAt Date Read only

The ISO DateTime when this party was updated last time. This field is automatically set by Capsule and cannot be edited

description String Required

A short description about the task.

detail String

More details about the task.

category Category

The category of this task.

dueOn Date

The date (without a time element) when this task is due.

dueTime String

The time (without a date element) when this task is due. Note that the time is in the user’s timezone, and not UTC.

status String

Specify whether this task is open, completed or pending. A task is pending when it was not completed by the user, but is not relevant anymore (i.e. linked to a closed opportunity).

Accepted values are: OPEN, COMPLETED, PENDING

party Nested Party

The party this task is linked to. Note that only one of party, opportunity or kase can be not null.

opportunity Nested Opportunity

The opportunity this task is linked to. Note that only one of party, opportunity or kase can be not null.

kase Nested Case

The casefile this task is linked to. Note that only one of party, opportunity or kase can be not null.

owner Nested User

The user this task is assigned to.

completedBy String Read only

The username of the user that completed this task.

completedAt Date

The ISO DateTime when this task was completed. By default, this will be the time of the request that mark the task as completed. However, if you provide offline capability, you might want to override this field when completing the task.

repeat→frequency String

Represents if this task repeats every week, month or year. repeat is null for non-recurring tasks

Accepted values are: YEARLY, MONTHLY, WEEKLY

repeat→interval Integer

Represents how often this task repeats (e.g. every interval week/months)

repeat→on String

Represents the day of the week or month this task repeats on. Last day of the month is represented as -1. If on is omitted when creating a repeating task then it will be derived based on the due date of the task.

hasTrack Boolean

Indicates if the task is part of a track associated with its kase or opportunity

nextTask Nested Task

For tasks that are part of a track, this represents the next task in the track.

taskDelayRule String

For tasks that are part of a track, this indicates if the dueOn date is calculated based on the start date of the track (TRACK_START), an end date specified when adding the track (END_DATE), or relative to the date the previous task in the track is completed (LAST_TASK).

Accepted values are: TRACK_START, END_DATE, LAST_TASK

daysAfter Integer

If this task is part of a track with a taskDelayRule of LAST_TASK, indicates the number of days after the completion of the previous task that this task is due. If this task is part of a track with a taskDelayRule of START_DATE or END_DATE, indicates the number of days between the start or end date of the track and the due date of this task respectively.