# CommunicationPreferenceStatusesBySubscriberId Get subscription preferences for a specific contact Retrieve a contact's current email subscription preferences. - Catalog: `Subscriptions` - Schema: `Status` This is a read-only table function. The HubSpot API may not support changing the data or the Invantive UniversalSQL driver for HubSpot does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the HubSpot API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `CommunicationPreferenceStatusesBySubscriberId`. 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 | |---|:---:|:---:|:---:|---| | `businessUnitId` | `` | ☐ | | An optional integer representing the ID of the business unit to filter the subscription status. | | `channel` | `` | ☑ | | The communication channel for which the subscription status is being retrieved. This parameter is required and currently supports 'EMAIL' as a valid value. (Values: EMAIL) | | `subscriberIdString` | `` | ☑ | | The unique identifier of the subscriber whose communication preferences status is being retrieved. | ## Columns of Table Function The columns of the table function `CommunicationPreferenceStatusesBySubscriberId` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `businessUnitId` | `int64` | | ☐ | The ID of the business unit associated with the subscription. | | `channel` | `varchar2` | | ☐ | The type of communication channel, with 'EMAIL' as the only supported option. | | `legalBasis` | `varchar2` | Legal Basis | ☐ | The legal basis for communication, with options including 'LEGITIMATE_INTEREST_PQL', 'LEGITIMATE_INTEREST_CLIENT', 'PERFORMANCE_OF_CONTRACT', 'CONSENT_WITH_NOTICE', 'NON_GDPR', 'PROCESS_AND_STORE', and 'LEGITIMATE_INTEREST_OTHER'. | | `legalBasisExplanation` | `varchar2` | Legal Basis Explanation | ☐ | An explanation for the legal basis used for communication. | | `setStatusSuccessReason` | `varchar2` | | ☐ | The reason for the successful change in subscription status, such as 'RESUBSCRIBE_OCCURRED' or 'NO_STATUS_CHANGE'. | | `source` | `varchar2` | Source | ☐ | The origin or method through which the subscription status was set. | | `status` | `varchar2` | Status | ☐ | The current subscription status of the contact, which can be 'SUBSCRIBED', 'UNSUBSCRIBED', or 'NOT_SPECIFIED'. | | `subscriberIdString` | `varchar2` | | ☐ | The contact's email address. | | `subscriptionId` | `int64` | | ☐ | The unique identifier of the subscription. | | `subscriptionName` | `varchar2` | | ☐ | The name of the subscription. | | `timestamp` | `datetime` | Timestamp | ☐ | The date and time when the subscription status was last updated. |