Blueshift helps you track the subscription data of your customers.
You can use the Create or Update customer API to update the subscription user attributes.
You can send the subscription information using events.
Subscription events
Blueshift supports the following standard events to manage the subscription status for a customer:
subscription_startsubscription_upgradedsubscription_downgradedsubscription_billingsubscription_cancel
Subscription user attributes
Blueshift infers standard attributes based on the subscription events, which are available as user attributes for segmentation.
subscription_created_at: When the first subscription happenedsubscription_started_at: When the most recent subscription startedsubscription_updated_at: When the most recent subscription event happenedsubscription_period_type: The Period type for the subscription Ex: monthly/annually. This attribute is optional, but if you want to set this attribute you can pass it in the subscription event or update the user attribute.subscription_plan_type: The Plan type for the subscription Ex: free, starter, premium, gold etc. This attribute is optional, but if you want to set this attribute you can pass it in the subscription event or update the user attribute.subscription_canceled_at: When the subscription got canceledsubscription_status: active/canceled/paused. The most recent subscription event determines the status of the subscription.
Examples
subscription_start
Sample Event:
User Attributes inferred:
subscription_started_at: Will be set tosubscription_started_atevent attribute or the time when we received this eventsubscription_created_at: Will be set to the current date if it's a new subscriptionsubscription_status: Set to activesubscription_canceled_at: This attribute will be reset
subscription_upgrade
Sample event:
User attributes inferred:
subscription_started_at: Will be set tosubscription_started_atevent attribute or the time when we received this event, if it was not previously setsubscription_created_at: Will be set to the current date if it's a new subscriptionsubscription_updated_at: The time when we received the eventsubscription_status: Set to activesubscription_canceled_at: This attribute will be reset
subscription_billing
Sample event:
User Attributes inferred:
lifetime_orders: Lifetime orders get incrementedrevenue: Increments the lifetime revenue on the user
subscription_status: Set to active
subscription_cancel
Sample event:
User attributes inferred:
subscription_status: Set to canceledsubscription_canceled_at: Will be set tosubscription_started_atevent attribute or the time when we received this event, if it was not previously setsubscription_started_at: Will be reset
Segment users based on subscription status
You can use the subscription user attributes to segment users based on their subscription status.
Example: New users who are on free trial
Example: Paid users who churned recently
