Skip to content
Development
Command

/contract-status

Check contract status, service entitlements, and billing information for a client

From plugin
msp-claude-plugins
39200 skills141 agents200 commands
Install
$ npx -y skills add wyre-technology/msp-claude-plugins --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/contract-status

Context preview

What this command does when you run it.

Check contract status, service entitlements, and billing information for a client

Command definition

contract-status.md
description: Check contract status, service entitlements, and billing information for a client
argument-hint: "[client_id] [contract_id] [include_services] [include_usage]"
arguments: [client_id, contract_id, include_services, include_usage]

Check HaloPSA Contract Status

Check contract status, service entitlements, and billing information for a client.

Prerequisites

  • Valid HaloPSA OAuth credentials configured
  • User must have contract read permissions
  • Either client_id or contract_id must be provided

Steps

1. **Authenticate with OAuth 2.0**

  • Obtain access token using client credentials flow
  • Token endpoint: `{base_url}/auth/token?tenant={tenant}`
   # Get OAuth token
   TOKEN=$(curl -s -X POST "{base_url}/auth/token?tenant={tenant}" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials" \
     -d "client_id={client_id}" \
     -d "client_secret={client_secret}" \
     -d "scope=all" | jq -r '.access_token')

2. **Fetch contracts**

   # By client
   curl -s -X GET "{base_url}/api/Contract?client_id={client_id}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

   # Or by contract ID
   curl -s -X GET "{base_url}/api/Contract/{contract_id}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

3. **Fetch service lines (if requested)**

   curl -s -X GET "{base_url}/api/RecurringInvoice?contract_id={contract_id}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

4. **Fetch usage/block hours (if requested)**

   curl -s -X GET "{base_url}/api/ContractBlock?contract_id={contract_id}" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json"

5. **Format and display results**

  • Contract overview
  • Service entitlements
  • Usage statistics
  • Billing information

Parameters

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | client_id | integer | No* | - | Client ID to check contracts | | contract_id | integer | No* | - | Specific contract ID | | include_services | boolean | No | false | Include service line details | | include_usage | boolean | No | false | Include usage/hours consumed |

*Either client_id or contract_id is required

Examples

Client Contracts Overview

/contract-status --client_id 12345

Specific Contract

/contract-status --contract_id 9876

With Service Details

/contract-status --client_id 12345 --include_services true

Full Usage Report

/contract-status --contract_id 9876 --include_services true --include_usage true

Check Before Ticket Creation

/contract-status --client_id 12345 --include_usage true

Output

Client Contracts Overview

================================================================================
Contract Status: Acme Corporation (ID: 123)
================================================================================

ACTIVE CONTRACTS (2)
--------------------------------------------------------------------------------

1. Managed Services Agreement
   ────────────────────────────────────────────────────────────────────────────
   Contract ID:      9876
   Type:             All-Inclusive
   Status:           ✓ Active
   Start Date:       2023-01-01
   End Date:         2024-12-31
   Auto-Renewal:     Yes (Annual)

   SLA:              Premium
   Billing:          Monthly ($5,500.00)
   Next Invoice:     2024-03-01

   Coverage:         Unlimited support for covered items
   Exclusions:       Project work, after-hours (overtime rates apply)

2. Block Hours Agreement
   ────────────────────────────────────────────────────────────────────────────
   Contract ID:      9877
   Type:             Pre-Paid Hours
   Status:           ✓ Active
   Start Date:       2024-01-01
   End Date:         2024-12-31

   Hours Purchased:  100 hours
   Hours Used:       67.5 hours
   Hours Remaining:  32.5 hours

   Billing:          Prepaid ($12,500.00)
   Rollover:         No

EXPIRED/INACTIVE CONTRACTS (1)
--------------------------------------------------------------------------------

3. Implementation Project
   ────────────────────────────────────────────────────────────────────────────
   Contract ID:      9800
   Type:             Fixed Price Project
   Status:           Completed
   Duration:         2022-06-01 to 2022-12-31
   Value:            $45,000.00

================================================================================

Quick Actions:
- View contract:    /contract-status --contract_id <id>
- Client tickets:   /search-tickets --client 123
- Create ticket:    /create-ticket 123 "Summary"

Detailed Contract with Services

================================================================================
Contract Details: Managed Services Agreement
================================================================================

CONTRACT INFORMATION
--------------------------------------------------------------------------------
Contract ID:      9876
Client:           Acme Corporation (ID: 123)
Type:             All-Inclusive Managed Services
Status:           ✓ Active

Start Date:       2023-01-01
End Date:         2024-12-31
Term:             2 years
Auto-Renewal:     Yes (Annual, 90-day notice required)

SLA Profile:      Premium
Account Manager:  John Manager
Sales Rep:        Jane Sales

BILLING INFORMATION
--------------------------------------------------------------------------------
Billing Cycle:    Monthly
Amount:           $5,500.00 /month
Payment Terms:    Net 30
Tax Status:       Taxable

Next Invoice:     2024-03-01
Last Invoice:     2024-02-01 (#INV-2024-0234)
Invoice Status:   Paid

Annual Value:     $66,000.00
Contract Total:   $132,000.00 (2 years)

SERVICE LINES
---------------------------------------
Read more
Ships withmsp-claude-plugins

One command to supercharge Claude Code for MSP workflows. Then restart Claude Code. That's it. Documentation: mcp.wyre.ai

Get the whole plugin, auto-invoked
Stats
39
Stars
0
Views
17
Forks
Active
Maintenance
Astro
Language
Apache-2.0
License
1d ago
Last commit
6mo ago
Created

Repo: wyre-technology/msp-claude-plugins