Skip to Content
DeveloperTypesMatterPhase

MatterPhase

Description: Represents a phase or stage within a matter. Matters are typically broken down into phases to track progress and organize work.

Type Structure

Type Name: MatterPhase

Fields:

  • Id: String! - Unique identifier for the matter phase
  • Number: String! - Matter phase reference number (e.g., PH-2023-001-A)
  • Name: String! - Descriptive name of the phase

Example Usage

The MatterPhase type is typically returned as part of matter queries:

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Example Response

{ "data": { "AllMatters": [ { "Id": "5f8d0d5a7b3e4f1234567890", "Number": "MAT-2023-001", "Name": "Corporate Restructuring Project", "Phases": [ { "Id": "5f8d0d5a7b3e4f1234567892", "Number": "PH-2023-001-A", "Name": "Discovery Phase" }, { "Id": "5f8d0d5a7b3e4f1234567893", "Number": "PH-2023-001-B", "Name": "Implementation Phase" }, { "Id": "5f8d0d5a7b3e4f1234567894", "Number": "PH-2023-001-C", "Name": "Review Phase" } ] } ] } }

Field Details

Id

  • Type: String! (Non-null String)
  • Description: System-generated unique identifier for the matter phase
  • Example: "5f8d0d5a7b3e4f1234567892"
  • Usage: Used for internal references and relationships

Number

  • Type: String! (Non-null String)
  • Description: Human-readable reference number assigned to the matter phase
  • Example: "PH-2023-001-A"
  • Format: Typically follows a pattern like PH-YYYY-NNN-X where YYYY is the year, NNN is the matter number, and X is the phase letter
  • Usage: Used for phase identification in documents and communications

Name

  • Type: String! (Non-null String)
  • Description: Descriptive name of the phase
  • Example: "Discovery Phase"
  • Usage: Display purposes and phase identification

Relationships

The MatterPhase type has relationships with:

  • Matter: Each phase belongs to exactly one matter (one-to-many relationship from Matter to MatterPhase)
  • Activity: Activities are associated with specific matter phases for time tracking

Best Practices

  1. Phase Identification: Use the Number field for phase references in external systems
  2. Complete Context: When querying phases, always include them within the context of their parent matter
  3. Time Tracking: Associate time entries with specific phases for accurate billing and reporting
  4. Progress Tracking: Use phases to monitor progress through different stages of a matter

Common Use Cases

  1. Project Phasing: Break down matters into logical phases or stages
  2. Time Entry: Record time spent on specific phases of a matter
  3. Progress Tracking: Monitor which phases have been completed
  4. Resource Allocation: Allocate resources based on current phase
  5. Billing: Create phase-specific invoices
  6. Reporting: Generate reports by phase for better project insights

Phase Examples

Typical Matter Phases

  1. Discovery Phase: Initial research and information gathering
  2. Analysis Phase: Review and analyze collected information
  3. Implementation Phase: Execute the planned actions
  4. Review Phase: Quality assurance and final review
  5. Completion Phase: Final delivery and handover

Query Examples

Get All Matters with Phases

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Get Complete Matter Information with Phases

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "query { AllMatters { Id Number Name Client { Id Number Name } Phases { Id Number Name } } }" }' \ https://sandbox.drivepractice.com/api/v1/graphql

Integration with Activities

Matter phases are used in the CreateActivityForUserWithNumbers mutation to associate time entries with specific phases:

curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "query": "mutation CreateActivity($input: CreateActivityForUserWithNumbers!) { CreateActivityForUserWithNumbers(createActivityForUserWithNumbers: $input) { Id } }", "variables": { "input": { "UserEmail": "john.doe@company.com", "ApplicableDate": "2023-11-15", "MatterNumber": "MAT-2023-001", "MatterPhaseNumber": "PH-2023-001-A", "ActivityTypeNumber": "ACT-001", "UnitNumber": "UNIT-001", "Description": "Conducted legal research during discovery phase", "BillableQuantity": 3.5, "NonBillableQuantity": 1.0 } } }' \ https://sandbox.drivepractice.com/api/v1/graphql

In this example, the MatterPhaseNumber field specifies which phase the activity belongs to, enabling detailed tracking and reporting by phase.