schema_version: "1"
name: license_utilization
display_name: "License Utilization Scout"
description: "Detect active users with no login or activity in the lookback window."
category: licenses
severity_default: medium
check_module: g_gremlin.scout.checks.license_utilization
check_class: LicenseUtilizationCheck
supported_crms: [salesforce]
requires_credentials: [salesforce]
enabled: true
sobjects_read: [User, Lead, Contact, Account, Opportunity]
parameters:
  - name: lookback_days
    type: number
    label: "Lookback window (days)"
    default: 90
  - name: max_users
    type: number
    label: "Max users to evaluate"
    default: 500
  - name: exclude_profiles
    type: list
    label: "Exclude profile names"
    default: ["Integration User", "System Administrator", "API Only User"]
  - name: exclude_permission_sets
    type: list
    label: "Exclude permission set names"
    default: []
  - name: exclude_usernames
    type: list
    label: "Exclude usernames"
    default: []
  - name: license_cost_per_user
    type: number
    label: "Estimated license cost per user (monthly)"
    default: 0
  - name: activity_objects
    type: list
    label: "Objects to check for activity"
    default: ["Lead", "Contact", "Account", "Opportunity"]
  - name: task_owner_id
    type: string
    label: "Task owner Id (optional)"
    default: ""
