🧭✨ Future Subscription Purchases (NEW)
✨ NEW TABLE - December 2025
🛠️ Partner API Alignment Migration
🧭 This table represents the post-migration state for
subscription_purchases.1️⃣ Migrate to this table by April 2026
2️⃣ Between April 2026 and July 2026, remove FUTURE__ prefix
Contains subscription purchase records with financial details and operator-based filtering logic. Tracks purchase transactions including discounts, amounts, and unit quantities for subscriptions. Includes operator matching flags to support different filtering criteria based on subscription and customer operator relationships.
SQL: FUTURE__subscription_purchases
Schema
| Column Name | Data Type | Description |
|---|---|---|
| Primary ID | ||
| id | INTEGER | Primary key |
| Other IDs | ||
| subscription_id | INTEGER | References the subscription associated with this purchase |
| currency_id | INTEGER | References the currency used for this purchase transaction |
| Timestamps | ||
| created_at | TIMESTAMP_NTZ | Timestamp when the purchase record was created |
| updated_at | TIMESTAMP_NTZ | Timestamp when the purchase record was last modified |
| deleted_at | TIMESTAMP_NTZ | Timestamp when the purchase record was soft deleted |
| subscription_deleted_at | TIMESTAMP_NTZ | Timestamp when the associated subscription was soft deleted |
| subscription_operator_deleted_at | TIMESTAMP_NTZ | Timestamp when the subscription's operator was soft deleted |
| Filters | ||
| is_direct_operator_match | BOOLEAN | True when the subscription's operator_id directly matches the filtered operator |
| is_customer_operator_match | BOOLEAN | True when the subscription's customer_operator_id matches the filtered operator |
| Attributes | ||
| type | VARCHAR | Classification or category of the subscription purchase |
| discount_percentage | NUMBER | Percentage-based discount applied to the purchase |
| discount_absolute | NUMBER | Fixed amount discount applied to the purchase |
| original_amount | NUMBER | Base purchase amount before any discounts are applied |
| discount_amount | NUMBER | Total monetary value of discounts applied to the purchase |
| total_amount | NUMBER | Final purchase amount after all discounts have been applied |
| min_units | NUMBER | Minimum number of units required for this purchase |
| total_units | NUMBER | Total number of units included in the purchase |
| actual_units | NUMBER | Actual number of units delivered or consumed |
| note | VARCHAR | Additional comments or details about the purchase |
| operator_is_main_operator_match | BOOLEAN | Indicates whether the operator matches the main operator criteria |
| operator_is_parent_operator_match | BOOLEAN | Indicates whether the operator matches the parent operator criteria |
Changes from Last Version
This table was entirely rearchitected to match the Partner API. We now include not only purchases on the operator's subscriptions but also by the operator's customers. Multiple columns were added.
Added columns (7)
Timestamps:
- deleted_at (purchase deletion status)
- subscription_deleted_at (subscription deletion status)
- subscription_operator_deleted_at (operator deletion status)
Attributes:
- min_units
- note
Filter Flags (Computed):
- operator_is_main_operator_match (boolean)
- operator_is_parent_operator_match (boolean)
- is_direct_operator_match (boolean - subscription's operator_id matches)
- is_customer_operator_match (boolean - subscription's customer operator matches)
Removed columns (0)
Renamed Columns (1)
- purchase_id → id
Data inclusion criteria
This table uses the includes rows where the operator ID matches either the subscription's operator or subscription customer's operator
This means this table may include purchases on subscriptions not included in the FUTURE__subscriptions table because they are not the operator's subscriptions.
Data flow
| Upstream tables | Downstream tables |
|---|---|
FUTURE_operators | --- |
Alignment
Partner API
- Aligns with Partner API get/subscription-purchases endpoint
subscription_purchases table
subscription_purchases tableBecause the scope of the table has expanded, one must exclude rows previously not included via a complex where clause:
where deleted_at is null
and subscription_deleted_at is null
and subscription_operator_deleted_at is null
and is_direct_operator_matchUpdated about 22 hours ago
