Revenue
Modeling your company's revenue
Intro
Revenue tables are used for tracking your company's revenue and customer segmentation dimensions and metadata.
Roadway uses two tables to connect attribution to and drive analysis of company revenue:
dim__customers
- a dimensional table containing customer metadata and segmentation informationfact__customer_arr_snapshot
- an as-of , snapshot style table that tracks customer revenue on a daily basis
Schema
dim__customers
The table you expose to Roadway should adhere to the following schema:
customer_id
varchar
Unique identifier for customers; a Stripe customer_id (`cus_*`)
user_id
varchar
Unique identifier for users, used across your applications and product, pertaining to the oldest or "owning" user for the customer. This user is used to drive attribution for the associated customer.
first_payment_date
date
UTC date of when the customer was first paid
<custom_customer_dimension_1>
Any custom customer-segmentation dimension, such as `first_plan_type`, `highest_plan_type`, `country`, etc.
...
...
...
Additional Constraints
The dim__customers
table must adhere to the following constraints:
customer_id
is the primary key
fact__customer_arr_snapshot
As noted above, this table is a "movements" or "snapshot" style table which can be used to assess the ARR (Annual Recurring Revenue) associated with a given customer and subscription on a given date, for all history.
This table should adhere to the following schema:
Column Name
Type
Description
customer_id
varchar
Unique identifier for customers; a Stripe customer_id (`cus_*`)
subscription_id
varchar
Unique identifier for a subscription; a Stripe subscription_id
date_day
date
An "as_of-style" date
implied_arr
float
The annualized recurring revenue value as implied by active subscriptions as of date_day for customer_id.
paid_arr
float
The actual amount paid on date_day by customer_id.
new_arr
float
The increase in ARR attributed to the first day a customer is active, or 0, otherwise.
churn_arr
float
The decrease in ARR attributed to a customer who becomes inactive, or 0, otherwise. By convention, this is a negative number.
expansion_arr
float
The increase in ARR attributed to a customer paying more than they previously were, or 0, otherwise.
contraction_arr
float
The decrease in ARR attributed to a customer paying less than they previously were, or 0, otherwise. By convention, this is a negative number.
reactivation_arr
float
The increase in ARR attributed to a previously inactive customer becoming active once again, or 0, otherwise.
num_seats
integer
The number of seats associated with the subscription
plan_type
varchar
The plan or product name associated with the subscription
Additional Constraints
The primary key of this table is `(customer_id, subscription_id, date_day)`.
It is expected that, for a given customer, every date shall be present from the customer's first payment date to `min(churn_date, today)`.
Last updated