Type Definitions
assignOptions(nobot, noPopulate)
This type is called `assignOptions` and is provided as options to apply to an assign method.
Parameters:
Name | Type | Description |
---|---|---|
nobot |
boolean | If true, the department chatbot, if any, is ignored and the assign work on humans |
noPopulate |
boolean | (esperimental) if true the request is left 'dry' (no additional metadata are added) |
chatMessage
The Chat21 message format. More on messages format (Review this link).
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
senderFullname |
string | The sender full name |
recipient |
string | The message recipiet's ID |
text |
number | The message's text |
type |
number | The message type. Allowed types are 'text' (default), 'image', 'frame' |
metadata |
Object | The message's metadata. Some type as 'image' or 'frame' need metadata. |
attributes |
Object | Custom attributes attacched to this message. |
queryParams
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
sortField |
string | what field to sort the results by. Default field is 'createdAt' |
direction |
string | sort direction: 1 (asc) or -1 (desc). Return the results in ascending (1) or descending (-1) order. Defaults to desc (-1) |
page |
number | What page of results to fetch. Defaults to first page. |
limit |
number | Specifies the maximum number of results to be returned. Default is 40 rows |
full_text |
string | Executes a fulltext search query |
status |
string | Filters by request status. Values: 100 for unserved requests, 200 for served requests, 1000 for closed requests, "all" to retrieve all statuses. Default value is status < 1000 so it returns all the opened requests. |
dept_id |
string | Filters by department's ID |
lead |
string | Filters by lead's ID |
participant |
string | Filters by participant ID (agent or bot) |
requestProperties
The Request properties JSON object.
More info.
More info.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
first_text |
string | The sender full name |
lead |
string | The Lead ID |
status |
number | The request's status |
tags |
array | The request's tags. It is an array of {string} |
rating |
number | The request's rating. A number between 0 and 5. |
rating_message |
string | The request rating's message. |
language |
string | The request's language. |
sourcePage |
string | The web page's URL where the request originated, if one. |
resultCallback(error, result)
This callback type is called `resultCallback` and is provided as a return value by each API call.
Parameters:
Name | Type | Description |
---|---|---|
error |
Object | the error if some occurs, otherwise null |
result |
Object | the response body |