Create plan groups to filter your data by plans that are all related in some way, such as all monthly plans. Select the plans to include in your group manually, or create a smart plan group that is always up-to-date using criteria you define. Plans can also be grouped using our API.
Here's what we cover in this article:
Before you begin
- Learn how to work with filters in ChartMogul.
- Learn more about segmentation.
Creating a manual plan group
Manual plan groups are collections of plans you select manually. Unlike smart plan groups, they don’t update automatically based on set criteria.
To create a plan group manually:
- Go to any chart, customer list or dashboard and click Add Filter.
- Select Plan as a filter.
- Click ADD Plan Group.
- Make sure Manual Selection is selected.
- Define a Name for the new plan group, then select the plans you want to include. Use the search box to search for plans. The search is case-insensitive. Select Use regex to use regular expressions.
- Click Save.
ChartMogul adds your new plan group to the Plans drop-down.
Creating a smart plan group
Smart plan groups update automatically based on set criteria. When a new plan meets the criteria, it is automatically included in the corresponding groups. ChartMogul has three default smart plan groups: monthly, quarterly and annual.
To create your own smart plan group:
- Go to any chart, customer list or dashboard and click Add Filter.
- Select Plan as a filter.
- Click ADD Plan Group.
- Select SMART Selection.
- Under Plan Name or ID contains the following text, enter text that must be present in the plan name or ID. The search is case-insensitive. Select Use regex to use regular expressions.
- Under Plan Billing Interval is, select one of the following:
- Any
- Daily
- Weekly
- Monthly
- Quarterly
- Annually
- The dialog will show a list of plans matching your criteria. Click Save.
ChartMogul displays your smart plan group in the drop-down when it includes plans which meet the criteria. For instance, if you have no quarterly plans, then the group All quarterly plans is not displayed. Smart plan groups are not included in API responses. Default smart plan groups cannot be edited or deleted.
The service period of a plan is determined by interval units and interval counts. Therefore, there are multiple ways of representing plans of different lengths. For instance, a yearly plan could be represented as having a monthly interval that repeats 12 times, a yearly interval that repeats once, and so on.
The combination of interval units and interval numbers for each default smart plan group is broken down below.
- All monthly plans: month × 1; week × 4 – 5, day × 28 – 35
- All quarterly plans: quarter × 1; month × 3; week × 12 – 14; day × 84 – 98
- All annual plans: year × 1; quarter × 4; month × 12; week × 52 – 53; day × 364 – 371
Regular expressions
Regular expressions (regex) are patterns used to match text based on specific sequences of characters or rules. They make your searches more flexible.
Let’s say you want to create a manual plan group of Platinum and Gold plans. Without regular expressions, you must first look for plans containing the word “Platinum” and then repeat this process for the word “Gold.”
With Use regex selected, simply type “(Platinum|Gold)”, and ChartMogul will return all plans whose name or ID contain either “Platinum” or “Gold.”
It’s not possible to create a similar smart plan group without regex. You can only create two separate groups: one for “Platinum” plans and one for “Gold” plans. Selecting Use regex allows you to match plans that have either of these words.
Regex searches are case-sensitive.
Here are example regular expressions to use when creating manual and smart plan groups:
Regex |
Meaning |
Example matches |
---|---|---|
(Platinum|Gold) |
Contains “Platinum” or “Gold” |
|
(Platinum|Gold|Silver) |
Contains at least one of “Platinum”, “Gold” or “Silver” |
|
(Volume|volume|VOLUME) |
Contains one of the capitalization variants of “volume” |
|
(?=.*Silver)(?=.*Enterprise) |
Contains “Silver” and “Enterprise” |
|
(?=.*Silver)(?=.*Enterprise)(?=.*Max) |
Contains all of “Silver”, “Enterprise” and “Max”. |
|
^Enterprise |
Starts with “Enterprise” |
|
Pro$ |
Ends with “Pro” |
|
Enterprise.*Pro |
Contains a phrase of any length starting with “Enterprise” and ending wth “Pro” |
|
\d |
Contains a digit |
|
\d{3} |
Contains a sequence of at least three digits |
|
[5-9] |
Contains a digit from 5 to 9 |
|
Learn more about regular expressions or test them in action.
Removing a plan group
To delete a plan group, click the Settings icon next to a plan group name.
Then click Delete Group and confirm by clicking OK.
Editing a plan group
To edit a plan group, click the Settings icon next to a plan group name. Change the name or type of selection (manual or smart). For a manual plan group, adjust the selected plans. For a smart plan group, update the criteria. Click Save to apply your changes.
Comparing plan group segments
You can compare plan groups using Segmentation. To compare two plan groups, navigate to a chart and click New Segment.
This will add a new segment to the chart. Next, select a plan group for each segment by clicking Add Filter > Plan > is one of and selecting one of the plan groups that will be listed at the top.
Once you have created and selected two plan groups, you can compare them in the chart. In the example below, we can see that the MRR from annual plans is larger than MRR from monthly plans.