Views

Resource Fields

Name Type Read-only Description
title string
type string INBOX, SUSPENDED, TRASH, CUSTOM
visibility_type string ALL, SELF, TEAM
agent User
visibility_to_teams Teams
columns Columns
predicate_collections Predicate Collections
order_by_column string
order_by string ASC, DESC
sort_order integer
is_default boolean
is_system boolean
is_enabled boolean Default: true
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Collections

RESOURCE FIELDS

Name Type Read-only Description
propositions Propositions

Propositions

RESOURCE FIELDS

Name Type Read-only Description
field string
The field can be retrieved from Definition
operator string
The operator can be retrieved from Definition
value mixed

Metadata




 
 




Actions

Retrieve all views

GET /api/v1/views.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope conversations
Ordered by sort_order (ascending)

Arguments

Name Type Mandatory Description
show_all boolean Only applicable for ADMINS or OWNERS

Response

{
    "status": 200,
    "data": [
        {
    "id": 2,

    "title": "My incomplete conversations",
    "type": "CUSTOM",
    "visibility_type": "ALL",
    "agent": null,
    "visibility_to_teams": [],
    "columns": [],
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "order_by_column": "caseid",
    "order_by": "DESC",
    "sort_order": 2,
    "is_default": true,
    "is_system": true,
    "is_enabled": true,
    "realtime_channel": "presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@v1_views_2",
    "created_at": "2016-06-18T06:05:36+00:00",
    "updated_at": "2016-06-18T06:05:36+00:00",

    "resource_type": "view"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/2"

}

    ],
    "resource": "view",
    "offset": 0,
    "limit": 10,
    "total_count": 1
}

Retrieve a view

GET /api/v1/views/:id.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope conversations

Response

    {
        "status": 200,
        "data": {
    "id": 2,

    "title": "My incomplete conversations",
    "type": "CUSTOM",
    "visibility_type": "ALL",
    "agent": null,
    "visibility_to_teams": [],
    "columns": [],
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "order_by_column": "caseid",
    "order_by": "DESC",
    "sort_order": 2,
    "is_default": true,
    "is_system": true,
    "is_enabled": true,
    "realtime_channel": "presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@v1_views_2",
    "created_at": "2016-06-18T06:05:36+00:00",
    "updated_at": "2016-06-18T06:05:36+00:00",

    "resource_type": "view"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/2"

}
,
        "resource": "view"
    }

Add a view

POST /api/v1/views.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
visibility_type string
ALL, SELF, TEAM
columns string
The sort order is set according to the input

Format: CSV
predicate_collections[] array
Fetch the definition at first to get field, operator and available values.

There can be multiple collections and a collection can have multiple propositions. Collections are evaluated with AND operator and Propositions are evaluated with OR operator.

Examples:

Input type: OPTIONS

{"propositions":[{"field":"cases.casestatusid", "operator":"comparison_equalto", "value":"1"}]}

Input type: INTEGER

{"propositions":[{"field":"casemetrics.reopencount", "operator":"comparison_equalto", "value":"1"}]}

Input type: FLOAT

{"propositions":[{"field":"casefields.buildversion", "operator":"comparison_equalto", "value":"5.01"}]}

Input type: BOOLEAN

{"propositions":[{"field":"requesterfields.is_sharable", "operator":"comparison_equalto", "value":false}]}

Input type: BOOLEAN_TRUE

{"propositions":[{"field":"caseslametrics.isbreached", "operator":"comparison_equalto", "value":"true"}]}

Input type: BOOLEAN_FALSE

[{"propositions":[{"field":"caseslametrics.isbreached", "operator":"comparison_equalto", "value":"false"}]}]

Input type: MULTIPLE

{"propositions":[{"field":"casefields.product_type", "operator":"collection_contains_insensitive", "value":"1, 3"}]}

Input type: AUTOCOMPLETE

{"propositions":[{"field":"cases.assigneeagentid", "operator":"comparison_equalto", "value":"1"}]}

Input type: TAGS

{"propositions":[{"field":"tags.name", "operator":"collection_contains_any_insensitive", "value":"brewing, intermittent"}]}

Input type: TAGS

{"propositions":[{"field":"cases.subject", "operator":"string_contains_insensitive", "value":"brewing"}]}

Input type: DATE_RELATIVE

{"propositions":[{"field":"casefields.build_date", "operator":"date_after", "value":"currentweek"}]}

Input type: DATE_ABSOLUTE

