Triggers

Resource Fields

Name Type Read-only Description
title string
channel string API, MAIL, TWITTER, FACEBOOK, VOICE, MESSENGER, SYSTEM, HELPCENTER
event string
predicate_collections Predicate Collections
actions Action
execution_order integer
is_enabled boolean
last_triggered_at timestamp ISO-8601 Format
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

Channels

RESOURCE FIELDS

Name Type Read-only Description
name string
API, MAIL, TWITTER, FACEBOOK, MESSENGER, SYSTEM
event string
When there are no events, (Any) is implied

Retrieve all trigger channels

GET /api/v1/triggers/channels.json

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200,
    "data": [
        {
            "name": "SYSTEM",
            "events": [
                "SLA_BREACHED",
                "TRIGGER",
                "MONITOR"
            ],
            "resource_type": "trigger_channel"
        },
        {
            "name": "API",
            "events": [],
            "resource_type": "trigger_channel"
        },
        {
            "name": "HELPCENTER",
            "events": [],
            "resource_type": "trigger_channel"
        },
        {
            "name": "MAIL",
            "events": [
                "INCOMING_MAIL"
            ],
            "resource_type": "trigger_channel"
        },
        {
            "name": "MESSENGER",
            "events": [],
            "resource_type": "trigger_channel"
        },
        {
            "name": "TWITTER",
            "events": [
                "MENTION",
                "DIRECT_MESSAGE",
                "SAVED_SEARCH"
            ],
            "resource_type": "trigger_channel"
        },
        {
            "name": "FACEBOOK",
            "events": [
                "WALL_POST",
                "MESSAGE"
            ],
            "resource_type": "trigger_channel"
        }
    ],
    "resource": "trigger_channel",
    "total_count": 7
}

Propositions

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_businesshours, time_greaterthan_or_equalto, time_greaterthan_or_equalto_businesshours, time_lessthan, time_lessthan_businesshours, time_lessthan_or_equalto, time_lessthan_or_equalto_businesshours

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, FLOAT, BOOLEAN, BOOLEAN_TRUE, BOOLEAN_FALSE, TAGS, STRING, 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"}

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

Retrieve all propositions

