Skip to Content
DeveloperTypesCreateActivityForUserWithNumbers Input

CreateActivityForUserWithNumbers Input

Description: Input type used for the CreateActivityForUserWithNumbers mutation. This type defines all the parameters required to create a new activity record.

Type Structure

Type Name: CreateActivityForUserWithNumbers

Fields (all required):

  • UserEmail: String! - Email address of the user performing the activity
  • ApplicableDate: String! - Date when the activity occurred
  • MatterNumber: String! - Reference number of the matter
  • MatterPhaseNumber: String! - Reference number of the matter phase
  • ActivityTypeNumber: String! - Reference number of the activity type
  • UnitNumber: String! - Reference number of the unit (department/business unit)
  • Description: String! - Detailed description of the activity performed
  • BillableQuantity: Float! - Number of billable hours spent
  • NonBillableQuantity: Float! - Number of non-billable hours spent

Example Usage

This input type is used exclusively with the CreateActivityForUserWithNumbers mutation:

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 on corporate restructuring regulations", "BillableQuantity": 3.5, "NonBillableQuantity": 1.0 } } }' \ https://sandbox.drivepractice.com/api/v1/graphql

Field Details

UserEmail

  • Type: String! (Non-null String)
  • Description: Email address of the user who performed the activity
  • Example: "john.doe@company.com"
  • Format: Valid email format (user@domain.com)
  • Usage: Identifies which user is responsible for the time entry

ApplicableDate

  • Type: String! (Non-null String)
  • Description: Date when the activity occurred
  • Example: "2023-11-15"
  • Format: ISO 8601 date format (YYYY-MM-DD)
  • Usage: Tracks when the work was performed for reporting and billing

MatterNumber

  • Type: String! (Non-null String)
  • Description: Reference number of the matter being worked on
  • Example: "MAT-2023-001"
  • Format: Typically follows pattern MAT-YYYY-NNN
  • Usage: Associates the activity with a specific matter/project

MatterPhaseNumber

  • Type: String! (Non-null String)
  • Description: Reference number of the matter phase
  • Example: "PH-2023-001-A"
  • Format: Typically follows pattern PH-YYYY-NNN-X
  • Usage: Associates the activity with a specific phase of a matter

ActivityTypeNumber

  • Type: String! (Non-null String)
  • Description: Reference number of the activity type
  • Example: "ACT-001"
  • Format: Typically follows pattern ACT-NNN
  • Usage: Categorizes the type of work performed

UnitNumber

  • Type: String! (Non-null String)
  • Description: Reference number of the unit/department
  • Example: "UNIT-001"
  • Format: Typically follows pattern UNIT-NNN
  • Usage: Associates the activity with a specific business unit or department

Description

  • Type: String! (Non-null String)
  • Description: Detailed description of the activity performed
  • Example: "Conducted legal research on corporate restructuring regulations and prepared summary document"
  • Usage: Provides context about what work was done

BillableQuantity

  • Type: Float! (Non-null Float)
  • Description: Number of billable hours spent
  • Example: 3.5
  • Format: Decimal number representing hours (e.g., 2.5 for 2 hours 30 minutes)
  • Usage: Tracks time that can be billed to the client

NonBillableQuantity

  • Type: Float! (Non-null Float)
  • Description: Number of non-billable hours spent
  • Example: 1.0
  • Format: Decimal number representing hours
  • Usage: Tracks time that cannot be billed to the client (e.g., administrative tasks)

Complete Example

{ "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 review project timeline. Prepared agenda and follow-up action items.", "BillableQuantity": 2.0, "NonBillableQuantity": 0.5 }

Validation Rules

  1. All Fields Required: Every field in this input type is required (marked with !)
  2. Email Format: UserEmail must be a valid email address
  3. Date Format: ApplicableDate must be a valid date in YYYY-MM-DD format
  4. Positive Numbers: BillableQuantity and NonBillableQuantity must be non-negative numbers
  5. Number Formats: Reference numbers must follow their respective patterns

Best Practices

  1. Complete Information: Provide all required fields with accurate information
  2. Detailed Descriptions: Write detailed descriptions that explain what was accomplished
  3. Accurate Time Tracking: Record actual time spent, not estimated time
  4. Proper Categorization: Use the correct matter, phase, activity type, and unit numbers
  5. Date Accuracy: Use the correct date for when the work was performed
  6. Regular Entry: Record time entries regularly throughout the day

Common Activity Type Examples

Activity TypeDescriptionExample Use Case
ACT-001Legal ResearchResearching case law and regulations
ACT-002Client MeetingMeetings with clients to discuss matters
ACT-003Document PreparationCreating legal documents and contracts
ACT-004Court AppearanceTime spent in court proceedings
ACT-005Administrative TasksInternal administrative work
ACT-006Travel TimeTime spent traveling for business
ACT-007Training/DevelopmentProfessional development activities

Unit Examples

Unit NumberDescription
UNIT-001Corporate Law Department
UNIT-002Compliance Department
UNIT-003Litigation Department
UNIT-004Intellectual Property Department
UNIT-005Tax Law Department

Error Handling

Common validation errors:

Missing Required Field

{ "errors": [ { "message": "Field 'UserEmail' of required type 'String!' was not provided.", "locations": [ { "line": 2, "column": 3 } ], "extensions": { "code": "GRAPHQL_VALIDATION_FAILED" } } ] }

Invalid Email Format

{ "errors": [ { "message": "UserEmail must be a valid email address", "extensions": { "code": "BAD_USER_INPUT" } } ] }

Invalid Date Format

{ "errors": [ { "message": "ApplicableDate must be a valid date in YYYY-MM-DD format", "extensions": { "code": "BAD_USER_INPUT" } } ] }

Negative Time Quantity

{ "errors": [ { "message": "BillableQuantity must be a non-negative number", "extensions": { "code": "BAD_USER_INPUT" } } ] }

Integration with GraphQL Variables

When using GraphQL clients, it’s recommended to use variables for the input:

const mutation = ` mutation CreateActivity($input: CreateActivityForUserWithNumbers!) { CreateActivityForUserWithNumbers(createActivityForUserWithNumbers: $input) { Id } } `; const 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 } }; const data = await request( 'https://sandbox.drivepractice.com/api/v1/graphql', mutation, variables, { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' } );

This approach makes your queries more maintainable and easier to debug.