{"propositions":[{"field":"casefields.build_at", "operator":"comparison_equalto", "value":"2015-07-31T13:28:05+05:00"}]}

Input type: TIME (value input should be in hours)

{"propositions":[{"field":"cases.createdat", "operator":"time_greaterthan", "value":"10"}]}
order_by_column string
The name can be retrieve from the column.
order_by string
ASC, DESC
is_enabled boolean
team_ids array Only applicable when "visibility_type" is team

Format: CSV

Response

    {
        "status": 201,
        "data": {
    "id": 2,

    "title": "My incomplete conversations",
    "type": "CUSTOM",
    "visibility_type": "ALL",
    "agent": null,
    "visibility_to_teams": [],
    "columns": [],
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "order_by_column": "caseid",
    "order_by": "DESC",
    "sort_order": 2,
    "is_default": true,
    "is_system": true,
    "is_enabled": true,
    "realtime_channel": "presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@v1_views_2",
    "created_at": "2016-06-18T06:05:36+00:00",
    "updated_at": "2016-06-18T06:05:36+00:00",

    "resource_type": "view"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/2"

}
,
        "resource": "view"
    }

Update a view

PUT /api/v1/views/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
visibility_type string ALL, SELF, TEAM
columns string All columns must be passed on update of view. The columns which are not passed will get removed from he view.

The sort order is set according to the input

Format: CSV
predicate_collections array Example:

[{"id":1, "propositions":[{"id":1, "field":"cases.casestatusid", "operator":"comparison_equalto", "value":1}, {"id":2, "field":"cases.casepriorityid", "operator":"comparison_equalto", "value":1}, {"id":null, "field":"cases.casetypeid", "operator":"comparison_equalto", "value":1}]}]
order_by_column string The name can be retrieve from the column.
order_by string ASC, DESC
team_ids array Only applicable when "visibility_type" is team.

The id which are not passes that team access will be removed from that view.

Format: CSV
is_enabled boolean

Response

    {
        "status": 200,
        "data": {
    "id": 2,

    "title": "My incomplete conversations",
    "type": "CUSTOM",
    "visibility_type": "ALL",
    "agent": null,
    "visibility_to_teams": [],
    "columns": [],
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "order_by_column": "caseid",
    "order_by": "DESC",
    "sort_order": 2,
    "is_default": true,
    "is_system": true,
    "is_enabled": true,
    "realtime_channel": "presence-281f395f6f51d031a6d3db3489906c98285191ebac41bb744f9323f61af63433@v1_views_2",
    "created_at": "2016-06-18T06:05:36+00:00",
    "updated_at": "2016-06-18T06:05:36+00:00",

    "resource_type": "view"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/2"

}
,
        "resource": "view"
    }

Update views

PUT /api/v1/views.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Parameters

Name Type Mandatory Description
is_enabled boolean

Response

{
    "status": 200,
    "total_count": 3
}

Reorder views

PUT /api/v1/views/reorder.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
view_ids string
Pass the views in order you want to set

Response

{
    "status": 200
}

Delete a view

DELETE /api/v1/views/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200
}

Delete views

DELETE /api/v1/views.json

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200,
    "total_count": 3
}

Definitions

RESOURCE FIELDS

Name Type Read-only Description
label string
field string
Field name on which the rules will be applied
type string
NUMERIC, STRING, BOOLEAN, COLLECTION, DATE_ABSOLUTE, DATE_RELATIVE, TIME
sub_type string
Depends on type:

NUMERIC: FLOAT, INTEGER

DATE_RELATIVE: PAST, PAST_OR_PRESENT, PRESENT, PAST_OR_FUTURE, FUTURE
group string
CASES, REQUESTER, ORGANIZATION, SLA, SATISFACTION
rarity string
COMMON, LESS_COMMON
description string
Field description
input_type string
INTEGER, FLOAT, STRING, BOOLEAN, BOOLEAN_TRUE, BOOLEAN_FALSE, OPTIONS, MULTIPLE, TAGS, DATE_ABSOLUTE, DATE_RELATIVE, AUTOCOMPLETE, TIME
operators array
Depends on input_type:

INTEGER, FLOAT: comparison_equalto, comparison_not_equalto, comparison_greaterthan, comparison_greaterthan_or_equalto, comparison_lessthan, comparison_lessthan_or_equalto

STRING: string_contains_insensitive, string_does_not_contain_insensitive

BOOLEAN: comparison_equalto, comparison_not_equalto

BOOLEAN_TRUE: comparison_equalto

