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

List all the scorecards for the given criteria. Also including the related templates in the response.

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.

agentUserNamestring

Resource name of the agent to get the scorecards for. Format: customers/{customer_id}/users/{user_id}.

coachingPlanNamesArray of strings

Resource names of the coaching plans that the scorecards should be in Format: customers/{customer_id}/profiles/{profile_id}/coachingPlans/{coaching_plan_id}.

conversationNamesArray of strings

The resource names for the conversations to get the scorecards of. Format: customers/{customer_id}/profiles/{profile_id}/conversations/{conversation_id}.

startSubmitTimestring(date-time)

Oldest submit time the scorecards can have.

endSubmitTimestring(date-time)

Latest submit time the scorecards can have.

startUpdateTimestring(date-time)

Oldest update time the scorecards can have.

endUpdateTimestring(date-time)

Latest update time the scorecards can have.

creatorUserNamesArray of strings

Resource names of the creators the scorecards can be created by.

submitterUserNamesArray of strings

Resource names of the users the scorecards are submitted by.

templateNamestring

Resource name of the scorecard template of which to get the scorecards.

orderBystring

What to order the response by.

  • SCORECARD_ORDER_BY_UNSPECIFIED: Unspecified - do not used.
  • CREATE_TIME: Order by the create time.
  • SUBMIT_TIME: Order by the submit time.
  • SCORE: Order by the score.
Default "SCORECARD_ORDER_BY_UNSPECIFIED"
Enum"SCORECARD_ORDER_BY_UNSPECIFIED""CREATE_TIME""SUBMIT_TIME""SCORE"
sortOrderstring

The order of the sort (ASC, DESC).

  • SORT_ORDER_UNSPECIFIED: Unspecified - do not use.
  • ASC: Ascending order.
  • DESC: Descending order.
Default "SORT_ORDER_UNSPECIFIED"
Enum"SORT_ORDER_UNSPECIFIED""ASC""DESC"
scorecardViewstring

Indication which data of the scorecards to be included.

  • SCORECARD_VIEW_UNSPECIFIED: The default / unset value. The API will default to the BASIC view.
  • BASIC: Include only data about the scorecard, but not the related collections. (e.g. no scores)
  • FULL: Include everything - e.g, scores, templates, and coaching plan names.
Default "SCORECARD_VIEW_UNSPECIFIED"
Enum"SCORECARD_VIEW_UNSPECIFIED""BASIC""FULL"
usecaseNamesArray of strings

Usecase resource names to filter the scorecards Will work with only a single usecase, field is made repeated for future proofness. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id}.

includeCalibrationScorecardsboolean

Enables it to include the calibration scorecards in the response.

agentUserNamesArray of strings

Resource names of the agent users to get the scorecards for. Is OR'ed with group_names. Format: customers/{customer_id}/users/{user_id}.

groupNamesArray of strings

Resource names of the groups to get the scorecards for. Is OR'ed with agent_user_names. Format: customers/{customer_id}/groups/{group_id}.

scorecardNamesArray of strings

Resource names of the scorecards should be in Format: customers/{customer_id}/profiles/{profile_id}/scorecards/{scorecard_id}.

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

Responses

A successful response.

Bodyapplication/json
scorecardsArray of objects(Represents a scorecard. Next ID: 29)read-only

Retrieved scorecards.

templatesArray of objects(Retrieved scorecard templates related to the retrieved scorecards. (-- api-linter: core::0132::response-unknown-fields=disabled --))read-only
nextPageTokenstring

Next page token for paging.

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