Many apps have a seat system where subscribers can invite users under their plan to use the features of the app, for example Slack. Servicebot offers a seat management system to give your customers the ability to invite users to use your app, and gives you the ability to bill them per user they invite if needed.

This guide aims to go over how this can be done for your app.

Setting the Invite URL

The invite URL is set on the seat management configuration page located at Embeds -> Seat Management. This is the URL the invite emails directs the user to, with an inviteToken appended to the end, for example if I set the URL to https://servicebot.io/register , the invite email will direct new users to https://servicebot.io/register?inviteToken=f66ff36b637f227c3dafc0072d52e 

It's important that you make sure the Invite URL page is configured with a Servicebot login embed so they can complete their account registration and sign in to your application. See this guide on how to configure the login embed

Server Code for Token Generation

In order to use the seat management embed, you need to generate a JSON web token identical to the one needed to use the billing management embed, so if you've already set up the billing management code on your server, call the same function to generate a token for this embed. The seat management embed configuration page in Servicebot can give you some code snippits in several different languages. If you don't use one of these languages you can write your own code using the specifications detailed on the page. 

Client Code

Once you have the code on your server you need to pass the token generated to your client on the page containing the seat management embed. The token should be passed as a token  option. For details on the options you can pass to the seat management embed see this documentation

Now the customer should be able to invite users attached to their subscription

How to bill per seat

In your Services, you can configure metric billing to bill against a metric instead of a static subscription. If you check the box connecting the metric to seat management after enabling the metric, the metric will match the number of seats the user has under their subscription.

Customizing the Invite Email

You can easily configure the email that goes out to new users invited by the seat management embed by going to Settings -> Email Settings -> Invitation. This is useful if you want to add company branding, or turn off the emails entirely if you want to use your own invitation system separate from Servicebot. The invite URL will be inserted wherever the text [[url]]  is present in the template

Did this answer your question?