BOOLEAN_FALSE: comparison_equalto

OPTIONS: comparison_equalto, comparison_not_equalto

TAGS: collection_contains_insensitive, collection_contains_any_insensitive

AUTOCOMPLETE: comparison_equalto, comparison_not_equalto

TIME: time_greaterthan, time_greaterthan_or_equalto, time_lessthan, time_lessthan_or_equalto

DATE_ABSOLUTE: date_is, date_is_not

DATE_RELATIVE: date_after, date_after_or_on, date_before, date_before_or_on
values mixed
Input type: OPTIONS

{"1":"New", "2":"Open", "3":"Pending", "4":"Completed"}

Input type: INTEGER or FLOAT or BOOLEAN or BOOLEAN_TRUE or BOOLEAN_FALSE or TAGS or STRING or DATE_ABSOLUTE or TIME

value n/a

Input type: MULTIPLE

{"1":"New", "2":"Open", "3":"Pending", "4":"Completed"}

Input type: AUTOCOMPLETE

{"(assignee)": "(Assignee)", "(requester)": "(Requester)"}

other values needs to fetch from AUTOCOMPLETE

Input type: RELATIVE

{"today":"today", "currentweek":"currentweek", "currentmonth":"currentmonth"}

Retrieve all definitions

GET /api/v1/views/definitions.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
view_id integer This identifier is used to list only those soft-deleted value of an entity which are used when created a view.