GET /api/v1/triggers/definitions.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

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

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",
                    "history_changed",
                    "history_not_changed"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_not_changed"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "values": {
                    "0": "none",
                    "1": "Default"
                },
                "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_businesshours",
                    "time_greaterthan_or_equalto",
                    "time_greaterthan_or_equalto_businesshours",
                    "time_lessthan",
                    "time_lessthan_businesshours",
                    "time_lessthan_or_equalto",
                    "time_lessthan_or_equalto_businesshours"
                ],
                "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_businesshours",
                    "time_greaterthan_or_equalto",
                    "time_greaterthan_or_equalto_businesshours",
                    "time_lessthan",
                    "time_lessthan_businesshours",
                    "time_lessthan_or_equalto",
                    "time_lessthan_or_equalto_businesshours"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Role",
                "field": "requester.roletype",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Requester's role",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "2": "Admin",
                    "3": "Agent",
                    "4": "Collaborator",
                    "5": "Customer",
                    "1": "Owner"
                },
                "resource_type": "definition"
            },
            {
                "label": "Primary email",
                "field": "identityemails.address",
                "type": "STRING",
                "sub_type": "",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Requester's primary email address",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Number of Twitter followers",
                "field": "identitytwitter.followercount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Number of followers on the requester's twitter account",
                "input_type": "INTEGER",
                "operators": [
                    "comparison_equalto",
                    "comparison_greaterthan",
                    "comparison_lessthan"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Twitter account verified",
                "field": "identitytwitter.isverified",
                "type": "BOOLEAN",
                "sub_type": "",
                "group": "REQUESTER",
                "rarity": "LESS_COMMON",
                "description": "Whether the requester's Twitter account is verified",
                "input_type": "BOOLEAN_TRUE",
                "operators": [
                    "comparison_equalto"
                ],
                "values": null,
                "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",
                    "history_changed",
                    "history_changed_to",
                    "history_changed_from",
                    "history_not_changed",
                    "history_not_changed_to",
                    "history_not_changed_from"
                ],
                "values": {
                    "1": "ACTIVE",
                    "2": "TRASH"
                },
                "resource_type": "definition"
            },
            {
                "label": "Number of email attachments",
                "field": "mail.attachmentcount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Number of files attached to the email",
                "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": "Received at",
                "field": "mail.mailbox",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "MAIL",
                "rarity": "COMMON",
                "description": "Email address at which the message was received",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "support@brewfictus.kayako.com"
                },
                "resource_type": "definition"
            },
            {
                "label": "Attachment names",
                "field": "mail.attachmentname",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Filenames of any email attachments",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Subject",
                "field": "mail.subject",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Email subject line",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Reply-to",
                "field": "mail.replyto",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Reply-to address of the email",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "From name",
                "field": "mail.sendername",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "COMMON",
                "description": "Name of the sender",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "From address",
                "field": "mail.senderaddress",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "COMMON",
                "description": "Email address of the sender",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Raw message headers",
                "field": "mail.headers",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Contents of the email headers",
                "input_type": "STRING",
                "operators": [
                    "string_regularexpression"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "CC recipients",
                "field": "mail.ccrecipients",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Email addresses of any CC recipients",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "BCC recipients",
                "field": "mail.bccrecipients",
                "type": "STRING",
                "sub_type": "",
                "group": "MAIL",
                "rarity": "LESS_COMMON",
                "description": "Email addresses of any BCC recipients",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Update type",
                "field": "case.updateeventtype",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Type of update, whether it's a new conversation or a change to an existing one",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "Any type of update",
                    "2": "Existing conversation update",
                    "3": "New conversation created"
                },
                "resource_type": "definition"
            },
            {
                "label": "Updated during",
                "field": "case.updatedduring",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Business hours during which the update was made",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "-1": "(Assigned team's hours)",
                    "-2": "(Any time)",
                    "1": "Default"
                },
                "resource_type": "definition"
            },
            {
                "label": "Updated by user role",
                "field": "case.currentusersroletype",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Role of the user who makes an update that fires this trigger",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "2": "Admin",
                    "3": "Agent",
                    "4": "Collaborator",
                    "5": "Customer",
                    "1": "Owner"
                },
                "resource_type": "definition"
            },
            {
                "label": "Updated by user",
                "field": "case.currentuser",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "User who makes an update that fires this trigger",
                "input_type": "AUTOCOMPLETE",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "New message type",
                "field": "case.newpost",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "CASES",
                "rarity": "COMMON",
                "description": "Type of message, either a private note or a reply to the customer",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "6": "Any (Reply or Note)",
                    "7": "Reply only"
                },
                "resource_type": "definition"
            },
            {
                "label": "Message content",
                "field": "case.postcontents",
                "type": "STRING",
                "sub_type": "",
                "group": "CASES",
                "rarity": "LESS_COMMON",
                "description": "Contents of the new message",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Page URL",
                "field": "caseposts.page_url",
                "type": "STRING",
                "sub_type": "",
                "group": "MESSENGER",
                "rarity": "COMMON",
                "description": "URL of the page the Messenger conversation is happening on",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "SLA metric breached",
                "field": "caseslametrics.breached",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "SLA",
                "rarity": "LESS_COMMON",
                "description": "",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "FIRST_REPLY_TIME",
                    "2": "NEXT_REPLY_TIME",
                    "3": "RESOLUTION_TIME"
                },
                "resource_type": "definition"
            },
            {
                "label": "Satisfaction comment",
                "field": "satisfactionratings.comment",
                "type": "STRING",
                "sub_type": "",
                "group": "SATISFACTION",
                "rarity": "COMMON",
                "description": "Satisfaction comment is updated on conversation",
                "input_type": "STRING",
                "operators": [
                    "history_changed"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Received at",
                "field": "facebookpages.title",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "FACEBOOK",
                "rarity": "",
                "description": "",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "543w5"
                },
                "resource_type": "definition"
            },
            {
                "label": "Received at",
                "field": "twitteraccounts.screenname",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "TWITTER",
                "rarity": "",
                "description": "",
                "input_type": "OPTIONS",
                "operators": [
                    "comparison_equalto",
                    "comparison_not_equalto"
                ],
                "values": {
                    "1": "TaylorWestRnbw",
                    "2": "TobyBrewfictus"
                },
                "resource_type": "definition"
            },
            {
                "label": "From Handle",
                "field": "identitytwitter.screenname",
                "type": "STRING",
                "sub_type": "",
                "group": "TWITTER",
                "rarity": "",
                "description": "",
                "input_type": "STRING",
                "operators": [
                    "string_contains_insensitive",
                    "string_does_not_contain_insensitive"
                ],
                "values": null,
                "resource_type": "definition"
            },
            {
                "label": "Likes",
                "field": "tweets.favoritecount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "TWITTER",
                "rarity": "",
                "description": "",
                "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": "Retweets",
                "field": "tweets.retweetcount",
                "type": "NUMERIC",
                "sub_type": "INTEGER",
                "group": "TWITTER",
                "rarity": "",
                "description": "",
                "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": "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",
                    "history_changed",
                    "history_not_changed"
                ],
                "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",
                    "history_changed",
                    "history_not_changed"
                ],
                "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",
                    "history_changed",
                    "history_not_changed"
                ],
                "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",
                    "history_changed",
                    "history_not_changed"
                ],
                "values": null,
                "resource_type": "definition"
            }
        ],
        "resource": "definition",
        "total_count": 63
    }

