If you’re managing subscriptions using Stripe and HubSpot, you need to be able to establish a clear view of which subscriptions are delivering revenue to you month after month. This may sound simple enough, but it can be challenging without the right tools, especially if your customers can pause their subscriptions at certain intervals throughout the year.
Zaybra enables you to integrate and share data seamlessly between HubSpot and Stripe, so you can get a much better picture of your subscription revenue. Calculating the total billable months for subscriptions while taking pauses into account is relatively easy with Zaybra.
All you must do is create a workflow. Here’s how it works.
Pause Length and Subscription Lifespan
Before you start, there are two properties associated with each Subscription that you should be aware of while doing this. Each will be within the “Zaybra Subscription Changes” section.
- Pause Length
- Subscription Lifespan
The Pause Length is the total amount of time a subscription has been paused during its lifespan. The Subscription Lifespan is the total amount of time the subscription has been active, not counting paused periods.
HubSpot may populate the subscription lifespan field with rounded data. For example, if the subscription lifespan was 14 months, it may say “a year” in this field.
However, underneath the Subscription Lifespan field is the Total Billable Months field, which you’ll soon populate.
Creating a Total Billable Months Workflow
The workflow is designed to calculate the total billable months for a subscription, allowing you to differentiate that value from the subscription lifespan. This is important because a customer may pause and restart a subscription within a given year, but the subscription lifespan won’t register those months the subscription was inactive.
Your workflow starts with a Zaybra subscription enrollment trigger, which is activated when a subscription is paused. This is followed by an if/then branch, which checks if the pause length is known.
You’ll create two branches: “If Paused” and “If No Pause.” Each branch will lead to a “Format data” action.
If there is no pause, use the format data action to take the “Subscription Lifespan” value and convert it from milliseconds to months. You can do this by dividing the millisecond value by 2,629,746,000. You’ll then round that number to the nearest whole number.
You’ll need to insert some custom code to accomplish this. Here is the custom code we used:
(round(divide([Subscription Lifespan], 2629746000, 0, “common”)
If there is a paused state in the subscription, include two format data actions in your workflow to calculate the Pause Length first, then the Subscription Lifespan second.
Both actions will use the same formula to convert milliseconds to months. However, your second format data action will subtract the calculated Pause Length from the calculated Subscription Lifespan in the same branch.
This will give you the total billable months of the subscription while also taking pause length into account.
You can then copy that property value to the associated Subscription and Deal to get a clear reading of the total billable months for the subscription. Simply create actions to copy the values from the respective numbered boxes in the workflows to their appropriate properties.
For example, if there was a pause in the subscription, you’ll want to copy the Total Billable Month value to the Zaybra subscription property “Total Billable Months.” You can do the same for the Deal in HubSpot.
That’s it! For more info on how to manage subscriptions with Zaybra, contact us.