Schematic · Capability

Schematic Customer Management

Unified capability for managing customer companies, users, event tracking, and billing integrations in Schematic. Enables SaaS teams to sync customers from CRM and billing systems, track usage events for metering, and manage company-level feature overrides.

Run with Naftiko BillingCustomer ManagementMeteringSaaSSchematicUsage Tracking

What You Can Do

GET
List companies — List customer companies
/v1/companies
POST
Upsert company — Create or update a company by external keys
/v1/companies
GET
List users — List users
/v1/users
POST
Upsert user — Create or update a user
/v1/users
POST
Create event — Track a usage event
/v1/events
GET
Get insights summary — Get analytics summary
/v1/insights
GET
Get plan growth — Get plan growth metrics
/v1/insights
GET
Get top features — Get top features by usage
/v1/insights

MCP Tools

list-companies

List customer companies in Schematic

read-only
upsert-company

Create or update a company record using external identifiers (Stripe ID, Salesforce ID, etc.)

list-users

List users associated with companies

read-only
upsert-user

Create or update a user record

track-usage-event

Submit a usage event for metered feature consumption tracking

get-insights-summary

Get summary analytics across features, plans, and companies

read-only
get-top-features

Get the most-used product features by usage count

read-only
get-plan-growth

Get plan adoption and growth metrics

read-only

APIs Used

schematic

Capability Spec

customer-management.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Schematic Customer Management"
  description: >-
    Unified capability for managing customer companies, users, event tracking,
    and billing integrations in Schematic. Enables SaaS teams to sync customers
    from CRM and billing systems, track usage events for metering, and manage
    company-level feature overrides.
  tags:
    - Billing
    - Customer Management
    - Metering
    - SaaS
    - Schematic
    - Usage Tracking
  created: "2026-05-02"
  modified: "2026-05-02"

binds:
  - namespace: env
    keys:
      SCHEMATIC_API_KEY: SCHEMATIC_API_KEY

capability:
  consumes:
    - import: schematic
      location: ./shared/schematic-api.yaml

  exposes:
    - type: rest
      port: 8081
      namespace: customer-management-api
      description: "Unified REST API for Schematic customer and usage management."
      resources:
        - path: /v1/companies
          name: companies
          description: "Customer company records"
          operations:
            - method: GET
              name: list-companies
              description: "List customer companies"
              call: "schematic.list-companies"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: upsert-company
              description: "Create or update a company by external keys"
              call: "schematic.upsert-company"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/users
          name: users
          description: "Customer users"
          operations:
            - method: GET
              name: list-users
              description: "List users"
              call: "schematic.list-users"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: upsert-user
              description: "Create or update a user"
              call: "schematic.upsert-user"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/events
          name: events
          description: "Usage event tracking"
          operations:
            - method: POST
              name: create-event
              description: "Track a usage event"
              call: "schematic.create-event"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/insights
          name: insights
          description: "Usage analytics"
          operations:
            - method: GET
              name: get-insights-summary
              description: "Get analytics summary"
              call: "schematic.get-insights-summary"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: GET
              name: get-plan-growth
              description: "Get plan growth metrics"
              call: "schematic.get-plan-growth"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: GET
              name: get-top-features
              description: "Get top features by usage"
              call: "schematic.get-top-features"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9091
      namespace: customer-management-mcp
      transport: http
      description: "MCP server for AI-assisted customer and usage management."
      tools:
        - name: list-companies
          description: "List customer companies in Schematic"
          hints:
            readOnly: true
            openWorld: true
          call: "schematic.list-companies"
          outputParameters:
            - type: object
              mapping: "$."

        - name: upsert-company
          description: "Create or update a company record using external identifiers (Stripe ID, Salesforce ID, etc.)"
          hints:
            readOnly: false
          call: "schematic.upsert-company"
          with:
            keys: "tools.keys"
            name: "tools.name"
          outputParameters:
            - type: object
              mapping: "$."

        - name: list-users
          description: "List users associated with companies"
          hints:
            readOnly: true
            openWorld: true
          call: "schematic.list-users"
          outputParameters:
            - type: object
              mapping: "$."

        - name: upsert-user
          description: "Create or update a user record"
          hints:
            readOnly: false
          call: "schematic.upsert-user"
          outputParameters:
            - type: object
              mapping: "$."

        - name: track-usage-event
          description: "Submit a usage event for metered feature consumption tracking"
          hints:
            readOnly: false
          call: "schematic.create-event"
          with:
            event_type: "tools.event_type"
            name: "tools.name"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-insights-summary
          description: "Get summary analytics across features, plans, and companies"
          hints:
            readOnly: true
            openWorld: true
          call: "schematic.get-insights-summary"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-top-features
          description: "Get the most-used product features by usage count"
          hints:
            readOnly: true
            openWorld: true
          call: "schematic.get-top-features"
          outputParameters:
            - type: object
              mapping: "$."

        - name: get-plan-growth
          description: "Get plan adoption and growth metrics"
          hints:
            readOnly: true
            openWorld: true
          call: "schematic.get-plan-growth"
          outputParameters:
            - type: object
              mapping: "$."