Activity
Description: Represents a time entry or activity record in the system. Activities track time spent by users on various tasks, matters, and phases.
Type Structure
Type Name: Activity
Fields:
Id:String!- Unique identifier for the activity
Example Usage
The Activity type is primarily returned as the result of the CreateActivityForUserWithNumbers mutation:
cURL
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",
"BillableQuantity": 3.5,
"NonBillableQuantity": 1.0
}
}
}' \
https://sandbox.drivepractice.com/api/v1/graphqlExample Response
{
"data": {
"CreateActivityForUserWithNumbers": {
"Id": "5f8d0d5a7b3e4f1234567897"
}
}
}Field Details
Id
- Type:
String!(Non-null String) - Description: System-generated unique identifier for the activity
- Example:
"5f8d0d5a7b3e4f1234567897" - Usage: Used for internal references, updates, and relationships
Relationships
The Activity type is created through the CreateActivityForUserWithNumbers mutation and is associated with:
- User: The user who performed the activity (specified by email in the input)
- Matter: The matter being worked on (specified by MatterNumber in the input)
- MatterPhase: The specific phase of the matter (specified by MatterPhaseNumber in the input)
- ActivityType: The type of activity (specified by ActivityTypeNumber in the input)
- Unit: The business unit or department (specified by UnitNumber in the input)
Best Practices
- Activity Tracking: Use activities to track time spent on various tasks
- Detailed Descriptions: Provide detailed descriptions for better time tracking and reporting
- Accurate Time Entry: Ensure billable and non-billable quantities are accurate
- Proper Association: Always associate activities with the correct matter, phase, and activity type
Common Use Cases
- Time Tracking: Record time spent on various tasks
- Billing: Generate invoices based on billable time entries
- Reporting: Create reports showing time spent by user, matter, phase, or activity type
- Productivity Analysis: Analyze productivity and resource allocation
- Project Management: Track progress and time spent on projects
Integration with CreateActivity Mutation
The Activity type is the return value of the CreateActivityForUserWithNumbers mutation. This mutation requires detailed input parameters to create a complete activity record.
Input Parameters for Creating Activities
When creating an activity, you need to provide:
- UserEmail: Email of the user performing the activity
- ApplicableDate: Date when the activity occurred
- MatterNumber: Reference number of the matter
- MatterPhaseNumber: Reference number of the matter phase
- ActivityTypeNumber: Reference number of the activity type
- UnitNumber: Reference number of the unit/department
- Description: Detailed description of the activity
- BillableQuantity: Number of billable hours
- NonBillableQuantity: Number of non-billable hours
Example Activity Creation
cURL
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": "jane.smith@company.com",
"ApplicableDate": "2023-11-16",
"MatterNumber": "MAT-2023-002",
"MatterPhaseNumber": "PH-2023-002-A",
"ActivityTypeNumber": "ACT-002",
"UnitNumber": "UNIT-002",
"Description": "Client meeting to discuss compliance requirements and next steps",
"BillableQuantity": 2.0,
"NonBillableQuantity": 0.5
}
}
}' \
https://sandbox.drivepractice.com/api/v1/graphqlTime Tracking Examples
Legal Research Activity
cURL
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 extensive legal research on corporate restructuring regulations and case law",
"BillableQuantity": 4.5,
"NonBillableQuantity": 0.0
}
}
}' \
https://sandbox.drivepractice.com/api/v1/graphqlAdministrative Task
cURL
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": "sarah.johnson@company.com",
"ApplicableDate": "2023-11-17",
"MatterNumber": "MAT-2023-003",
"MatterPhaseNumber": "PH-2023-003-B",
"ActivityTypeNumber": "ACT-005",
"UnitNumber": "UNIT-003",
"Description": "Prepared and filed court documents for the compliance review matter",
"BillableQuantity": 3.0,
"NonBillableQuantity": 0.5
}
}
}' \
https://sandbox.drivepractice.com/api/v1/graphqlBest Practices for Time Entry
- Be Specific: Provide detailed descriptions of what was accomplished
- Accurate Time: Record actual time spent, not estimated time
- Categorize Properly: Use the correct activity type for each entry
- Associate Correctly: Link activities to the correct matter and phase
- Regular Entry: Record time entries regularly to maintain accuracy
- Review: Review time entries periodically for completeness and accuracy
Activity Types
Common activity types that might be used:
- ACT-001: Legal Research
- ACT-002: Client Meeting
- ACT-003: Document Preparation
- ACT-004: Court Appearance
- ACT-005: Administrative Tasks
- ACT-006: Travel Time
- ACT-007: Training/Development