# CustomerMembershipSalesByCustomerId: Tixly Customer Membership Sales by Customer ID Fetches the memberships a specific customer has bought. ## Documentation Fetches the memberships a specific customer has bought. - Catalog: `Tixly` - Schema: `Customer` - Label: Customer Membership Sales by Customer ID This is a read-only table function. The Tixly API may not support changing the data or the Invantive UniversalSQL driver for Tixly does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Tixly API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `CustomerMembershipSalesByCustomerId`. 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 | |---|:---:|:---:|:---:|---| | `id` | `` | ☑ | | Id of the customer | ## Columns of Table Function The columns of the table function `CustomerMembershipSalesByCustomerId` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `Abbreviation` | `varchar2` | Abbreviation | ☐ | The abbreviation of the memberhip/donation | | `CreatedUTCUnix` | `int64` | | ☐ | The date and time in Unix time (also known as POSIX time or Epoch time) when the membership/donation was sold | | `Created` | `datetime` | Created | ☐ | The date and time when the membership/donation was sold | | `CustomerId` | `int32` | Customer ID | ☐ | The id of the customer | | `Description` | `varchar2` | Description | ☐ | Always an empty string, will be removed from future relesase | | `ExpiresUTCUnix` | `int64` | | ☐ | The date and time in Unix time (also known as POSIX time or Epoch time) when the membership/donation expires | | `Expires` | `datetime` | Expires | ☐ | The date and time when the membership/donation expires | | `Id` | `int32` | ID | ☐ | A unique id for each transaction row of membership/donation sales Will be removed from future releases as SaleMembershipId is the same, please use that | | `IsAnonymousSale` | `char` | Is Anonymous Sale | ☐ | Is the sale made without a customer | | `IsCancelled_2` | `char` | | ☐ | Is the membership cancelled (deleted) or not Was originally created with lower caps first letter | | `MembershipCount` | `int32` | | ☐ | Total memberships/donations sold, can either be 1 or -1 | | `MembershipID` | `int32` | Membership ID | ☐ | Will be removed from future releases, Id should not both be upper case kept it for backward compatibility and use MembershipId | | `MembershipId_2` | `int32` | | ☐ | The id of the membership/donation sold | | `MembershipOrganisationId` | `int32` | | ☐ | The organisation that owns the membership/donation | | `Name` | `varchar2` | Name | ☐ | The name of the memberhip/donation | | `Online` | `char` | Online | ☐ | Was the membership/donation sold online | | `OrderId` | `int32` | Order ID | ☐ | The id of the Order | | `OrderMembershipId` | `int32` | | ☐ | A unique id for each order line for a specific membership | | `OrderUrl` | `varchar2` | | ☐ | The encrypted order id to be used in url's to create a purchase link for reservations or a receipt link for sales | | `OrganisationID` | `int32` | Organisation ID | ☐ | Will be removed from future releases, Id should not both be upper case kept it for backward compatibility - use SaleOrganisationId instead | | `Price` | `double` | Price | ☐ | The price of the membership/donation | | `RenewDayOfMonth` | `int32` | Renew Day of Month | ☐ | What day of the month does it renew | | `RenewMonthOfYear` | `int32` | Renew Month of Year | ☐ | What month of the year does it renew | | `RenewalType` | `varchar2` | Renewal Type | ☐ | What is the type of renewal | | `SaleMembershipId` | `int32` | | ☐ | A unique id for each transaction row of membership/donation sales | | `SaleOrganisationId` | `int32` | | ☐ | The organisation that sold the membership/donation | | `SaleUserId` | `int32` | | ☐ | The user id of the user that sold | | `SaleUserName` | `varchar2` | | ☐ | The full name of the user that sold | | `ShortDescription` | `varchar2` | Short Description | ☐ | Always an empty string, will be removed from future relesase | | `SkinID` | `int32` | Skin ID | ☐ | Will be removed from future releases, Id should not both be upper case kept it for backward compatibility and use SkinId instead | | `SkinId_2` | `int32` | | ☐ | The id of the skin sold it was sold in | | `Tagline` | `varchar2` | Tagline | ☐ | Always an empty string, will be removed from future relesase | | `Vat` | `double` | VAT | ☐ | The vat amount of the membership/donation | | `isCancelled` | `char` | Is Cancelled | ☐ | For backwards compatibility, will be removed from future releases and use IsCancelled instead |