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 a list of coaching comments.

Request

Path
parentstringrequired

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

Query
pageSizeinteger(int32)

Page size for the response.

pageTokenstring

The next page token for paging.

threadIdsArray of strings

Filter to comments belonging to a specific thread.

coachingPlanNamesArray of strings

Filter to comments belonging to a specific coaching plan Format: customers/{customer_id}/profiles/{profile_id}/coachingPlans/{coaching_plan_id}.

usecaseNamesArray of strings

Usecase resource names to filter the coaching sessions Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id} Made optional for backwards compatibilty, is actually required. Will work with only a single usecase, field is made repeated for future proofness.

curl -i -X GET \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/coachingComments'

Responses

A successful response.

Bodyapplication/json
coachingCommentsArray of objects(A coaching comment Next ID: 11)read-only

The requested coaching comments resources.

nextPageTokenstringread-only

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Response
application/json
{ "coachingComments": [ {} ], "nextPageToken": "string" }

Create a coaching comment

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired

The coaching comment to be created.

namestring(Resource name for the coaching comment Format: customers/{customer_id}/profiles/{profile_id}/coachingComments/{comment_id})
threadstring(The thread id that the comment belongs to. Optional, the server will generate a new thread id if not provided)
creatorUserNamestring(Resource name for the creator of this coaching comment. Format: customers/{customer_id}/users/{user_id})required
coachingPlanNamestring(Resource name of the coaching plan this coaching comment belongs to. Format: customers/{customer_id}/profiles/{profile_id}/coachingPlans/{coaching_plan_id})
usecaseNamestring(Resource name of the usecase this coaching comment belongs to. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
createTimestring(date-time)required

Timestamp for when the coaching comment is created.

updateTimestring(date-time)required

Timestamp for when the coaching comment is last updated.

messagestringrequired

The content of the comment.

taggedUsersArray of strings(Users tagged in the comment. Format: ['customers/{customer_id}/users/{user_id}', ...])
linkedSessionNotesArray of strings

Linked session notes in the comment.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/coachingComments' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "thread": "string",
    "creatorUserName": "string",
    "coachingPlanName": "string",
    "usecaseName": "string",
    "createTime": "2019-08-24T14:15:22Z",
    "updateTime": "2019-08-24T14:15:22Z",
    "message": "string",
    "taggedUsers": [
      "string"
    ],
    "linkedSessionNotes": [
      "string"
    ]
  }'

Responses

A successful response.

Bodyapplication/json
coachingCommentobject(A coaching comment Next ID: 11)
Response
application/json
{ "coachingComment": { "name": "string", "thread": "string", "creatorUserName": "string", "coachingPlanName": "string", "usecaseName": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "message": "string", "taggedUsers": [], "linkedSessionNotes": [] } }

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": [ {} ] }