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_start
subscription_upgraded
subscription_downgraded
subscription_billing
subscription_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 happened
subscription_started_at: When the most recent subscription started
subscription_updated_at: When the most recent subscription event happened
subscription_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 canceled
subscription_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 to subscription_started_at event attribute or the time when we received this event
subscription_created_at: Will be set to the current date if it's a new subscription
subscription_status: Set to active
subscription_canceled_at: This attribute will be reset
subscription_upgrade
Sample event:
User attributes inferred:
subscription_started_at: Will be set to subscription_started_at event attribute or the time when we received this event, if it was not previously set
subscription_created_at: Will be set to the current date if it's a new subscription
subscription_updated_at: The time when we received the event
subscription_status: Set to active
subscription_canceled_at: This attribute will be reset
subscription_billing
Sample event:
User Attributes inferred:
lifetime_orders: Lifetime orders get incremented
revenue: Increments the lifetime revenue on the user
subscription_status: Set to active
subscription_cancel
Sample event:
User attributes inferred:
subscription_status: Set to canceled
subscription_canceled_at: Will be set to subscription_started_at event attribute or the time when we received this event, if it was not previously set
subscription_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