Actions

RESOURCE FIELDS

Name Type Read-only Description
label string
name string
The name can be retrieved from Definition
option string
The option can be retrieved from Definition
value mixed
attributes Attributes

Attributes

RESOURCE FIELDS

Name Type Read-only Description
name string
value mixed

Definitions

RESOURCE FIELDS

Name Type Read-only Description
label string
name string
Action name on which the trigger will run
options string
CHANGE, REVERT, INCREASE, DECREASE, ADD, REMOVE, REPLACE, SEND
rarity string
COMMON, LESS_COMMON
description string
Action description
input_type string
INTEGER, FLOAT, STRING, BOOLEAN, BOOLEAN_TRUE, BOOLEAN_FALSE, OPTIONS, MULTIPLE, TAGS, ENDPOINT_EMAIL, ENDPOINT_HTTP, ENDPOINT_HTTP_JSON, ENDPOINT_HTTP_XML, ENDPOINT_SLACK, DATE_ABSOLUTE, EMAIL, AUTOCOMPLETE, NOTIFICATION_USER, NOTIFICATION_TEAM, CASCADING_SELECT
value_type string
NUMERIC, FLOAT, STRING, BOOLEAN, COLLECTION, DATE_ABSOLUTE, TIME, ATTRIBUTES
values mixed
For label Email a user use its action values with the User autocomplete filter by multiple comma separated values OWNERS, ADMINS, AGENTS, COLLABORATORS
attributes mixed
group string
CASE, CUSTOM_FIELD, NOTIFICATION, ENDPOINT, FLOW_CONTROL

Retrieve all action definitions

GET /api/v1/triggers/actions/definitions.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

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

