Activity - Overview
An Activity is a resource that can be associated with a specific project, credit or account which has many use cases for user collaboration and which comments and documents are able to be added.
Activity use cases include:
- Note - share an important text note/update with collaborators and ensure that they read/view it (with access history)
- Task - assign a task to collaborators and ensure that it is accomplished by a due date (with access/update history)
- Share a Document - share an important document with collaborators and ensure that they view/download it (with access history)
An Activity can be put into status "draft", which means (1) the activity will NOT yet be visible to the users and (2) will NOT trigger a notification email to those users. The purpose of this status is to enable the API to have the flexibility to add content to the Activity before making it available and notifying users (ie; documents, comments, etc).
Methods
The API supports the following methods for Activity resources:
- POST - Create / Update
- Insert or updates an Activity by requiring (and matching on) an
internal_activity_id(ie; the ID of the object on your internal system).
- Insert or updates an Activity by requiring (and matching on) an
- GET - List
- Get a list of activity for an
internal_account_id, or a list of eitherinternal_activity_id, oractivity_id.
- Get a list of activity for an
Resource Representation
The following JSON structure shows the format of an Activity resource:
{
"id": integer,
"internal_activity_id": string,
"internal_account_id": string,
"attached_to_type": ENUM("project","account","credit"),
"attached_to_id": integer,
"attached_to_internal_id": string,
"subject": string,
"description": string,
"type": ENUM("note","document","action_item"),
"status": ENUM("draft","open","completed","canceled"),
"due_date": string (format: "yyyy-mm-dd"),
"assigned_users": [ string, string, ... ] (list of internal user ids),
"created_by": {
"internal_user_id": string,
"email": string,
"full_name": string
},
"completable_by": ENUM("both","us","them"),
"created_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z),
"updated_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z),
"consumed_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z)
}
Resource Properties
The following table defines the properties that appear in this resource:
| Key | Type | Definition |
|---|---|---|
| id | integer | The ID of the Activity. |
| internal_activity_id | string | The ID of the Activity on your internal system. |
| internal_account_id | string | The ID of the Account on your internal system. |
| attached_to_type | ENUM("project","account","credit") | The resource type which this activity is attached to. |
| attached_to_id | integer | The ID of the resource that this activity is attached to on the Incentify system. |
| attached_to_internal_id | string | The ID of the resource that this activity is attached to on your internal system |
| subject | string | The Activity title. |
| description | string | The Activty description. |
| type | ENUM("note","document","action_item") | The Activity type, which informs the user what type of Activity it is (but there is no enforced business logic for different types). |
| status | ENUM("draft","open","completed","canceled") | The Activity status. Activity in a "draft" status is not visible to any users and does not trigger any notifications. |
| due_date | string | String representation of a date (format: "yyyy-mm-dd") when this activity is due. |
| assigned_users | [string, string, string...] | A list of internal user ids of size 0 to n which are assigned to this activity. If assigned to no users, then it is visible to all users. If assigned to one or more users, then only this set of users can view or interact with this Activity. |
| created_by.internal_user_id | string | The ID of the user on your internal system. |
| created_by.email | string | The email of the user on your internal system. |
| created_by.full_name | string | The full name of the user on your internal system, or within Incentify. |
| completable_by | ENUM("both","us","them") | Which party can set status of an Activity to "completed". Options are: (1) us - your internal system (ie; API calls only). (2) them - the set of users who are assigned to the Activity. (3) both - "us" and "them". |
| created_at | string | The date and time that the Activity was created. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |
| updated_at | string | The date and time that the Activity was last updated. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |
| consumed_at | string | The date and time that the Activity was last consumed and injested into your internal system. This value is set via the Delta - Consumed Endpoint. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |