Coaching

Our Coaching Service API provides a comprehensive set of endpoints to create, read, update, delete, acknowledge, list, export, and manage all coaching-related entities—such as comments, plans, sessions, scorecards, and targets—covering everything from scorecard backfills to retrieving evaluation periods and agent quotas.

Languages
Servers
https://{api-domain}.cresta.com/

CoachingService

Operations

Get coaching opportunities of some agents

Request

Path
parentstringrequired

Resource name of the parent. Format: customers/{customer_id}/profiles/{profile_id}

Bodyapplication/jsonrequired
agentUserNamesArray of strings(The agent user resource names to get the coaching opportunities for. Format: customers/{customer_id}/users/{user_id})
usecaseNamesArray of strings(Usecase resource names to filter criteria. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
scorecardTemplateNamesArray of strings

The scorecard template resource names. If set, only suggest the coaching opportunities from these templates.

startTimestring(date-time)

the start time of the QA score time range If absent, starts from the last 7 days.

endTimestring(date-time)

the start time of the QA score time range If absent, ends with timestamp now.

opportunityConfigobject(SuggestCoachingOpportunitiesRequestOpportunityConfig)

The configurations of the suggested opportunities.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/coachingOpportunities:suggest' \
  -H 'Content-Type: application/json' \
  -d '{
    "agentUserNames": [
      "string"
    ],
    "usecaseNames": [
      "string"
    ],
    "scorecardTemplateNames": [
      "string"
    ],
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "opportunityConfig": {
      "enabledTypes": [
        "OPPORTUNITY_TYPE_UNSPECIFIED"
      ],
      "avgPerformerOpportunitiesLimit": 0,
      "orgTargetOpportunitiesLimit": 0,
      "downwardTrendOpportunitiesLimit": 0,
      "returnAllCandidates": true
    }
  }'

Responses

A successful response.

Bodyapplication/json
coachingOpportunitiesArray of objects(The reason to back up a criterion due to top performers)

List of coaching opportunities per agent.

Response
application/json
{ "coachingOpportunities": [ {} ] }

Export coaching overviews for all selected agents and time as a csv.

Request

Path
parentstringrequired

Resource name of the parent. Format: customers/{customer_id}/profiles/{profile_id}

Bodyapplication/jsonrequired
agentUserNamesArray of strings(User resource names of the agents to export the coaching overview for. Format: customers/{customer_id}/users/{user_id})
startTimestring(date-time)required

Start time for the export request.

endTimestring(date-time)required

End time for the export request.

includeInactiveUsersboolean(If the result should include deactivated users)
scorecardTemplateNamesArray of strings(Scorecard template names to filter on. Only the stats for the scorecards that are tied to the scorecard templates will be returned. You need to specify the revision id as *. Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id}@*)
groupNamesArray of strings(Group resource names to export the coaching overviews for. Format: customers/{customer_id}/groups/{group_id})
usecaseNamesArray of strings(Usecase resource names to filter the scorecards, conversations, and coaching plans for coaching overviews made optional for backwards compatibilty, is actually required. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
includeDevUsersboolean(If the result should include dev users)
timeZoneIdstring

The time zone of start_time and end_time. If unspecified, UTC is used. The time zone ID is defined by https://cldr.unicode.org/. Falls back to the time_zone_offset if the time_zone_id is not found.

timeZoneOffsetinteger(int32)

The time zone offset of start_time and end_time. If unspecified, UTC is used. The time zone offset is defined as the offset from UTC. For example, UTC+01:00 is defined as 60 minutes. Falls back to UTC if the time_zone_id is not found and time_zone_offset is not set.

requestFromstring(If the request is from Coaching Hub or Coaching Overview)
  • REQUEST_FROM_UNSPECIFIED: Unspecified - do not use.
  • COACHING_OVERVIEW: Request from Coaching Overview
  • COACHING_HUB: Request from Coaching Hub
Default "REQUEST_FROM_UNSPECIFIED"
Enum"REQUEST_FROM_UNSPECIFIED""COACHING_OVERVIEW""COACHING_HUB"
downloadOptionstring(What content to download)
  • DOWNLOAD_OPTION_UNSPECIFIED: Unspecified - do not use
  • DOWNLOAD_OPTION_ALL_SESSION_NOTES: Download all session notes
  • DOWNLOAD_OPTION_ALL_COACHING_OVERVIEWS: Download all coaching overviews
  • DOWNLOAD_OPTION_ALL_SCORECARDS: Download all scorecards
Default "DOWNLOAD_OPTION_UNSPECIFIED"
Enum"DOWNLOAD_OPTION_UNSPECIFIED""DOWNLOAD_OPTION_ALL_SESSION_NOTES""DOWNLOAD_OPTION_ALL_COACHING_OVERVIEWS""DOWNLOAD_OPTION_ALL_SCORECARDS"
includeIndirectGroupMembersboolean(If include indirect group members when the group filter is applied)
includeDirectGroupMembersOnlyboolean(If include direct group members only when the group filter is applied)
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/coachingOverview:export' \
  -H 'Content-Type: application/json' \
  -d '{
    "agentUserNames": [
      "string"
    ],
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "includeInactiveUsers": true,
    "scorecardTemplateNames": [
      "string"
    ],
    "groupNames": [
      "string"
    ],
    "usecaseNames": [
      "string"
    ],
    "includeDevUsers": true,
    "timeZoneId": "string",
    "timeZoneOffset": 0,
    "requestFrom": "REQUEST_FROM_UNSPECIFIED",
    "downloadOption": "DOWNLOAD_OPTION_UNSPECIFIED",
    "includeIndirectGroupMembers": true,
    "includeDirectGroupMembersOnly": true
  }'

Responses

A successful response.

Bodyapplication/json
datastring(byte)required

Csv file blob.

Response
application/json
{ "data": "string" }

List the coaching overviews for the given period and agents

Request

Path
parentstringrequired

Resource name of the parent. Format: customers/{customer_id}/profiles/{profile_id}

Bodyapplication/jsonrequired
agentUserNamesArray of strings(The agent user resource names to get the coaching overviews for. Format: customers/{customer_id}/users/{user_id})
startTimestring(date-time)required

Start time for the scorecards and coaching sessions tied to the active coaching plans. The active coaching plans that have scorecards or sessions during this period will be returned.

endTimestring(date-time)required

End time for the scorecards and coaching sessions tied to the active coaching plans. The active coaching plans that have scorecards or sessions during this period will be returned.

pageTokenstring(Page token)
pageSizeinteger(int32)(Page size)
orderBystring(coachingRetrieveCoachingOverviewsRequestOrderBy)

Enum that denotes the ordering of the coaching overviews.

  • ORDER_BY_UNSPECIFIED: Unspecified order. The default order is by the agent name.
  • ORDER_BY_COACHING_SESSION_ACTIVITY_TIME: Order by coaching session schedule time
  • ORDER_BY_NUM_SCORECARD: Order by number of scorecards
Default "ORDER_BY_UNSPECIFIED"
Enum"ORDER_BY_UNSPECIFIED""ORDER_BY_COACHING_SESSION_ACTIVITY_TIME""ORDER_BY_NUM_SCORECARD"
orderDirectionstring(coachingRetrieveCoachingOverviewsRequestOrderDirection)

Enum that denotes the ordering direction of the coaching overviews.

  • ORDER_DIRECTION_UNSPECIFIED: Unspecified order direction.
  • ORDER_DIRECTION_ASC: Ascending order.
  • ORDER_DIRECTION_DESC: Descending order.
Default "ORDER_DIRECTION_UNSPECIFIED"
Enum"ORDER_DIRECTION_UNSPECIFIED""ORDER_DIRECTION_ASC""ORDER_DIRECTION_DESC"
includeInactiveUsersboolean(If the result should include deactivated users)
scorecardTemplateNamesArray of strings(Scorecard template names to filter on. Only the stats for the scorecards that are tied to the scorecard templates will be returned. You need to specify the revision id as *. Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id}@*)
groupNamesArray of strings(Group resource names to get the coaching overviews for. Format: customers/{customer_id}/groups/{group_id})
usecaseNamesArray of strings(Usecase resource names to filter the scorecards, conversations, and coaching plans for coaching overviews made optional for backwards compatibilty, is actually required. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
includeDevUsersboolean(If the result should include dev users)
ignorePaginationboolean(if the page size should be unlimited)
includeIndirectGroupMembersboolean(If include indirect group members when the group filter is applied)
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/coachingOverview:retrieve' \
  -H 'Content-Type: application/json' \
  -d '{
    "agentUserNames": [
      "string"
    ],
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "pageToken": "string",
    "pageSize": 0,
    "orderBy": "ORDER_BY_UNSPECIFIED",
    "orderDirection": "ORDER_DIRECTION_UNSPECIFIED",
    "includeInactiveUsers": true,
    "scorecardTemplateNames": [
      "string"
    ],
    "groupNames": [
      "string"
    ],
    "usecaseNames": [
      "string"
    ],
    "includeDevUsers": true,
    "ignorePagination": true,
    "includeIndirectGroupMembers": true
  }'

Responses

A successful response.

Bodyapplication/json
coachingOverviewsArray of objects(list of coaching overviews per agent)
nextPageTokenstring(Page token)
Response
application/json
{ "coachingOverviews": [ {} ], "nextPageToken": "string" }