Tasks
Create, update, and query the available task records in SalesLoft.
Table-Specific Information
Select
The server uses the Salesloft API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the server.
| Column | Supported Operators |
| Id | =, IN |
| CompletedAt | >, >=, <, <= |
| CurrentState | =, IN |
| PersonId | =, IN |
| TaskType | =, IN |
| UpdatedAt | >, >=, <, <= |
| UserId | =, IN |
| TimeInterval | = |
| IdempotencyKey | = |
SELECT * FROM Tasks WHERE Id = '123'
SELECT * FROM Tasks WHERE CompletedAt >= '2022-12-01'
SELECT * FROM Tasks WHERE CurrentState IN ('scheduled', 'completed')
SELECT * FROM Tasks WHERE PersonId IN ('123', '321')
SELECT * FROM Tasks WHERE TaskType IN ('call', 'email')
SELECT * FROM Tasks WHERE TimeInterval = 'interval'
SELECT * FROM Tasks WHERE IdempotencyKey = 'key'
Note: When filtering on datetime columns (such as CompletedAt or UpdatedAt) using
time values, timestamps must include
microsecond precision (for example, '2022-12-01T18:00:28.907000'). Providing
only millisecond precision may return incorrect results.
Insert
To add a task, specify at least the Subject, PersonId, UserId, TaskType, DueDate, and CurrentState columns. INSERT INTO Tasks (Subject, PersonId, UserId, TaskType, DueDate, CurrentState)
VALUES ('Subject Task Test', 123, 321, 'email', '2022-12-30', 'scheduled')
Update
To update a task, specify one or more columns and their new values.UPDATE Tasks SET Subject = 'new Subject', CurrentState = 'completed' WHERE ID = '123'
Delete
To delete a task, you must specify the Id column.DELETE FROM Tasks WHERE Id = '100'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | Integer | False |
The Id of the Task. |
| CompletedAt | Datetime | False |
The CompletedAt of the Task. |
| CompletedById | Integer | False |
The CompletedById of the Task. |
| CreatedAt | Datetime | True |
The CreatedAt of the Task. |
| CreatedByUserId | Integer | False |
The CreatedByUserId of the Task. |
| CurrentState | String | False |
The CurrentState of the Task. The allowed values are scheduled, completed. |
| DueAt | Datetime | False |
The DueAt of the Task. |
| DueDate | Date | False |
The DueDate of the Task. |
| PersonId | Integer | False |
The PersonId of the Task. |
| RemindAt | Datetime | False |
The RemindAt of the Task. |
| Subject | String | False |
The Subject of the Task. |
| TaskType | String | False |
The TaskType of the Task. The allowed values are call, email, general, integration. |
| UpdatedAt | Datetime | True |
The UpdatedAt date of the Task. |
| UserId | Integer | False |
The UserId of the Task. |
| Description | String | False |
A description of the task recorded for person at completion time. |
| OpportunityId | Integer | False |
The opportunity id associated with task. |
| ExpiresAfter | Datetime | False |
Datetime of when the the task will expire, ISO-8601 datetime format required. |
| TimeInterval | String | False |
The TimeInterval property of the Task table. The allowed values are overdue, today, tomorrow, this_week, next_week. |
| IdempotencyKey | String | False |
The IdempotencyKey property of the Task table. |
| IntegrationId | Long | False |
The IntegrationId property of the Task table. |
| IntegrationName | String | False |
The IntegrationName property of the Task table. |
| IntegrationStepId | String | False |
The IntegrationStepId property of the Task table. |
| IntegrationTaskId | String | False |
The IntegrationTaskId property of the Task table. |
| IntegrationTaskTypeLabel | String | False |
The IntegrationTaskTypeLabel property of the Task table. |
| IsLogged | Boolean | False |
A flag to indicate that the task should only be logged. |
| AccountId | Integer | False |
Filters tasks by the account to which they are associated. |
| CompletedTimeInterval | String | False |
Filters tasks by completed time interval. Valid values are: today, yesterday, this_week, previous_week, this_month. |
| Locale | String | False |
Filters tasks by locale of the person to which they are associated. |
| Source | String | False |
Filters tasks by source. |
| UserGuid | String | False |
GUID of the user linked to the task. Defaults to the authenticated user. |