This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GITBOOK-1175: Omnichannel - custom fields
- Loading branch information
1 parent
be1ee17
commit 2288dfb
Showing
9 changed files
with
166 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ts/omnichannel/livechat-endpoints/custom-fields/get-custom-field-information.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Get Custom Field Information | ||
|
||
Get details about a specific custom field. | ||
|
||
<table><thead><tr><th width="163">HTTP Method</th><th width="332">URL</th><th>Requires Auth</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>/api/v1/livechat/custom-fields/:_id</code></td><td><a href="../../../authentication-endpoints/">yes</a></td></tr></tbody></table> | ||
|
||
{% hint style="info" %} | ||
Permission required: `view-l-room` | ||
{% endhint %} | ||
|
||
## Path Variables | ||
|
||
<table><thead><tr><th width="197">Key</th><th width="254">Example Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_id</code><mark style="color:red;"><code>*</code></mark></td><td><code>address</code></td><td>The custom field ID.</td></tr></tbody></table> | ||
|
||
## Example Call | ||
|
||
```bash | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
http://localhost:3000/api/v1/livechat/custom-fields/address | ||
``` | ||
|
||
## Example Response | ||
|
||
```json | ||
{ | ||
"customField": { | ||
"_id": "address", | ||
"label": "address", | ||
"scope": "visitor", | ||
"visibility": "visible", | ||
"regexp": "", | ||
"searchable": true, | ||
"type": "input", | ||
"required": false, | ||
"defaultValue": "", | ||
"options": "", | ||
"public": true, | ||
"_updatedAt": "2023-10-30T13:43:09.408Z", | ||
"id": "address" | ||
}, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| ------- | ----------- | | ||
| 2.4.0 | Added | |
38 changes: 0 additions & 38 deletions
38
...s/omnichannel/livechat-endpoints/custom-fields/get-info-about-a-custom-field.md
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
...ints/omnichannel/livechat-endpoints/custom-fields/get-livechat-custom-fields.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Get Livechat Custom Fields | ||
|
||
Get a list of the Livechat custom fields. | ||
|
||
<table><thead><tr><th width="163">HTTP Method</th><th width="332">URL</th><th>Requires Auth</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>/api/v1/livechat/custom-fields</code></td><td><a href="../../../authentication-endpoints/">yes</a></td></tr></tbody></table> | ||
|
||
{% hint style="info" %} | ||
Permission required: `view-l-room` | ||
{% endhint %} | ||
|
||
## Query Parameters | ||
|
||
This endpoint supports the [#pagination](../../../../#pagination "mention") query parameters. | ||
|
||
## Example Call | ||
|
||
```powershell | ||
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ | ||
-H "X-User-Id: aobEdbYhXfu5hkeqG" \ | ||
http://localhost:3000/api/v1/livechat/custom-fields | ||
``` | ||
|
||
## Example Response | ||
|
||
```json | ||
{ | ||
"customFields": [ | ||
{ | ||
"_id": "address", | ||
"label": "address", | ||
"scope": "visitor", | ||
"visibility": "visible", | ||
"regexp": "", | ||
"searchable": true, | ||
"type": "input", | ||
"required": false, | ||
"defaultValue": "", | ||
"options": "", | ||
"public": true, | ||
"_updatedAt": "2023-10-30T13:43:09.408Z", | ||
"id": "address" | ||
} | ||
], | ||
"count": 1, | ||
"offset": 0, | ||
"total": 1, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| ------- | ----------- | | ||
| 2.2.0 | Added | |
49 changes: 0 additions & 49 deletions
49
...nts/omnichannel/livechat-endpoints/custom-fields/list-livechat-custom-fields.md
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
...ts/omnichannel/livechat-endpoints/custom-fields/send-a-livechat-custom-field.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...dpoints/omnichannel/livechat-endpoints/custom-fields/send-custom-field-value.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Send Custom Field Value | ||
|
||
Send the value for a custom field. | ||
|
||
<table><thead><tr><th width="163">HTTP Method</th><th width="332">URL</th><th>Requires Auth</th></tr></thead><tbody><tr><td><code>POST</code></td><td><code>/api/v1/livechat/custom.field</code></td><td><code>no</code></td></tr></tbody></table> | ||
|
||
## Body Parameters | ||
|
||
<table><thead><tr><th width="215">Key</th><th width="225">Example Value</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code><mark style="color:red;"><code>*</code></mark></td><td><code>iNKE8a6k6cjbqWhWd</code></td><td>The visitor token.</td></tr><tr><td><code>key</code><mark style="color:red;"><code>*</code></mark></td><td><code>address</code></td><td>The custom field.</td></tr><tr><td><code>value</code><mark style="color:red;"><code>*</code></mark></td><td><code>Rocket.Chat Avenue</code></td><td>The value you want to set for the custom field.</td></tr><tr><td><code>overwrite</code><mark style="color:red;"><code>*</code></mark></td><td><code>true</code></td><td>Overwrite the value of the custom field.</td></tr></tbody></table> | ||
|
||
## Example Call | ||
|
||
```powershell | ||
curl -X POST \ | ||
-H "Content-type:application/json" \ | ||
http://localhost:3000/api/v1/livechat/custom.field \ | ||
-d '{"token": "iNKE8a6k6cjbqWhWd", | ||
"key": "address", | ||
"value": "Rocket.Chat Avenue", | ||
"overwrite": true}' | ||
``` | ||
|
||
## Example Response | ||
|
||
```json | ||
{ | ||
"field": { | ||
"key": "address", | ||
"value": "Rocket.Chat Avenue", | ||
"overwrite": true | ||
}, | ||
"success": true | ||
} | ||
``` | ||
|
||
## Change Log | ||
|
||
| Version | Description | | ||
| ------- | ----------- | | ||
| 0.70.0 | Added | |