fct_pos_saleposition


Description

Point-of-sale line items sales. Each row represents one sale position (line item) within a sale transaction (pos_sale_id).

Columns

Column Type Size Nulls Auto Default Children Parents Comments
pos_saleposition_id int8 19 null
bridge_pos_saleposition_to_payment.pos_saleposition_id bridge_pos_saleposition_to_payment_pos_saleposition_id_fkey R
fct_revenue_invoice_based.pos_saleposition_id Implied Constraint R

The primary key of this table. Identifies a single line item within a sale.

internal_payment_id int8 19 null

DEPRECATED. Use bridge_pos_saleposition_to_payment instead, which preserves every active payment split for a sale position. This column collapses that to a single, most-recently created active link and loses granularity when a sale position is settled by more than one payment.

pos_id int8 19 null

The parent sale transaction this line item belongs to.

organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id fct_pos_saleposition_organization_unit_id_fkey R

The location where this sale occurred.

cash_register_id int8 19 null
dim_cash_register.cash_register_id erp_v2_fct_pos_saleposition_cash_register_id__erp_v2_dim_cash_register_cash_register_id_fkey_9dc8c20076bd R

The cash register used for this sale, if applicable.

sale_type varchar 256 null

The channel through which the sale was initiated.

Values

  • CASH_REGISTER — Standard POS transaction at a physical register
  • DEVICE — Sale from a connected vending/device
  • MYSPORTS_SALE — Sale via MySports
  • ONLINE_SALE — Sale from the online shop / customer portal
  • APPLICATION — Sale from a third-party application
sale_position_type varchar 256 null

The type of product or item sold in this line item.

Values

  • STOCK_PRODUCT — Physical product from inventory
  • ONLINE_OFFER — Online offer purchase
  • VOUCHER — Voucher sale
  • CONTRACT_VOUCHER — Contract-linked voucher
  • CONSUMPTION_CREDIT — Consumption credit purchase
  • CONSUMPTION_CREDIT_RECHARGE — Consumption credit recharge
  • DYNAMIC — Ad-hoc product created during the sale
  • BOTTLE_DEPOSIT — Bottle deposit charge
  • RETURNED_BOTTLE_DEPOSIT — Returned bottle deposit refund
sales_time timestamptz 35 null

Timestamp when this sale position was created.

product_id varchar 256 null
dim_product.product_id Implied Constraint R

Key identifying the product. Linkable to dim_product.

price numeric 19,2 null

Unit price of the item before discounts.

currency_code varchar 256 null

ISO currency code for monetary amounts.

tax_percent numeric 19,2 null

Applicable tax rate as a percentage.

discount_amount numeric 19,2 null

Absolute discount amount applied to this line item.

discount_percentage numeric 19,2 null

Percentage discount applied to this line item.

amount numeric 19,2 null

Final monetary amount for this line item after discounts.

term_of_validity int4 10 null

Validity duration value for voucher-type positions.

term_of_validity_unit varchar 256 null

Unit for the validity duration (e.g. DAY, MONTH, YEAR). Only populated for voucher positions.

related_pos_saleposition_id int8 19 null

Reference to a related sale position, used for bottle deposit linkage.

voucher_credit_amount numeric 19,2 null

Amount paid via voucher credit for this line item.

consumption_credit_amount numeric 19,2 null

Amount paid via consumption credit for this line item.

bonus_amount numeric 19,2 null

Bonus amount applied to consumption credit positions.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

data_landing_time timestamptz 35 getdate()

System column. UTC timestamp assigned when a table batch is applied on Redshift. It represents warehouse landing order at table-batch granularity, not source event order. Usable to filter for incremental extractions.

Relationships