Activity API
"Activities" are utilized to record data from various CRM actions, encompassing feedback, tickets, emails, meetings, and calls etc. These activities can be associated with an entity extension.
Terminology
Activity types
Each activity object includes an essential attribute called activityType
, which defines the specific type of activity it represents. While all activities share some basic properties, each activity type will also possess its own set of unique properties. The Activity API currently supports the following activity types:
Name | eatyId | Description |
---|---|---|
WebChat | 2 | ITX Web chat |
Call | 4 | Phone call |
Note | 8 | Note |
11 | ||
Facebook chat | 13 | Facebook chat |
14 | ||
Ticket | 15 | Ticket |
SMS | 17 | SMS |
Screen share | 24 | Screen share |
Lipscore question | 25 | Lipscore question |
Instagram chat | 27 | Instagram chat |
Lipscore review | 28 | Lipscore review |
29 | WhatsApp chat |
NOTE: Activities are used internally by ITX, so you may come across with activity types other than those listed here.
Activity members
The members
list comprises all individuals, including both users and external contacts, who are or have been actively involved with the activity. Each member's role is specified in the role
field, providing insights into their respective functions. For instance, a role value of 20 usually indicate a contact person.
For example, within the members
list, you can find a complete list of users who have participated in a specific phone call, along with their respective activity durations.
The startTs
and endTs
fields play a crucial role in distinguishing between active and past members in the system. Specifically, startTs
indicates the initiation of their involvement, while endTs
denotes the conclusion of their participation in a particular activity. Furthermore, each member is assigned a creationTs
, which is automatically set upon their creation. This timestamp represents the moment when the member becomes part of the system.
If a member is missing a startTs
, it suggests that they may have never actively participated in the activity. For instance, in the case of an unanswered phone call, we would set the creationTs
to the start of the call, but startTs
would remain unset since the call was not answered.
Members marked as anon
is considered to be external members, and should generally not be connected to any user. anon
members are however often linked to a contact person (entity extension
).
Role name | ID | Relevant for activity type |
---|---|---|
Default | 0 | All |
Case assigned | 1 | Case |
Case follower | 2 | Case |
Contact | 20 | All |
Salesprocess owner | 21 | Salesprocess |
Salesprocess booker | 22 | Salesprocess |
Email from | 23 | |
Email to | 24 | |
Email CC | 25 | |
Email reply to | 27 | |
Rating member | 30 | All |
Meeting contact | 35 | Meeting |
External organizer | 36 | Meeting |
Internal organizer | 37 | Meeting |
NOTE: Roles are also used internally by ITX, so you may come across activity members with roles other than those listed here.
Conversations
Conversation based activity types are identified by a startTs
, endTs
, and a queue
. These activities encompass all chats and phone calls. This includes activity types WebChat
, Call
, Facebook chat
, WeChat
, Lipscore question
, Instagram chat
and Lipscore review
. The underlying principle governing conversations is that they are placed in a queue and then assigned to any logged-in and available agent within that queue. While a conversation is active, it can only be assigned to a single agent at a time. However, it can be attempted to be assigned to different agents or manually transferred to another agent and/or queue.
You can find relevant information about the conversation's progress either in the members
or logs
list.
Retrieve activities
Used to retrieve all activities from ITX REST API. This is a generic endpoint, therefore newer specific endpoints should be used when possible. Check OpenAPI specification for updated information
GET /rest/itxems/activities
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
eatyId | String | No | Comma separated list of activity type ID's |
getMembers | Boolean | No | Set to true to retrieve all activity members |
fromTs | Datetime | No | Filter activities created after this timestamp |
toTs | Datetime | No | Filter activities created before this timestamp |
limitFrom | Integer | No | Pagination offsett |
limitTo | Integer | No | Pagination page size (max 1000) |
getTotalActivityCount | Boolean | No | If true, return total hits (without agination) as HTTP-Header ITX-Total-Found |
Example request all phone calls:
curl \
--url "https://<endpoint>/rest/itxems/activities?eatyId=4&getMembers=true&getTotalActivityCount=true&limitFrom=0&limitTo=50"