Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@
- room
- rooms
- sms-incoming
- triggers
- users
- video-call
- visitor
Expand Down
1 change: 1 addition & 0 deletions contributing/documentation/documentation-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ Here you can also find what articles are incomplete and missing.
- room
- rooms
- sms-incoming
- triggers
- users
- video-call
- Miscellaneous:
Expand Down
2 changes: 2 additions & 0 deletions developer-guides/rest-api/livechat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Manage Livechat related data:
| `/api/v1/livechat/room.forward` | `POST` | Allow Livechat Agents to forward a Livechat room to another agent, department or return it back to the Queue. | [info](room/index.html#forward-livechat-room) |
| `/api/v1/livechat/room.survey` | `POST` | Send a Livechat survey to Rocket.Chat. | [info](room/index.html#send-the-livechat-survey) |
| `/api/v1/livechat/transcript` | `POST` | Request a Livechat transcript. | [info](transcript/) |
| `/api/v1/livechat/triggers` | `GET` | Get the Livechat triggers. | [info](triggers/) |
| `/api/v1/livechat/triggers/:_id` | `GET` | Get a Livechat trigger. | [info](triggers/) |
| `/api/v1/livechat/video.call/:token` | `GET` | Request a new video call room. | [info](video-call/) |
| `/api/v1/livechat/visitor` | `POST` | Register a new Livechat visitor. | [info](visitor/index.html) |
| `/api/v1/livechat/visitor/:token` | `GET` | Retrieve a visitor data. | [info](visitor/index.html) |
Expand Down
112 changes: 112 additions & 0 deletions developer-guides/rest-api/livechat/triggers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Livechat Triggers

## Get the Livechat Triggers

Lists all Livechat triggers. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/).

| URL | Requires Auth | HTTP Method |
| :----------------------------------- | :------------ | :---------- |
| `/api/v1/livechat/triggers` | `yes` | `GET` |

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/livechat/triggers
```

## Example Result

```json
{
"triggers": [
{
"_id": "Lk52shJFYyb55trw8",
"name": "test",
"description": "test",
"enabled": true,
"runOnce": true,
"conditions": [
{
"name": "page-url",
"value": ""
}
],
"actions": [
{
"name": "send-message",
"params": {
"sender": "",
"msg": ""
}
}
],
"_updatedAt": "2019-10-04T15:36:29.695Z"
}
],
"count": 1,
"offset": 0,
"total": 1,
"success": true
}
```

## Change Log

| Version | Description |
| :------ | :---------- |
| 2.2.0 | Added |

## Get a Livechat Trigger

Get a Livechat Trigger by id.

| URL | Requires Auth | HTTP Method |
| :----------------------------------- | :------------ | :---------- |
| `/api/v1/livechat/triggers/:_id` | `yes` | `GET` |

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/livechat/triggers/Lk52shJFYyb55trw8
```

## Example Result

```json
{
"trigger": {
"_id": "Lk52shJFYyb55trw8",
"name": "test",
"description": "test",
"enabled": true,
"runOnce": true,
"conditions": [
{
"name": "page-url",
"value": ""
}
],
"actions": [
{
"name": "send-message",
"params": {
"sender": "",
"msg": ""
}
}
],
"_updatedAt": "2019-10-04T15:36:29.695Z"
},
"success": true
}
```

## Change Log

| Version | Description |
| :------ | :---------- |
| 2.2.0 | Added |