CustomMessages
(customMessages)
Overview
Operations related to custom message configuration. A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week.
Available Operations
- list - Custom Messages List
- create - Create Custom Message
- update - Update Custom Message
- getById - Get Custom Message By Id
- delete - Delete Custom Message
list
List the existing custom_messages
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.CustomMessagesListRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.ListResponseCustomMessageResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
create
Create a new custom message
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | components.CustomMessageCreateRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CustomMessageResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
update
Update a custom message
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | components.CustomMessageUpdateRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CustomMessageResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
getById
Get the custom message by its ID
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.CustomMessageGetByIdRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.CustomMessageResponse>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |
delete
Delete custom message by ID
Example Usage
Standalone function
The standalone function version of this method:
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
request | operations.CustomMessagesDeleteRequest | TRUE | The request object to use for the request. |
options | RequestOptions | FALSE | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | FALSE | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries | RetryConfig | FALSE | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise\ANY>
Errors
Error Type | Status Code | Content Type |
---|---|---|
errors.HTTPValidationError | 422 | application/json |
errors.SDKError | 4XX, 5XX | */* |