# LoyaltyPrograms Get loyalty program list Returns list of loyalty programs - Catalog: `Brevo` - Schema: `Program` - Primary Keys: `id` Can retrieve data and change data using insert, update and delete. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `LoyaltyPrograms`. 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 | |---|:---:|:---:|:---:|---| | `sort_field` | `` | ☐ | | Sort documents by field (Values: name, created_at, updated_at) | ## Columns of Table Function The columns of the table function `LoyaltyPrograms` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `birthdayAttribute` | `varchar2` | | ☐ | Contact attribute name used for birthday tracking. | | `codeCount` | `int64` | | ☐ | Number of available subscription codes. | | `createdAt` | `datetime` | Creation Date | ☐ | Timestamp when the loyalty program was created. | | `description` | `varchar2` | Description | ☐ | Loyalty Program description. | | `documentId` | `guid` | | ☐ | Associated document identifier. | | `id` | `guid` | ID | ☐ | Loyalty Program unique identifier. | | `meta` | `varchar2` | | ☐ | Loyalty Program metadata. | | `name` | `varchar2` | Name | ☐ | Loyalty Program name. | | `pattern` | `varchar2` | | ☐ | Subscription code pattern. | | `state` | `varchar2` | | ☐ | Current state of the loyalty program. | | `subscriptionGeneratorId` | `guid` | | ☐ | Loyalty Program subscription generator ID. | | `subscriptionPoolId` | `guid` | | ☐ | Loyalty Program subscription pool ID. | | `updatedAt` | `datetime` | | ☐ | Timestamp when the loyalty program was last modified. |