Response

    {
        "status": 200,
        "data": [
            {
                "label": "Status",
                "name": "status",
                "options": [
                    "CHANGE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Change the status of the conversation",
                "input_type": "OPTIONS",
                "value_type": "NUMERIC",
                "values": {
                    "5": "Closed",
                    "4": "Completed",
                    "2": "Open",
                    "3": "Pending"
                },
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Priority",
                "name": "priority",
                "options": [
                    "CHANGE",
                    "INCREASE",
                    "DECREASE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Change the priority of the conversation",
                "input_type": "OPTIONS",
                "value_type": "NUMERIC",
                "values": {
                    "0": "none",
                    "3": "High",
                    "1": "Low",
                    "2": "Normal",
                    "4": "Urgent"
                },
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Type",
                "name": "type",
                "options": [
                    "CHANGE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Change the type of the conversation",
                "input_type": "OPTIONS",
                "value_type": "NUMERIC",
                "values": {
                    "0": "none",
                    "4": "Incident",
                    "3": "Problem",
                    "1": "Question",
                    "2": "Task"
                },
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Assignee",
                "name": "assignee",
                "options": [
                    "CHANGE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Change the agent assigned to the conversation",
                "input_type": "AUTOCOMPLETE",
                "value_type": "NUMERIC",
                "values": {
                    "0": "(Unassigned)",
                    "-6": "(Current user)"
                },
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Team",
                "name": "team",
                "options": [
                    "CHANGE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Change the team to which the conversation belongs",
                "input_type": "OPTIONS",
                "value_type": "NUMERIC",
                "values": {
                    "1": "General"
                },
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Form",
                "name": "form",
                "options": [
                    "CHANGE"
                ],
                "rarity": "COMMON",
                "description": "Change the form the conversation uses",
                "input_type": "OPTIONS",
                "value_type": "NUMERIC",
                "values": [
                    "none",
                    "Default"
                ],
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Tags",
                "name": "tags",
                "options": [
                    "ADD",
                    "REMOVE",
                    "REPLACE",
                    "REVERT"
                ],
                "rarity": "COMMON",
                "description": "Add or remove tags from the conversation",
                "input_type": "TAGS",
                "value_type": "COLLECTION",
                "values": "",
                "attributes": [],
                "group": "CASE",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Satisfaction survey",
                "name": "satisfactionsurvey",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Send a satisfaction survey to the conversation's requester",
                "input_type": "BOOLEAN_TRUE",
                "value_type": "BOOLEAN",
                "values": "",
                "attributes": [],
                "group": "FLOW_CONTROL",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Email a user",
                "name": "notificationuser",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Send an email notification to a specific user",
                "input_type": "NOTIFICATION_USER",
                "value_type": "ATTRIBUTES",
                "values": {
                    "-6": "(Current user)",
                    "-2": "(Last active user)",
                    "-3": "(Requester)",
                    "-4": "(Assignee)"
                },
                "attributes": [
                    "subject",
                    "message"
                ],
                "group": "NOTIFICATION",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Email a team",
                "name": "notificationteam",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Send an email notification to everyone on a particular team",
                "input_type": "NOTIFICATION_TEAM",
                "value_type": "ATTRIBUTES",
                "values": {
                    "-5": "(Assigned team)",
                    "1": "General"
                },
                "attributes": [
                    "subject",
                    "message"
                ],
                "group": "NOTIFICATION",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Stop notifications",
                "name": "stopnotification",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Prevent any notifications from being sent as a result of this update",
                "input_type": "BOOLEAN_TRUE",
                "value_type": "BOOLEAN",
                "values": "",
                "attributes": [],
                "group": "FLOW_CONTROL",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Stop processing other rules",
                "name": "stoprules",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Prevent any subsequent triggers from firing as a result of this update",
                "input_type": "BOOLEAN_TRUE",
                "value_type": "BOOLEAN",
                "values": "",
                "attributes": [],
                "group": "FLOW_CONTROL",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Trash a conversation",
                "name": "trash",
                "options": [
                    "SEND"
                ],
                "rarity": "COMMON",
                "description": "Send the conversation to the trash",
                "input_type": "BOOLEAN_TRUE",
                "value_type": "BOOLEAN",
                "values": "",
                "attributes": [],
                "group": "FLOW_CONTROL",
                "resource_type": "automation_action_definition"
            },
            {
                "label": "Your Kayako URL",
                "name": "customfield_8",
                "options": [
                    "CHANGE",
                    "REVERT"
                ],
                "rarity": "",
                "description": "",
                "input_type": "STRING",
                "value_type": "STRING",
                "values": "",
                "attributes": [],
                "group": "CUSTOM_FIELD",
                "resource_type": "automation_action_definition"
            }
        ],
        "resource": "automation_action_definition",
        "total_count": 14
    }

Retrieve all triggers

GET /api/v1/triggers.json

Information

Allowed for Admins & Owners
Scope configuration
Ordered by execution_order (ascending)

Response

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

    "title": "Notify owner on case note",
    "channel": null,
    "event": null,
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "actions": [
        {
    "id": 1,

    "resource_type": "automation_action"
}
    ],
    "execution_order": 1,
    "is_enabled": false,
    "last_triggered_at": null,
    "created_at": "2016-05-03T09:28:39+00:00",
    "updated_at": "2016-05-03T09:28:39+00:00",

    "resource_type": "trigger"

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

}

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

Retrieve a trigger

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

Information

Allowed for Admins & Owners
Scope configuration

Response

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

    "title": "Notify owner on case note",
    "channel": null,
    "event": null,
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "actions": [
        {
    "id": 1,

    "resource_type": "automation_action"
}
    ],
    "execution_order": 1,
    "is_enabled": false,
    "last_triggered_at": null,
    "created_at": "2016-05-03T09:28:39+00:00",
    "updated_at": "2016-05-03T09:28:39+00:00",

    "resource_type": "trigger"

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

}
,
        "resource": "trigger"
    }

Add a trigger

POST /api/v1/triggers.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
channel string Retrieve a channel using channel end-point

Empty channel equals (Any)
event string Retrieve a channel event using channel end-point

Empty events equals (Any)
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: 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"}]}
actions[] array
Retrieve the action using action end-point

Examples:

Input type: INTEGER

{"name":"customfield_10","option":"CHANGE","value":"3"}

Input type: BOOLEAN_TRUE

{"name":"satisfactionsurvey","option":"SEND","value":"true"}

Input type: BOOLEAN_FALSE

{"name":"satisfactionsurvey","option":"SEND","value":"false"}

Input type: BOOLEAN

{"name":"satisfactionsurvey","option":"SEND","value":"false"}

Input type: OPTIONS

{"name":"status","option":"CHANGE","value":"2"}

Input type: MULTIPLE

{"name":"customfield_12","option":"ADD","value":"2, 3"}

Input type: TAGS

{"name":"tags","option":"ASS","value":"brewing, intermittent"}

Input type: ENDPOINT_EMAIL

{"name":"endpoint_1","option":"SEND","value":"brewing"}

Input type: ENDPOINT_HTTP_JSON

{"name":"endpoint_2","option":"SEND","value":"{\"foo\": \"example1\" }"}

Input type: ENDPOINT_HTTP_XML

{"name":"endpoint_3","option":"SEND","value":"<name>Robert</name>

Input type: ENDPOINT_HTTP_SLACK

{"name":"endpoint_4","option":"SEND","value":"Robert

Input type: NOTIFICATION

{"name":"notification_email","option":"SEND","value":"-2","attributes":{"subject":"Thanks for contacting us","message":"We will get back to you in 2 Hours"}}

Input type: AUTOMCOMPLETE

{"name":"assignee","option":"CHANGE","value":"1"
is_enabled boolean Default: true

Response

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

    "title": "Notify owner on case note",
    "channel": null,
    "event": null,
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "actions": [
        {
    "id": 1,

    "resource_type": "automation_action"
}
    ],
    "execution_order": 1,
    "is_enabled": false,
    "last_triggered_at": null,
    "created_at": "2016-05-03T09:28:39+00:00",
    "updated_at": "2016-05-03T09:28:39+00:00",

    "resource_type": "trigger"

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

}
,
        "resource": "trigger"
    }

Update a trigger

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

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
channel string Retrieve a channel using channel end-point

Empty channel equals (Any)
event string Retrieve a channel event using channel end-point

Empty channel equals (Any)
predicate_collections[] array Example:

[{"id":1, "propositions":[{"id":1, "field":"cases.casestatusid", "operator":"comparison_equalto", "value":1}, {"id":2, "field":"cases.channeltype", "operator":"comparison_equalto", "value":"MAIL"}, {"id":null, "field":"cases.casepriorityid", "operator":"comparison_equalto", "value":1}]}]
actions[] array Example:

[{"id":2, "name":"notification_email","option":"send","value":"Requester","attributes":[{"id":2, "subject":"Thanks for contacting us","message":"We will get back to you in 2 Hours"}}]
is_enabled boolean

Response

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

    "title": "Notify owner on case note",
    "channel": null,
    "event": null,
    "predicate_collections": [
        {
            "id": 1,
            "resource_type": "predicate_collection"
        }
    ],
    "actions": [
        {
    "id": 1,

    "resource_type": "automation_action"
}
    ],
    "execution_order": 1,
    "is_enabled": false,
    "last_triggered_at": null,
    "created_at": "2016-05-03T09:28:39+00:00",
    "updated_at": "2016-05-03T09:28:39+00:00",

    "resource_type": "trigger"

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

}
,
        "resource": "trigger"
    }

Reorder triggers

PUT /api/v1/triggers/reorder.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
trigger_ids string
Pass the trigger ids in order you want to set

Response

{
    "status": 200
}

Delete a trigger

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

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200
}

Delete triggers

DELETE /api/v1/triggers.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Response

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