Make your data speak human with Metadata

By
| Last Updated: December 30, 2016 |

Reading time: 2 minutes

At Chargebee, we constantly look out for ways to make the handling subscriptions & billing, efficient.

Beyond the skeletal data, there’s sometimes a need to store additional information about a particular resource.

Often, we see that most of our customers resort to storing such additional key subscription information in their databases.

But following this route might become a challenge in some cases, like these:

  • Your SaaS application should know which features to offer, based on the plan the customer is on. Over time, when you run multiple pricing experiments and decide to honor prices for the existing customers (grandfathering), the process becomes extremely complex and downright messy.

  • Your sales team must know if a customer has used a coupon before, or simply has used a trial earlier.

  • When your marketing team needs data on whether a customer opted in for marketing promotions, if they’re part of a marketing campaign, etc. There should be a simpler way to access it from within the same app rather than flitting between the CRM and spreadsheets!

A typical solution would be to model this information along with your core application or write a middleware, which breaks the whole experience of how you manage subscriptions efficiently.

With Chargebee, however, you have a much easier way to manage this information.

Introducing our new metadata support, where you can store all the essential information right within Chargebee. You can directly push in key value pairs, adding more context to Subscriptions, Customers, Plans, and more, to suit your business needs.

The information specific to each object can be stored in Chargebee, and you can add/update this information in simple JSON format.

curl  https://api.chargebee.com/api/v2/customers \
     -u api_key: \
     -d first_name="John" \
     -d last_name="Doe" \
     -d email="john@test.com" \
     -d meta_data='{"allows_marketing":"yes","marketing_channel":"organic"}'

With metadata you can add more information in a complex configuration as opposed to a pre-defined structure of custom fields that Chargebee supports. Also, metadata supports adding information from across various resources such as Customers, Plans, Coupons, etc. If you’re looking for a simpler way to add extra information just for the Customer resource, however, try custom fields.

Here are a few more business cases for which metadata can be used:

  • If you’d wish to tease users to try specific features as “trials” before they upgrade, Like Positionly, you can identify that at the customer level by storing the information as a metafield.

  • If you’d want to run specific campaigns and give away a few thousand free emails for specific coupons, Like Sendgrid, you can do that by simply storing that information in the coupon’s metafield metadata.

Like our approach? Have any suggestions? Let us know what you think.

Hear from a team of curious beings
A team that’s bent on delivering the best stories, lessons, and observations on SaaS, straight into your inbox. Every week.
SaaS Dispatch Team

Subscription Billing Made Easy

Try for free

Recent Blog Posts

Ultimate guide transactional emails
Rethinking Transactional Emails - How to Ace Them, and Why You Should Do It

There's more to transactional emails than you think. Here's how to strike gold with them. Read More >

Failed payments and involuntary churn
Failed Payments and Involuntary Churn - The Definitive Guide

Implement these tactics at every stage of the payment failure life cycle to optimize your revenue recovery, recover as many failed payments as possible, and fight involuntary churn. Read More >

The singularity of Negative Churn
From Unit Economics To Negative Churn: Hitchhiking To SaaS Growth

From Unit Economics to expansion MRR to negative churn, meet the SaaS characters and metrics that make, break and change the course of your SaaS growth journey. Read More >

Subscription billing software that lets startups deliver recurring happiness to customers.
How Chargebee Works