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

List the QA evaluation periods of the scorecard template.

Request

Path
scorecardTemplateNamestringrequired

Resource name of the scorecard template. Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id}

Bodyapplication/jsonrequired
usecaseNamestring(Usecase resource name of the template. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{scorecardTemplateName}:retrieveEvaluationPeriods' \
  -H 'Content-Type: application/json' \
  -d '{
    "usecaseName": "string"
  }'

Responses

A successful response.

Bodyapplication/json
evaluationPeriodsArray of objects(coachingScorecardTemplateEvaluationPeriod)

All evaluation periods for the scorecard template. It reads the evaluation period config in the QATaskConfig.

conversationEvaluationPeriodsArray of objects(coachingConversationEvaluationPeriod)

All overriden evaluation periods from the scorecard template, differ from normal evaluation periods to be able to customize the time range for the conversation suggestion. It reads the override_time_range from evaluation period config in the QATaskConfig. It is sorted so that each period corresponds to the same index in the evaluation_periods.

Response
application/json
{ "evaluationPeriods": [ { … } ], "conversationEvaluationPeriods": [ { … } ] }

Retrieve the total agent quota of the scorecard template from the latest TaskCompleteConfig or the given one.

Request

Path
scorecardTemplateNamestringrequired

Resource name of the scorecard template. Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id}@{scorecard_template_revision_id}"

Bodyapplication/jsonrequired
usecaseNamestring(The usecase name to filter the total agent quota. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
overrideTaskCompleteConfigobject(qaTaskCompleteConfig)

The config to define the task completion.

evaluationPeriodobject(coachingScorecardTemplateEvaluationPeriod)

The evaluation period of the scorecard template.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{scorecardTemplateName}:retrieveTotalAgentQuota' \
  -H 'Content-Type: application/json' \
  -d '{
    "usecaseName": "string",
    "overrideTaskCompleteConfig": {
      "evaluatedConversationCountPerAgent": 0,
      "overriddenAgents": [
        {
          "group": "string",
          "user": "string",
          "evaluatedConversationCountPerAgent": 0
        }
      ]
    },
    "evaluationPeriod": {
      "startTime": "2019-08-24T14:15:22Z",
      "endTime": "2019-08-24T14:15:22Z"
    }
  }'

Responses

A successful response.

Bodyapplication/json
totalAgentQuotainteger(int32)required

The total agent quota.

totalActiveAgentsCountinteger(int32)required

The total count of active agents for the specified scorecardtemplate.

Response
application/json
{ "totalAgentQuota": 0, "totalActiveAgentsCount": 0 }

Update a target

Request

Path
target.namestringrequired

Resource name of a target Format: customers/{customer_id}/profiles/{profile_id}/targets/{target_id}

Query
target.scorecardTemplateNamestringrequired

Resource name of the scorecard template this target is in relation to Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id}.

target.criterionOrChapterIdstring

Criterion or chapter identifier that refers to the corresponding item in the scorecard template's structure. Empty value means the target is for the whole scorecard template.

target.targetnumber(float)required

Target for the given scorecard template, criterion, or chapter. Is a number between 0 and 100 that represents the percentage value for the target.

target.usecaseNamestringrequired

Resource name of the usecase this target belongs to. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id}.

target.coachingPlanNamestring

Resource name of the coaching plan this target is attached to. If attached to a coaching plan, it is an individual target for the coaching plan's agent. All agents' targets should be attached to a coaching plan. Empty value means the target is for the whole organization. Format: customers/{customer_id}/profiles/{profile_id}/coachingPlans/{coaching_plan_id}.

target.createTimestring(date-time)

When the target was created. It's optional for backward compatibility.

target.updateTimestring(date-time)

When the target was updated. It's optional for backward compatibility.

target.qaScorenumber(float)

The QA score of this target's criterion as of update_time.

curl -i -X PATCH \
  'https://{api-domain}.cresta.com/v1/{target.name=customers/*/profiles/*/targets/*}?target.scorecardTemplateName=string&target.target=0.1&target.usecaseName=string'

Responses

A successful response.

Bodyapplication/json
targetobject(v1coachingTarget)

Represents a target for coaching.

Response
application/json
{ "target": { "name": "string", "scorecardTemplateName": "string", "criterionOrChapterId": "string", "target": 0.1, "usecaseName": "string", "coachingPlanName": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "qaScore": 0.1 } }