Response

    {
        "status": 200,
        "data": [
            {
                "label": "Subject",
                "field": "cases.subject",
                "type": "STRING",
                "sub_type": "",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Conversation's subject",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Status",
                "field": "cases.casestatusid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Status of conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "4": "Completed",
                    "1": "New",
                    "2": "Open",
                    "3": "Pending"
                },
                "resource_type": "definition"
            },
            {
                "label": "Priority",
                "field": "cases.casepriorityid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Priority of conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_lessthan",
                    "comparison_greaterthan"
                ],
                "values": {
                    "0": "none",
                    "3": "High",
                    "1": "Low",
                    "2": "Normal",
                    "4": "Urgent"
                },
                "resource_type": "definition"
            },
            {
                "label": "Type",
                "field": "cases.casetypeid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Conversation type",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "0": "none",
                    "4": "Incident",
                    "3": "Problem",
                    "1": "Question",
                    "2": "Task"
                },
                "resource_type": "definition"
            },
            {
                "label": "Team",
                "field": "cases.assigneeteamid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Team assigned to conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "0": "(Unassigned)",
                    "(current_users_team)": "(current user's team)",
                    "1": "General"
                },
                "resource_type": "definition"
            },
            {
                "label": "Assignee",
                "field": "cases.assigneeagentid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Agent assigned to conversation",
                "input_type": "AUTOCOMPLETE",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "0": "(Unassigned)",
                    "(current_user)": "(Current user)",
                    "(requester)": "(Requester)"
                },
                "resource_type": "definition"
            },
            {
                "label": "Requester",
                "field": "cases.requesterid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Requester of the conversation",
                "input_type": "AUTOCOMPLETE",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "(current_user)": "(Current user)",
                    "(assignee)": "(Assignee)"
                },
                "resource_type": "definition"
            },
            {
                "label": "Organization",
                "field": "users.organizationid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Requester's organization",
                "input_type": "AUTOCOMPLETE",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Tags",
                "field": "tags.name",
                "type": "COLLECTION",
                "sub_type": "",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Tags added to conversation",
                "input_type": "TAGS",
                "operators": [
                    "collection_contains_insensitive",
                    "collection_contains_any_insensitive",
                    "collection_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Brand",
                "field": "cases.brandid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Brand to which conversation belongs",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "Brewfictus"
                },
                "resource_type": "definition"
            },
            {
                "label": "Source Channel",
                "field": "cases.channel",
                "type": "STRING",
                "sub_type": "",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Channel over which the conversation was started",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "MAIL": "Mail",
                    "MESSENGER": "Messenger",
                    "FACEBOOK": "Facebook",
                    "TWITTER": "Twitter",
                    "NOTE": "Note",
                    "HELPCENTER": "Helpcenter"
                },
                "resource_type": "definition"
            },
            {
                "label": "Satisfaction status",
                "field": "cases.satisfactionstatus",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "SATISFACTION",
                "rarity": "COMMON",
                "description": "The status of satisfaction offering for the conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "UNOFFERED",
                    "2": "OFFERED",
                    "3": "RECEIVED"
                },
                "resource_type": "definition"
            },
            {
                "label": "Satisfaction rating",
                "field": "cases.rating",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "SATISFACTION",
                "rarity": "COMMON",
                "description": "Satisfaction rating for the conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "0": "Not set",
                    "1": "Good",
                    "-1": "Bad"
                },
                "resource_type": "definition"
            },
            {
                "label": "SLA",
                "field": "cases.slaversionid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "SLA",
                "rarity": "COMMON",
                "description": "SLA that's applied to the conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "VIP Customer",
                    "0": "none"
                },
                "resource_type": "definition"
            },
            {
                "label": "SLA breached",
                "field": "cases.isslabreached",
                "type": "BOOLEAN",
                "sub_type": "",
                "group": "SLA",
                "rarity": "COMMON",
                "description": "Whether or not the conversation has breached any of its SLA targets",
                "input_type": "BOOLEAN_TRUE",
                "operators": [
                    "comparison_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of reopens",
                "field": "casemetrics.reopencount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of times conversation has been reopened",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of agent replies",
                "field": "casemetrics.agentreplycount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of agent replies on conversation",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of requester replies",
                "field": "casemetrics.requesterreplycount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of times requester has replied",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of replies",
                "field": "casemetrics.replycount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of total replies on a conversation",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of agent reassignments",
                "field": "casemetrics.assigneechangecount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of times assignee has been changed",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of team reassignments",
                "field": "casemetrics.teamchangecount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Number of times team has been changed",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto",
                    "comparison_greaterthan",
                    "comparison_greaterthan_or_equalto",
                    "comparison_lessthan",
                    "comparison_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Last update by user",
                "field": "cases.lastupdatedby",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "User who made the last update",
                "input_type": "AUTOCOMPLETE",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "(assignee)": "(Assignee)",
                    "(requester)": "(Requester)"
                },
                "resource_type": "definition"
            },
            {
                "label": "Last update by user role",
                "field": "roles.type",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Role of the user who made the last update",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "2": "Admin",
                    "3": "Agent",
                    "4": "Collaborator",
                    "5": "Customer",
                    "1": "Owner"
                },
                "resource_type": "definition"
            },
            {
                "label": "Language",
                "field": "users.languageid",
                "type": "STRING",
                "sub_type": "",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Requester's language",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "2": "en-us"
                },
                "resource_type": "definition"
            },
            {
                "label": "Timezone",
                "field": "users.timezone",
                "type": "STRING",
                "sub_type": "",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Requester's timezone",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "Africa/Abidjan": "Africa/Abidjan",
                    "Africa/Accra": "Africa/Accra",
                    "UTC": "UTC"
                },
                "resource_type": "definition"
            },
            {
                "label": "Tags",
                "field": "requester.tags",
                "type": "COLLECTION",
                "sub_type": "",
                "group": "REQUESTER",
                "rarity": "COMMON",
                "description": "Tags that have been added to the organization's profile",
                "input_type": "TAGS",
                "operators": [
                    "collection_contains_insensitive",
                    "collection_contains_any_insensitive",
                    "collection_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Tags",
                "field": "organization.tags",
                "type": "COLLECTION",
                "sub_type": "",
                "group": "ORGANIZATION",
                "rarity": "COMMON",
                "description": "Tags that have been added to the organization's profile",
                "input_type": "TAGS",
                "operators": [
                    "collection_contains_insensitive",
                    "collection_contains_any_insensitive",
                    "collection_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Form",
                "field": "cases.caseformid",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Form linked to conversation",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "0": "none",
                    "1": "Default"
                },
                "resource_type": "definition"
            },
            {
                "label": "State",
                "field": "cases.state",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Whether conversation is in the trash",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "ACTIVE",
                    "2": "TRASH"
                },
                "resource_type": "definition"
            },
            {
                "label": "Time since conversation created",
                "field": "cases.createdat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the conversation was created",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since last update",
                "field": "cases.updatedat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the last update to the conversation",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since latest update made by assignee",
                "field": "cases.lastagentactivityat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Amount of time since the assignee updated the conversation",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since latest update made by requester",
                "field": "casemetrics.lastrequesteractivityat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Amount of time since the requester updated the conversation",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since requester received a reply",
                "field": "casemetrics.agentlastpostcreatedat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the requester received a reply",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since conversation was first assigned",
                "field": "casemetrics.firstassignmentat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the conversation was first assigned",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since completed",
                "field": "cases.lastcompletedat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the conversation was completed",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time spent in current status",
                "field": "casemetrics.statusupdatedat",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Amount of time the conversation has spent in its current status",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time to next breach",
                "field": "caseslametricevents.time_to_next_breach",
                "type": "TIME",
                "sub_type": "FUTURE",
                "group": "SLA",
                "rarity": "COMMON",
                "description": "Amount of time remaining until the conversation breaches any SLA target",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Time since last breach",
                "field": "caseslametricevents.time_since_last_breach",
                "type": "TIME",
                "sub_type": "PAST",
                "group": "SLA",
                "rarity": "LESS_COMMON",
                "description": "Amount of time since the conversation has breached any SLA target",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "First response time remaining",
                "field": "caseslametricevents.first_response_time_remaining",
                "type": "TIME",
                "sub_type": "FUTURE",
                "group": "SLA",
                "rarity": "LESS_COMMON",
                "description": "Amount of time remaining until the conversation breaches its first reply time target",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Reply time remaining",
                "field": "caseslametricevents.reply_time_remaining",
                "type": "TIME",
                "sub_type": "FUTURE",
                "group": "SLA",
                "rarity": "LESS_COMMON",
                "description": "Amount of time remaining until the conversation breaches its resolution target",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Resolution time remaining",
                "field": "caseslametricevents.resolution_time_remaining",
                "type": "TIME",
                "sub_type": "FUTURE",
                "group": "SLA",
                "rarity": "LESS_COMMON",
                "description": "Amount of time remaining until the conversation breaches its resolution target",
                "input_type": "TIME",
                "operators": [
                    "time_greaterthan",
                    "time_greaterthan_or_equalto",
                    "time_lessthan",
                    "time_lessthan_or_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "test",
                "field": "casefields.test",
                "type": "STRING",
                "sub_type": "",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Your product url",
                "field": "casefields.your_product_url",
                "type": "STRING",
                "sub_type": "",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "test",
                "field": "organizationfields.test",
                "type": "STRING",
                "sub_type": "",
                "group": "ORGANIZATION",
                "rarity": "LESS_COMMON",
                "description": "",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Customer Success Manager",
                "field": "organizationfields.customer_success_manager",
                "type": "STRING",
                "sub_type": "",
                "group": "ORGANIZATION",
                "rarity": "LESS_COMMON",
                "description": "",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            }
        ],
        "resource": "definition",
        "total_count": 46
    }

