# ConversationsByWebsiteId ## Documentation Lists conversations for website. - Catalog: `Crisp` - Schema: `Crisp` - Primary Keys: `session_id` 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 `ConversationsByWebsiteId`. 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 | |---|:---:|:---:|:---:|---| | `website_id` | `varchar2` | ☑ | | The website identifier. | ## Columns of Table Function The columns of the table function `ConversationsByWebsiteId` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `active_last` | `datetime` | | ☐ | Timestamp at which the user was last active. | | `active_now` | `char` | | ☑ | Whether user is considered active right now or not. | | `assigned_user_id` | `varchar2` | | ☐ | Operator user identifier. | | `availability` | `varchar2` | | ☑ | Visitor availability. | | `compose_operator_automated` | `char` | | ☐ | Whether compose is automated or not (ie. comes from a bot). | | `compose_operator_excerpt` | `varchar2` | | ☐ | Message excerpt for compose state. | | `compose_operator_timestamp` | `varchar2` | | ☐ | Timestamp for compose state. | | `compose_operator_type` | `varchar2` | | ☐ | Compose state type. | | `compose_operator_user_avatar` | `varchar2` | | ☐ | Compose user avatar. | | `compose_operator_user_nickname` | `varchar2` | | ☐ | Compose user nickname. | | `compose_operator_user_user_id` | `varchar2` | | ☐ | Compose user identifier. | | `compose_visitor_automated` | `char` | | ☐ | Whether compose is automated or not (ie. comes from a bot). | | `compose_visitor_excerpt` | `varchar2` | | ☐ | Message excerpt for compose state. | | `compose_visitor_timestamp` | `datetime` | | ☐ | Timestamp for compose state. | | `compose_visitor_type` | `varchar2` | | ☐ | Compose state type. | | `created_at` | `datetime` | | ☑ | Conversation creation timestamp. | | `inbox_id` | `varchar2` | | ☐ | Inbox identifier. | | `is_blocked` | `char` | | ☑ | Whether session is blocked or not (block messages from visitor). | | `is_verified` | `char` | | ☐ | Whether session is verified or not (user email ownership is authenticated). | | `last_message` | `varchar2` | | ☐ | Last message excerpt (from visitor). | | `meta_address` | `varchar2` | | ☐ | Visitor address. | | `meta_avatar` | `varchar2` | | ☐ | Visitor avatar. | | `meta_data` | `varchar2` | | ☐ | Visitor data. | | `meta_device_geolocation_city` | `varchar2` | | ☐ | City name. | | `meta_device_geolocation_coordinates_latitude` | `varchar2` | | ☐ | Latitude coordinate. | | `meta_device_geolocation_coordinates_longitude` | `varchar2` | | ☐ | Longitude coordinate. | | `meta_device_geolocation_country` | `varchar2` | | ☐ | Country code. | | `meta_device_geolocation_region` | `varchar2` | | ☐ | Region code. | | `meta_device_system_browser_major` | `varchar2` | | ☐ | Browser major version (eg: version 8.1 has a major of 8). | | `meta_device_system_browser_name` | `varchar2` | | ☐ | Browser name. | | `meta_device_system_browser_version` | `varchar2` | | ☐ | Browser version. | | `meta_device_system_engine_name` | `varchar2` | | ☐ | Engine name. | | `meta_device_system_engine_version` | `varchar2` | | ☐ | Engine version. | | `meta_device_system_os_name` | `varchar2` | | ☐ | OS name. | | `meta_device_system_os_version` | `varchar2` | | ☐ | OS version. | | `meta_device_system_useragent` | `varchar2` | | ☐ | Visitor user agent. | | `meta_device_timezone` | `varchar2` | | ☐ | Visitor device timezone offset (UTC). | | `meta_email` | `varchar2` | | ☐ | Visitor email. | | `meta_ip` | `varchar2` | | ☐ | Visitor IP address. | | `meta_nickname` | `varchar2` | | ☐ | Visitor nickname. | | `meta_phone` | `varchar2` | | ☐ | Visitor phone. | | `meta_subject` | `varchar2` | | ☐ | Subject for conversation (if any). | | `people_id` | `varchar2` | | ☐ | People identifier. | | `preview_message_excerpt` | `varchar2` | | ☐ | Preview message excerpt. | | `preview_message_fingerprint` | `varchar2` | | ☐ | Preview message fingerprint. | | `preview_message_from` | `varchar2` | | ☐ | Preview message sender. | | `preview_message_type` | `varchar2` | | ☐ | Preview message type. | | `session_id` | `varchar2` | | ☑ | Session identifier. | | `state` | `varchar2` | | ☑ | Conversation state. | | `status` | `varchar2` | | ☑ | Conversation status (an alias of state; useful for sorting conversations). | | `topic` | `varchar2` | | ☐ | Topic for conversation (based on messages). | | `unread_operator` | `int32` | | ☑ | Unread messages counter for operator. | | `unread_visitor` | `int32` | | ☑ | Unread messages counter for visitor. | | `updated_at` | `datetime` | | ☑ | Conversation update timestamp. | | `waiting_since` | `datetime` | | ☐ | Conversation waiting since timestamp (if any). | | `website_id` | `varchar2` | | ☑ | Website identifier. |