# ConversationMessagesByWebsiteIdAndSessionId: Crisp Conversation Messages
## Documentation
All messages of one chat or email conversation, oldest batch last. Crisp returns the most recent batch first and the driver walks back in time using the timestamp of the oldest message retrieved.
- Catalog: `Crisp`
- Schema: `Crisp`
- Primary Keys: `fingerprint`
- Label: Conversation Messages
This is a read-only table function. The Crisp API may not support changing the data or the Invantive UniversalSQL driver for Crisp does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Crisp API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `ConversationMessagesByWebsiteIdAndSessionId`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `session_id` | `varchar2` | ☑ | | The conversation session identifier. |
| `session_id` | `varchar2` | ☑ | | The conversation session identifier. |
| `website_id` | `varchar2` | ☐ | | The website identifier. Defaults to the website ID of the connection when left out. |
| `website_id` | `varchar2` | ☐ | | The website identifier. Defaults to the website ID of the connection when left out. |
## Columns of Table Function
The columns of the table function `ConversationMessagesByWebsiteIdAndSessionId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `automated` | `char` | | ☐ | Whether the message is automated or not (ie. comes from a bot). |
| `automated` | `char` | | ☐ | Whether the message is automated or not (ie. comes from a bot). |
| `content_duration` | `int32` | | ☐ | Object duration in seconds (only set for the type audio). |
| `content_duration` | `int32` | | ☐ | Object duration in seconds (only set for the type audio). |
| `content_explain` | `varchar2` | | ☐ | Object explanatory text (only set for the type field). |
| `content_explain` | `varchar2` | | ☐ | Object explanatory text (only set for the type field). |
| `content_id` | `varchar2` | | ☐ | Object identifier (only set for the types picker and field). |
| `content_id` | `varchar2` | | ☐ | Object identifier (only set for the types picker and field). |
| `content_name` | `varchar2` | | ☐ | Object name (only set for the type file). |
| `content_name` | `varchar2` | | ☐ | Object name (only set for the type file). |
| `content_namespace` | `varchar2` | | ☐ | Event namespace (only set for the type event). |
| `content_namespace` | `varchar2` | | ☐ | Event namespace (only set for the type event). |
| `content_required` | `char` | | ☐ | Whether the message must be filled before continuing (only set for the types picker and field). |
| `content_required` | `char` | | ☐ | Whether the message must be filled before continuing (only set for the types picker and field). |
| `content_text` | `varchar2` | | ☐ | Object text (only set for the types picker, field, carousel and event). |
| `content_text` | `varchar2` | | ☐ | Object text (only set for the types picker, field, carousel and event). |
| `content_type` | `varchar2` | | ☐ | Object MIME type (only set for the types file, animation and audio). |
| `content_type` | `varchar2` | | ☐ | Object MIME type (only set for the types file, animation and audio). |
| `content_url` | `varchar2` | | ☐ | Object URL (only set for the types file, animation and audio). |
| `content_url` | `varchar2` | | ☐ | Object URL (only set for the types file, animation and audio). |
| `content_value` | `varchar2` | | ☐ | Object value (only set for the type field). |
| `content_value` | `varchar2` | | ☐ | Object value (only set for the type field). |
| `content` | `varchar2` | | ☐ | Message content; the text itself for the types text and note, otherwise the content object as JSON. |
| `content` | `varchar2` | | ☐ | Message content; the text itself for the types text and note, otherwise the content object as JSON. |
| `delivered` | `varchar2` | | ☐ | Channel in which the message has last been delivered (can be blank). |
| `delivered` | `varchar2` | | ☐ | Channel in which the message has last been delivered (can be blank). |
| `edited` | `char` | | ☐ | Whether the message was edited after being sent or not. |
| `edited` | `char` | | ☐ | Whether the message was edited after being sent or not. |
| `fingerprint` | `int64` | | ☑ | Unique message fingerprint. |
| `fingerprint` | `int64` | | ☑ | Unique message fingerprint. |
| `from` | `varchar2` | | ☑ | Message sender; one of user and operator. |
| `from` | `varchar2` | | ☑ | Message sender; one of user and operator. |
| `origin` | `varchar2` | | ☐ | Message origin; chat, email or a URN of the channel used. |
| `origin` | `varchar2` | | ☐ | Message origin; chat, email or a URN of the channel used. |
| `original_id` | `varchar2` | | ☐ | Identifier of the original message as held by the channel it arrived on (if any). |
| `original_id` | `varchar2` | | ☐ | Identifier of the original message as held by the channel it arrived on (if any). |
| `properties` | `varchar2` | | ☐ | Arbitrary properties set on the message as JSON (if any). |
| `properties` | `varchar2` | | ☐ | Arbitrary properties set on the message as JSON (if any). |
| `read` | `varchar2` | | ☐ | Channel in which the message has been read (can be blank). |
| `read` | `varchar2` | | ☐ | Channel in which the message has been read (can be blank). |
| `session_id` | `varchar2` | | ☑ | Session identifier. |
| `session_id` | `varchar2` | | ☑ | Session identifier. |
| `stamped` | `char` | | ☐ | Whether the message was fully processed in the internal Crisp pipeline. |
| `stamped` | `char` | | ☐ | Whether the message was fully processed in the internal Crisp pipeline. |
| `timestamp` | `datetime` | | ☑ | Timestamp at which the message was sent. |
| `timestamp` | `datetime` | | ☑ | Timestamp at which the message was sent. |
| `translated` | `char` | | ☐ | Whether the message was automatically translated or not. |
| `translated` | `char` | | ☐ | Whether the message was automatically translated or not. |
| `type` | `varchar2` | | ☑ | Message type; one of text, note, file, animation, audio, picker, field, carousel and event. |
| `type` | `varchar2` | | ☑ | Message type; one of text, note, file, animation, audio, picker, field, carousel and event. |
| `user_avatar` | `varchar2` | | ☐ | Sending user avatar. |
| `user_avatar` | `varchar2` | | ☐ | Sending user avatar. |
| `user_nickname` | `varchar2` | | ☐ | Sending user nickname. |
| `user_nickname` | `varchar2` | | ☐ | Sending user nickname. |
| `user_type` | `varchar2` | | ☐ | Sending user type; one of website and participant. |
| `user_type` | `varchar2` | | ☐ | Sending user type; one of website and participant. |
| `user_user_id` | `varchar2` | | ☐ | Sending user identifier; an operator user identifier or a session identifier. |
| `user_user_id` | `varchar2` | | ☐ | Sending user identifier; an operator user identifier or a session identifier. |
| `website_id` | `varchar2` | | ☑ | Website identifier. |
| `website_id` | `varchar2` | | ☑ | Website identifier. |# ConversationMessagesByWebsiteIdAndSessionId: Crisp Conversation Messages
## Documentation
All messages of one chat or email conversation, oldest batch last. Crisp returns the most recent batch first and the driver walks back in time using the timestamp of the oldest message retrieved.
- Catalog: `Crisp`
- Schema: `Crisp`
- Primary Keys: `fingerprint`
- Label: Conversation Messages
This is a read-only table function. The Crisp API may not support changing the data or the Invantive UniversalSQL driver for Crisp does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Crisp API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `ConversationMessagesByWebsiteIdAndSessionId`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `session_id` | `varchar2` | ☑ | | The conversation session identifier. |
| `session_id` | `varchar2` | ☑ | | The conversation session identifier. |
| `website_id` | `varchar2` | ☐ | | The website identifier. Defaults to the website ID of the connection when left out. |
| `website_id` | `varchar2` | ☐ | | The website identifier. Defaults to the website ID of the connection when left out. |
## Columns of Table Function
The columns of the table function `ConversationMessagesByWebsiteIdAndSessionId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `automated` | `char` | | ☐ | Whether the message is automated or not (ie. comes from a bot). |
| `automated` | `char` | | ☐ | Whether the message is automated or not (ie. comes from a bot). |
| `content_duration` | `int32` | | ☐ | Object duration in seconds (only set for the type audio). |
| `content_duration` | `int32` | | ☐ | Object duration in seconds (only set for the type audio). |
| `content_explain` | `varchar2` | | ☐ | Object explanatory text (only set for the type field). |
| `content_explain` | `varchar2` | | ☐ | Object explanatory text (only set for the type field). |
| `content_id` | `varchar2` | | ☐ | Object identifier (only set for the types picker and field). |
| `content_id` | `varchar2` | | ☐ | Object identifier (only set for the types picker and field). |
| `content_name` | `varchar2` | | ☐ | Object name (only set for the type file). |
| `content_name` | `varchar2` | | ☐ | Object name (only set for the type file). |
| `content_namespace` | `varchar2` | | ☐ | Event namespace (only set for the type event). |
| `content_namespace` | `varchar2` | | ☐ | Event namespace (only set for the type event). |
| `content_required` | `char` | | ☐ | Whether the message must be filled before continuing (only set for the types picker and field). |
| `content_required` | `char` | | ☐ | Whether the message must be filled before continuing (only set for the types picker and field). |
| `content_text` | `varchar2` | | ☐ | Object text (only set for the types picker, field, carousel and event). |
| `content_text` | `varchar2` | | ☐ | Object text (only set for the types picker, field, carousel and event). |
| `content_type` | `varchar2` | | ☐ | Object MIME type (only set for the types file, animation and audio). |
| `content_type` | `varchar2` | | ☐ | Object MIME type (only set for the types file, animation and audio). |
| `content_url` | `varchar2` | | ☐ | Object URL (only set for the types file, animation and audio). |
| `content_url` | `varchar2` | | ☐ | Object URL (only set for the types file, animation and audio). |
| `content_value` | `varchar2` | | ☐ | Object value (only set for the type field). |
| `content_value` | `varchar2` | | ☐ | Object value (only set for the type field). |
| `content` | `varchar2` | | ☐ | Message content; the text itself for the types text and note, otherwise the content object as JSON. |
| `content` | `varchar2` | | ☐ | Message content; the text itself for the types text and note, otherwise the content object as JSON. |
| `delivered` | `varchar2` | | ☐ | Channel in which the message has last been delivered (can be blank). |
| `delivered` | `varchar2` | | ☐ | Channel in which the message has last been delivered (can be blank). |
| `edited` | `char` | | ☐ | Whether the message was edited after being sent or not. |
| `edited` | `char` | | ☐ | Whether the message was edited after being sent or not. |
| `fingerprint` | `int64` | | ☑ | Unique message fingerprint. |
| `fingerprint` | `int64` | | ☑ | Unique message fingerprint. |
| `from` | `varchar2` | | ☑ | Message sender; one of user and operator. |
| `from` | `varchar2` | | ☑ | Message sender; one of user and operator. |
| `origin` | `varchar2` | | ☐ | Message origin; chat, email or a URN of the channel used. |
| `origin` | `varchar2` | | ☐ | Message origin; chat, email or a URN of the channel used. |
| `original_id` | `varchar2` | | ☐ | Identifier of the original message as held by the channel it arrived on (if any). |
| `original_id` | `varchar2` | | ☐ | Identifier of the original message as held by the channel it arrived on (if any). |
| `properties` | `varchar2` | | ☐ | Arbitrary properties set on the message as JSON (if any). |
| `properties` | `varchar2` | | ☐ | Arbitrary properties set on the message as JSON (if any). |
| `read` | `varchar2` | | ☐ | Channel in which the message has been read (can be blank). |
| `read` | `varchar2` | | ☐ | Channel in which the message has been read (can be blank). |
| `session_id` | `varchar2` | | ☑ | Session identifier. |
| `session_id` | `varchar2` | | ☑ | Session identifier. |
| `stamped` | `char` | | ☐ | Whether the message was fully processed in the internal Crisp pipeline. |
| `stamped` | `char` | | ☐ | Whether the message was fully processed in the internal Crisp pipeline. |
| `timestamp` | `datetime` | | ☑ | Timestamp at which the message was sent. |
| `timestamp` | `datetime` | | ☑ | Timestamp at which the message was sent. |
| `translated` | `char` | | ☐ | Whether the message was automatically translated or not. |
| `translated` | `char` | | ☐ | Whether the message was automatically translated or not. |
| `type` | `varchar2` | | ☑ | Message type; one of text, note, file, animation, audio, picker, field, carousel and event. |
| `type` | `varchar2` | | ☑ | Message type; one of text, note, file, animation, audio, picker, field, carousel and event. |
| `user_avatar` | `varchar2` | | ☐ | Sending user avatar. |
| `user_avatar` | `varchar2` | | ☐ | Sending user avatar. |
| `user_nickname` | `varchar2` | | ☐ | Sending user nickname. |
| `user_nickname` | `varchar2` | | ☐ | Sending user nickname. |
| `user_type` | `varchar2` | | ☐ | Sending user type; one of website and participant. |
| `user_type` | `varchar2` | | ☐ | Sending user type; one of website and participant. |
| `user_user_id` | `varchar2` | | ☐ | Sending user identifier; an operator user identifier or a session identifier. |
| `user_user_id` | `varchar2` | | ☐ | Sending user identifier; an operator user identifier or a session identifier. |
| `website_id` | `varchar2` | | ☑ | Website identifier. |
| `website_id` | `varchar2` | | ☑ | Website identifier. |