Autocomplete

Autocomplete

Name Type Read-only Description
users.organizationid Organization
cases.requesterid User
cases.assigneeagentid User
Filter by multiple comma separated values OWNERS, ADMINS, AGENTS, COLLABORATORS
cases.lastupdatedby User
Filter by multiple comma separated values OWNERS, ADMINS, AGENTS, COLLABORATORS

Columns

RESOURCE FIELDS

Name Type Read-only Description
title string
name string

Retrieve all columns

GET /api/v1/views/columns.json

Information

Allowed for Collaborators, Admins & Owners
Scope conversations

Response

    {
        "status": 200,
        "data": [
    {
        "title": "Case ID",
        "name": "caseid",
        "resource_type": "column"
    },
    {
        "title": "Subject",
        "name": "subject",
        "resource_type": "column"
    },
    {
        "title": "Status",
        "name": "casestatusid",
        "resource_type": "column"
    },
    {
        "title": "Assignee",
        "name": "assigneeagentid",
        "resource_type": "column"
    },
    {
        "title": "Requester",
        "name": "requesterid",
        "resource_type": "column"
    }
],
        "resource": "column",
        "total_count": 30
    }

Retrieve conversations

GET /api/v1/views/:id/cases.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope conversations
Ordered by caseid (descending)

Arguments

Name Type Mandatory Description
order_by_column string column
order_by string ASC, 'DESC'

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,

    "legacy_id": "YAK-923-46434",
    "subject": "Atmosphere Coffee, Inc annual maintenance",
    "portal": "API",
    "source_channel": {
    "uuid": "37e31d9d-cbd4-48a2-9134-1206abefa1b4",

    "resource_type": "channel"
},
    "last_public_channel": {
    "uuid": "37e31d9d-cbd4-48a2-9134-1206abefa1b4",

    "resource_type": "channel"
},
    "requester": 




{
    "id": 2,

    "resource_type": "user"

}
,
    "creator": 



{
    "id": 1,

    "resource_type": "user"

}
,
    "identity": {
    "id": 1,

    "resource_type": "identity_email"

},
    "assigned_agent": 



