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

Trigger backfill of scorecard templates.

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired
configobject(coachingBackfillScorecardTemplatesConfig)

Configuration for backfilling scorecard templates.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/scorecardTemplates:backfill' \
  -H 'Content-Type: application/json' \
  -d '{
    "config": {
      "scorecardTemplates": [
        "string"
      ],
      "startTime": "2019-08-24T14:15:22Z",
      "endTime": "2019-08-24T14:15:22Z"
    }
  }'

Responses

A successful response.

Bodyapplication/json
jobstring(Resource name of the created backfilling job. Format: customers/{customer_id}/profiles/{profile_id}/jobs/{job_id})required
Response
application/json
{ "job": "string" }

Get the latest revisions of the scorecard templates.

Request

Path
parentstringrequired

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

Query
agentUserNamestring

Resource name of the agent user that should be in the audience of the scorecard template. Format: customers/{customer_id}/users/{user_id}.

includeDeletedboolean

Whether to include the deleted scorecard templates in the response.

triggersArray of strings

List of moment template resource names that the returned scorecard templates should have as a trigger. These names are OR'd together for the filter. Format: customers/{customer_id}/profiles/{profile_id}/moments/{moment_template_id}.

includeDeactivatedboolean

Whether to include the deactivated scorecard templates in the response. Deactivated templates are not included by default.

usecaseNamesArray of strings

Usecase resource names to filter the scorecard templates Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id}.

viewstring

Partial response view to return.

  • VIEW_UNSPECIFIED: Unspecified view, defaults to VIEW_BASIC_WITHOUT_STATS.
  • VIEW_BASIC_WITHOUT_STATS: Returns current templates without scorecard stats (stats will be 0).
  • VIEW_FULL_WITH_STATS: Returns current templates with stats about scorecards with the template.

WARNING: This is very expensive to compute. Do not use this by default.

Default "VIEW_UNSPECIFIED"
Enum"VIEW_UNSPECIFIED""VIEW_BASIC_WITHOUT_STATS""VIEW_FULL_WITH_STATS"
typesArray of strings

List of types to filter the scorecard templates.

  • SCORECARD_TEMPLATE_TYPE_UNSPECIFIED: Unspecified
  • SCORECARD_TEMPLATE_TYPE_CONVERSATION: The template defines the scorecards on conversations.
  • SCORECARD_TEMPLATE_TYPE_PROCESS: The template defines the scorecards on processes.
Items Enum"SCORECARD_TEMPLATE_TYPE_UNSPECIFIED""SCORECARD_TEMPLATE_TYPE_CONVERSATION""SCORECARD_TEMPLATE_TYPE_PROCESS"
curl -i -X GET \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/scorecardTemplates:current'

Responses

A successful response.

Bodyapplication/json
currentScorecardTemplatesArray of objects(Represents a scorecard template with additional info attached)required

Retrieved scorecards.

currentScorecardTemplates[].​scorecardTemplateobject(Coaching Scorecard Template Next ID: 16)
currentScorecardTemplates[].​autoScoredCountinteger(int32)required

Number of auto scored scorecards that are created from this template in the last week.

currentScorecardTemplates[].​manuallyScoredCountinteger(int32)required

Number of manually scored scorecards that are created from this template in the last week.

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

Validate the configuration for a backfill of scorecard templates.

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired
configobject(coachingBackfillScorecardTemplatesConfig)

Configuration for backfilling scorecard templates.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/scorecardTemplates:validateBackfill' \
  -H 'Content-Type: application/json' \
  -d '{
    "config": {
      "scorecardTemplates": [
        "string"
      ],
      "startTime": "2019-08-24T14:15:22Z",
      "endTime": "2019-08-24T14:15:22Z"
    }
  }'

Responses

A successful response.

Bodyapplication/json
conversationsCountinteger(int32)required

Number of conversations to be processed.

scorecardTemplateDetailsobjectrequired

Validation details for each scorecard template. Key is the scorecard template resource name (including revision).

scorecardTemplateDetails.​property name*object(ValidateBackfillScorecardTemplatesResponseScorecardTemplateDetails)additional property

Validation details for a scorecard template.

Response
application/json
{ "conversationsCount": 0, "scorecardTemplateDetails": { "property1": {}, "property2": {} } }