For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
  • Getting Started
    • Overview
    • What is Schematic?
    • Concepts
  • Using Schematic
    • Who Uses Schematic
  • Quickstart
    • Quickstart
    • Account Setup
    • Entitling a Feature
    • Tracking Usage
    • Components
    • Identifying Users
    • Setup the SDK
  • Using Feature Flags
    • Overview
    • Flags
    • Features
    • Tracking Feature Usage
    • Company Overrides
    • Feature Types
  • Building Your Catalog
    • Overview
    • Plans
    • Managing Company Plans
    • Configuring the Catalog
    • Add Ons
    • Trials
  • AI Tooling
    • For Developers
  • Setting Up Billing
    • Overview
    • Usage Based Billing Models
    • Seat Based Billing Models
    • Credit burndown
  • Using UI Components
    • Overview
  • Developer Resources
    • Concepts
    • Key Management
    • Environments
    • Entity Relationship Diagram
  • Production Readiness
    • Availability
    • Observability & Support
    • Security
  • Integrations
    • Segment Integration
    • Clerk Integration
    • WorkOS Integration
    • Salesforce Integration
    • Hubspot Integration
  • Playbooks
    • Overview
    • Creating a metered feature
    • Backfills and usage corrections
    • Rolling out beta functionality with Flags
    • Handling customer exceptions and feature trials
    • Automatically provision customers using Stripe
    • Build a slack webhook
LogoLogo
SupportDashboard
On this page
  • Create a boolean feature
  • Entitle the feature to a plan
  • Code example
  • We’re done!
  • Next steps
Quickstart

Adding your first feature

Quickly gate access to features
Was this page helpful?
Previous

Tracking Usage

Quickly track usage to power Usage Based billing
Next
Built with

In the quickstart app, the entitlements page shows 2 buttons, one of which is disabled. Let’s create a feature in Schematic and entitle it to our plan so that this button will become clickable.

Create a boolean feature

First, we’ll need to create a feature in Schematic.

  1. Select “Features” from the top navigation
  2. Click “Create” on the right side of the screen
  3. Call the feature “New Boolean Feature”
  4. NOTE: The type of this feature is “Boolean” — either we have access or we don’t.
  5. Click “Continue” at the bottom
  6. On the next screen, for the flag key, you MUST provide “new-boolean-feature”. This is the value the quickstart app is expecting.
  7. Click “Continue”, then click “Save” on the final screen

Create a feature step 1

Create a feature step 2

Entitle the feature to a plan

Now that we have a feature, we need to “entitle” it to the plan — this is how we give our customers on a plan access to this feature.

When you saved the feature, you should have dropped onto that feature’s page. If not, then select “Features” from the top navigation and click on the feature you just created (New Boolean Feature).

  1. Click “Add Plan Entitlement” to begin
  2. Select the “Demo Plan” plan
  3. Click “Save”

Entitle a feature step 1

Entitle a feature step 2

If you go back to the quickstart app, you should see the second entitlement button is now clickable and the text has changed (you made need to refresh the page).

Congrats! you’ve just entitled a feature to a plan.

Code example

Below is the code that controls the button we just enabled. Tracking users and plans and then determining what a user is entitled to happens within Schematic. Our APIs and SDKs expose an interface similar to a feature flag — you just need to check if the user has access and respond accordingly.

const {
value: isNewBooleanFeatureEnabled,
} = useSchematicEntitlement("new-boolean-feature");
<button
className="bg-blue-500 text-white px-4 py-2 rounded-md"
disabled={!isNewBooleanFeatureEnabled}
onClick={() => { ... })
>
{isNewBooleanFeatureEnabled ? "I'm entitled too!" : "I'm not entitled (yet)!"}
</button>

We’re done!

You just created a feature in Schematic and entitled it to a plan. This is the core building block of Schematic. The feature we created here was a Boolean feature, a simple feature that either grants or denies access. These are the most common type of feature in most plans. For example everything boxed in red below is a boolean feature.

Boolean features on a pricing page

Next steps

We recommend you checkout the events page in the quickstart app to see how to track feature usage.