{
    "id": 1,

    "resource_type": "user"

}
,
    "assigned_team": {
    "id": 1,
    "legacy_id": null,

    "resource_type": "team"

},
    "last_assigned_by": 



{
    "id": 1,

    "resource_type": "user"

}
,
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "status": {
    "id": 1,

    "resource_type": "case_status"

},
    "priority": {
    "id": 3,

    "resource_type": "case_priority"

},
    "type": {
    "id": 1,

    "resource_type": "case_type"

}
,
    "read_marker": {
  "id": 1,

  "resource_type": "read_marker"
},
    "sla_version": {
        "id": 1,
        "resource_type": "sla_version"
    },
    "sla_metrics": [




{
    "id": 1,

    "resource_type": "sla_metric"
},




{
    "id": 2,

    "resource_type": "sla_metric"
},




{
    "id": 3,

    "resource_type": "sla_metric"
}
    ],
    "form": {
    "id": 1,

    "resource_type": "case_form"

}

,
    "custom_fields": [
        {
            "field": {
    "id": 1,

    "resource_type": "case_field"

},
            "value": "3",
            "resource_type": "case_field_value"
        }
    ],
    "last_replier": 



{
    "id": 1,

    "resource_type": "user"

}
,
    "last_replier_identity": {
    "id": 1,

    "resource_type": "identity_email"

},
    "last_completed_by": null,
    "last_updated_by": null,
    "last_closed_by": null,
    "state": "ACTIVE",
    "post_count": 2,
    "has_notes": false,
    "pinned_notes_count": 0,
    "has_attachments": false,
    "is_merged": false,
    "rating": null,
    "rating_status": "UNOFFERED",
    "last_post_status": "SEEN",
    "last_post_preview": "My HubID is 525862. I'm trying to send a notification email to my salespeople when a contact is assigned to them. All of my other salespeople are receiving the emails fine, but for one person they never arrived. We checked in their SPAM folder, but the...",
    "last_post_type": "PUBLIC",
    "last_message_preview": "My HubID is 525862. I'm trying to send a notification email to my salespeople when a contact is assigned to them. All of my other salespeople are receiving the emails fine, but for one person they never arrived. We checked in their SPAM folder, but the...",
    "realtime_channel": "presence-d6c6a8b31be92885222ee53dde6c99c745c5f4cf77f1bd9dd3519d07fa730c71@v1_cases_1",
    "last_assigned_at": "2015-07-30T06:45:25+05:00",
    "last_replied_at": "2015-07-27T11:35:09+05:00",
    "last_opened_at": null,
    "last_pending_at": null,
    "last_closed_at": null,
    "last_completed_at": null,
    "last_agent_activity_at": null,
    "last_customer_activity_at": "2015-07-30T06:45:25+05:00",
    "last_reply_by_agent_at": null,
    "last_reply_by_requester_at": null,
    "agent_updated_at": null,
    "latest_assignee_update": null,
    "created_at": "2015-07-30T06:45:25+05:00",
    "updated_at": "2015-07-30T06:45:25+05:00",

    "resource_type": "case"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/1"

}

        ],
        "resource": "case",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Counts

RESOURCE FIELDS

Name Type Read-only Description
view View
count integer
Total number of conversations
case_count_accuracy string
ABSOLUTE, RELATIVE
latest_case_id integer
id of the most recently created Conversation in this view
realtime_channel string
Subscribe to this channel for realtime updates

Retrieve counts

GET /api/v1/views/counts.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope conversations

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,

    "view": {
    "id": 2,

    "resource_type": "view"

}
,
    "count": 9,
    "case_count_accuracy": "ABSOLUTE",
    "latest_case_id": 19,
    "realtime_channel": "presence-e6249ccf406c147aef32b054edd2cb5082b697674caad379ed0965905da41898@v1_views_counts_1",

    "resource_type": "view_count"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/counts/1"

}

        ],
        "resource": "view_count",
        "total_count": 1
    }

Retrieve a count

GET /api/v1/views/counts/:id.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope conversations

Response

    {
        "status": 200,
        "data": {
    "id": 1,

    "view": {
    "id": 2,

    "resource_type": "view"

}
,
    "count": 9,
    "case_count_accuracy": "ABSOLUTE",
    "latest_case_id": 19,
    "realtime_channel": "presence-e6249ccf406c147aef32b054edd2cb5082b697674caad379ed0965905da41898@v1_views_counts_1",

    "resource_type": "view_count"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/views/counts/1"

}
,
        "resource": "view_count"
    }