Record Feature Usage
Kana needs to know whenever a user of your product has used a feature. It's a requirement so that we have accurate information on what feature's customers have used (and by how much) within the package(s) they have subscribed to.
You should implement this each time you create a feature within Kana to ensure your user's usage of a feature is accurately recorded.
Prerequisites
You will need to ensure you have details on both:
The user who has used the feature
The feature which the user has used
If neither the user nor feature exist yet in Kana, then you should create these first:
pageCreate UserspageCreate FeaturesOnce these are created, you will need to ensure you know the id
of both.
Code Sample
Next Steps
Congratulations 🎉 You've now successfully tracked your user's usage of a feature.
You should look to ensure this is setup for all your features and in all places where those features could be used by customers. For instance, if you had a messages
feature, your users may be able to send messages via your UI and through an API call - both should be tracked.
As we now have details on how much of a feature a user has used, you can:
Block usage based on if a user has no more remaining allowance
Subscribe a user to a new package based on their feature usage
We strongly recommend following the guide on blocking customer usage next so that feature access is properly recorded and blocked when necessary.
pageBlock Feature Access (Backend)pageBlock Feature Access (Frontend)Last updated