ReferenceFor engineers

Tracks

Query and schedule tracks — the groupings of steps within a care flow.

Query and schedule tracks — the groupings of steps within a care flow.

Queries

adHocTracksByPathway

Returns the ad hoc tracks that can be triggered for a care flow.

Arguments

ArgumentTypeRequiredDescription
pathway_idString!YesThe ID of the care flow

Returns: TracksPayload!

Example

query AdHocTracksByPathway($pathway_id: String!) {
  adHocTracksByPathway(pathway_id: $pathway_id) {
    code
    success
    tracks {
      can_trigger_manually
      id
      release_id
      title
    }
  }
}

Variables:

{
  "pathway_id": "<string>"
}

adHocTracksByRelease

Returns the ad hoc tracks available in a published care flow definition version (release).

Arguments

ArgumentTypeRequiredDescription
release_idString!YesThe ID of the published care flow definition version (release)

Returns: TracksPayload!

Example

query AdHocTracksByRelease($release_id: String!) {
  adHocTracksByRelease(release_id: $release_id) {
    code
    success
    tracks {
      can_trigger_manually
      id
      release_id
      title
    }
  }
}

Variables:

{
  "release_id": "<string>"
}

careflowTracks

Returns the tracks in a care flow, optionally filtered by status.

Arguments

ArgumentTypeRequiredDescription
careflow_idString!YesThe ID of the care flow
statuses[String!]NoThe track statuses to filter by

Returns: CareflowTracksPayload!

Example

query CareflowTracks($careflow_id: String!, $statuses: [String!]) {
  careflowTracks(careflow_id: $careflow_id, statuses: $statuses) {
    code
    success
    tracks {
      definition_id
      end_date
      id
      start_date
      started_by_user_id
      started_by_user_name
      status
      stop_reason
      stopped_by_user_id
      stopped_by_user_name
      title
    }
  }
}

Variables:

{
  "careflow_id": "<string>",
  "statuses": [
    "<string>"
  ]
}

scheduledDestinations

Returns the scheduled destinations for a care flow.

Arguments

ArgumentTypeRequiredDescription
pathway_idString!YesThe ID of the care flow

Returns: ScheduledDestinationsPayload!

Example

query ScheduledDestinations($pathway_id: String!) {
  scheduledDestinations(pathway_id: $pathway_id) {
    code
    destinations {
      date
      node {
        date
        definition_id
        definition_type
        id
        name
        track_definition_id
      }
    }
    success
  }
}

Variables:

{
  "pathway_id": "<string>"
}

scheduledSteps

Returns the scheduled steps for a care flow.

Arguments

ArgumentTypeRequiredDescription
pathway_idString!YesThe ID of the care flow

Returns: ScheduledStepsPayload!

Example

query ScheduledSteps($pathway_id: String!) {
  scheduledSteps(pathway_id: $pathway_id) {
    code
    steps {
      activity_type
      context {
        action_id
        agent_config_id
        agent_id
        agent_thread_id
        instance_id
        pathway_id
        run_id
        step_id
        track_id
      }
      definition_id
      end_date
      id
      label {
        color
        id
        text
      }
      name
      parent_id
      stakeholders {
        id
        name
      }
      start_date
      status
      type
    }
    success
  }
}

Variables:

{
  "pathway_id": "<string>"
}

scheduledTracksForPathway

Returns the scheduled tracks for a care flow.

Arguments

ArgumentTypeRequiredDescription
pathway_idString!YesThe ID of the care flow

Returns: ScheduledTracksPayload!

Example

query ScheduledTracksForPathway($pathway_id: String!) {
  scheduledTracksForPathway(pathway_id: $pathway_id) {
    code
    scheduled_tracks {
      created_by_user_id
      created_date
      id
      modified_date
      pathway_id
      release_id
      scheduled_date
      status
      tenant_id
      title
      track_definition_id
    }
    success
  }
}

Variables:

{
  "pathway_id": "<string>"
}

tracksByPathway

Returns the tracks in a care flow.

Arguments

ArgumentTypeRequiredDescription
pathway_idString!YesThe ID of the care flow

Returns: TracksPayload!

Example

query TracksByPathway($pathway_id: String!) {
  tracksByPathway(pathway_id: $pathway_id) {
    code
    success
    tracks {
      can_trigger_manually
      id
      release_id
      title
    }
  }
}

Variables:

{
  "pathway_id": "<string>"
}

Mutations

addTrack

Adds a track to a care flow.

Arguments

ArgumentTypeRequiredDescription
inputAddTrackInput!YesThe details of the track to add

Returns: AddTrackPayload!

Example

mutation AddTrack($input: AddTrackInput!) {
  addTrack(input: $input) {
    code
    success
  }
}

Variables:

{
  "input": {
    "pathway_id": "<string>",
    "track_id": "<string>"
  }
}

scheduleTrack

Schedules a track to start on a future date.

Arguments

ArgumentTypeRequiredDescription
inputScheduleTrackInput!YesThe details of the track to schedule

Returns: ScheduleTrackPayload!

Example

mutation ScheduleTrack($input: ScheduleTrackInput!) {
  scheduleTrack(input: $input) {
    code
    id
    success
  }
}

Variables:

{
  "input": {
    "pathway_id": "<string>",
    "scheduled_date": "<string>",
    "track_id": "<string>"
  }
}

stopTrack

Stops a running track in a care flow.

Arguments

ArgumentTypeRequiredDescription
inputStopTrackInput!YesThe details of the track to stop

Returns: StopTrackPayload!

Example

mutation StopTrack($input: StopTrackInput!) {
  stopTrack(input: $input) {
    code
    success
    track {
      activity_type
      context {
        action_id
        agent_config_id
        agent_id
        agent_thread_id
        instance_id
        pathway_id
        run_id
        step_id
        track_id
      }
      definition_id
      end_date
      id
      label {
        color
        id
        text
      }
      name
      parent_id
      stakeholders {
        id
        name
      }
      start_date
      status
      type
    }
  }
}

Variables:

{
  "input": {
    "pathway_id": "<string>",
    "track_id": "<string>"
  }
}

unscheduleTracks

Cancels one or more scheduled tracks.

Arguments

ArgumentTypeRequiredDescription
inputCancelScheduledTracksInput!YesThe IDs of the scheduled tracks to cancel

Returns: CancelScheduledTracksPayload!

Example

mutation UnscheduleTracks($input: CancelScheduledTracksInput!) {
  unscheduleTracks(input: $input) {
    code
    success
    unscheduled_ids
  }
}

Variables:

{
  "input": {
    "ids": [
      "<string>"
    ]
  }
}

On this page