Skip to main content

Available data types

The following diagram describes the relations between the available data types:

Notes

  • Mandatory fields are represented using a NOT NULL column constraint.
  • DateTime field type is a string representing a date and time in ISO timestamp format.
  • JSON field type represents JSON object literals containing key/value pairs.

Customer

Represents a customer of your application, which can be either an individual or an organization. Each customer can have a subscription to a product, a set of entitlements, and usage records. Table: CUSTOMERS

Customer Resource

Represents a resource associated with a customer, such as a site or an app. Each resource can have its own subscription to a product, as well as a distinct set of entitlements and usage records. Table: CUSTOMER_RESOURCES

Subscription

Represents the combination of functionalities to which a specific customer has access, including their limitations, the duration of access, and the associated cost. Subscriptions encompass both plans and add-ons. Table: SUBSCRIPTIONS

Subscription Price

Represents the price of the subscription. Multiple prices can be associated with a single subscription to support a pricing model based on multiple billable metrics Table: SUBSCRIPTION_PRICES

Subscription Add-on

Represents the quantity of an add-on that is included in the subscription. Table: SUBSCRIPTION_ADDONS

Subscription Applied Coupons

Represents a coupon entity attached to a subscription. Table: SUBSCRIPTION_APPLIED_COUPONS

Product

Represents a product or product line. Typically, products group together plans and add-ons. Table: PRODUCTS

Plan

Represents a package of a product for which customers are charged during a subscription period. The features included in each plan are defined by entitlements associated with the plan. Plans can inherit features from one another. Table: PLANS

Add-on

Represents a package that extends specific plans. Add-ons are dependent on the lifecycle of the plan they extend; meaning, when a subscription expires, customers also lose access to the plan’s add-ons. The features included in each add-on are defined by entitlements associated with the add-on. Table: ADDONS

Price

Represents the price of a package and its settings. Table: PRICES

Package Entitlement

Represents a feature entitlement associated with a plan or add-on. Table: PACKAGE_ENTITLEMENTS

Promotional Entitlement

Represents ad-hoc entitlements that are given to a specific customer. Promotional entitlements can be granted to customers for a limited time period or throughout their entire lifetime. Table: PROMOTIONAL_ENTITLEMENTS

Feature

Represents a configurable functionality in the product that can be monetized. Table: FEATURES

Entitlement

Represents the right to use an application feature, and to what extent. In Stigg, customer entitlements can be granted from multiple sources: plans, add-ons, overlapping trial subscriptions, promotional entitlements, and additional products. Entitlements are typically computed and cached. If one of the entitlement sources changes, the entitlements need to be refreshed. You can read about how entitlements are calculated here. Table: ENTITLEMENTS

Usage Measurement

Represents calculated usage reports associated with a customer for a metered feature. Table: USAGE_MEASUREMENTS

Usage Events

Represents the raw usage events associated with a customer.
To enable reporting of raw usage events, please contact Stigg support.
Table: USAGE_EVENT_<ENVIRONMENT_ID>
When enabled, the usage_events table will also include events of calculated usage reports that were made to Stigg. Such reports will appear as $usage.reported events.

Coupon

Represents a discount coupon that can be applied to a customer. Table: COUPONS

Credits

Credit Usage

Represents raw credit usage activity for a customer/resource. Table: CREDITS_USAGE_<ENVIRONMENT_ID>
This export originates from ClickHouse and must be enabled by Stigg support before it is available in your BigQuery dataset.
The CREDITS_USAGE table does not include event dimensions. To enrich credit usage records with dimensions, join with the USAGE_EVENT table:

Custom Currency

Represents a custom credit currency configured for an account (e.g., “Build Credits”, “AI Tokens”). Table: CUSTOM_CURRENCIES

Credit Grant

Represents a grant (allocation) of credits to a customer and/or resource, including lifecycle, amount, and consumption. Table: CREDIT_GRANTS

Integrations

Integration

Represents a native integration of a third-party application (i.e. Stripe, Salesforce, etc.) with Stigg. Table: INTEGRATION

Customer Integration

A linking table between the Customer table and the Integration table. Table: CUSTOMER_INTEGRATION

Subscription Integration

A linking table between the Subscription table and the Integration table. Table: SUBSCRIPTION_INTEGRATION

Plan Integration

A linking table between the Plan table and the Integration table. Table: PLAN_INTEGRATION

Add-on Integration

A linking table between the Add-on table and the Integration table. Table: ADDON_INTEGRATION

Coupon Integration

A linking table between the Coupon table and the Integration table. Table: COUPON_INTEGRATION