How Retool issues and manages user licenses using Retool

Kevin Garcia
Kevin Garcia
Product marketing @ Retool

Jun 21, 2021

Processing sensitive data using SaaS products, especially in regulated spaces, can be a challenge. Data is often moved or stored through the vendor’s cloud, which can be a non-starter or lead to endless security reviews.

To help developers build business apps safely, we offer a variety of self-hosted Retool plans. But selling self-hosted software means our team needs a way to create, issue, manage, renew, and deactivate license keys for every customer.

In the early days, our engineers would run a simple script to manage self-hosted licenses. With fewer customers and features, it was an easy MVP. But as the number of self-hosted customers grew and our product became more complex, we needed a way to make this more scalable.

It started with giving account teams more control over user licensing. To do this, we needed to move away from our error-prone scripts to a more complete app that business users could own. This is the story behind our Account Team Dashboard and how Retool now manages user licenses.

Introducing the Account Team Dashboard

Over the last 9 months, we’ve added thousands of new customers and have grown the team from 15 to over 80. Even with a lot of new engineering teammates, our go-to-market team (i.e. success, support, sales, etc.) is expanding fast and is starting to outgrow a lot of our early processes.

The account teams want to deliver a winning user experience, but that can be difficult to ensure when they don’t control the entire user setup flow. No matter how fast our engineers could move, we wanted to move away from any dependencies to make the account team self-sufficient.

So we built the Account Team Dashboard as a central system for account teams to manage customer licenses.


Our dashboard has 4 key use cases:

  • Generating license keys for new and trial accounts
  • Extending trials and renewing licenses
  • Mapping Salesforce accounts to license keys
  • Enabling custom feature flags for customers

Generating license keys

First and foremost, we need a quick way to generate license keys for new accounts and self-hosted trials. Our dashboard has a simple two-step process generate a license key and manage everything from expiration date to license type (reminder: we have several self-hosted plan options).

Extending trials and renewing licenses

At the same time, we also wanted account teams to have 1-click options to renew customer licenses and extend licenses to custom dates. With all of these functions in the same dashboard, we created one place to manage trials, new accounts, and renewals.

Mapping Salesforce accounts to license keys

We also wanted to ensure this dashboard and Salesforce (our source of truth for account info) were able to read and write data to each other. One critical detail was ensuring there was a 1:1 mapping between the license keys in our database with Salesforce accounts.

By building this visibility and editing into our dashboard, we’ve empowered account teams to discover data discrepancies and solve them in seconds.

Enabling custom feature flags for customers

Finally, we’re making updates to Retool on a daily basis, but not every feature is relevant or ready for every customer.

When features are in early development or beta, we want account teams to be able to communicate and align with customers on whether they want or need the feature. Once they have more information, account teams can quickly toggle any feature flag on or off for the customer.


How we built the dashboard

This app needs to communicate with a few key data sources:

  • Salesforce
  • Our management database
  • Our separate licensing database
  • Our licensing API

In terms of actually building the dashboard, the first step was pulling new accounts or trial accounts from Salesforce into our management database. We achieved this by creating a simple search bar.

Once you find the company in the table below, you can click a button to add the company to our management database. The button triggers a Postgres query, which does an insert into our companies table.


Once a company has been added to our management database, we can generate a “deployment” for them. To generate a deployment, need a few things: a unique license key, an expiration date, a type, and a domain.

The tool handles the creation of a unique license key by triggering a Javascript query off of a button click. The other inputs for this deployment are a date picker, dropdown, and text input. These are all contained within a form (see below). Submitting the form runs a Postgres query which inserts a new record into a deployments table.

Once a license key has been created, the app offers a few quick actions: setting a custom expiration date, deleting the key, and adding a week to the expiration date of the key. These buttons all trigger Postgres queries which update the deployment based on the selected row of the table displaying these keys.

We also provide functionality to copy the key to the clipboard, as well as copy the key as base64. When deploying via Kubernetes, license keys needed to be base64 encoded. We were seeing a lot of errors with people encoding these keys with whitespace, so we added a button that base64 encodes the key correctly and copies it to the clipboard.

Preventing errors by base64 encoding license keys
Preventing errors by base64 encoding license keys

Results

Our Account Team Dashboard has reduced dependencies between engineering and our account teams but, more importantly, the tool has become a core part of our workflow.

With our Account Team Dashboard, I can create a smooth customer experience without waiting on engineers or double-checking whether a script ran the way it was supposed to. I can’t imagine managing customer deployments without this dashboard.
Kent Walters, AE

The alternative of running scripts and editing the database directly couldn’t scale and slowed down the entire team. This new process gives the account teams total control over the customer experience and engineers more time to focus on core product updates.

When evaluating just the impact of just our Kubernetes base64 encoding feature, the team found we saved 4 hours per week on debugging and customer calls—and that’s one tiny feature of the dashboard!

When you add up all of the different dependencies we’ve removed and processes we’ve sped up, we’re saving dozens of hours a month and giving customers a blazing fast onboarding and renewal experience.

If you’re interested in building your own dashboard or license management, get started with Retool today.

Kevin Garcia
Kevin Garcia
Product marketing @ Retool
Jun 21, 2021
Copied