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

Create a scorecard.

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired

Scorecard resource to be created.

namestring(Resource name of a scorecard Format: customers/{customer_id}/profiles/{profile_id}/scorecards/{scorecard_id})
conversationNamestring(Resource name of the conversation this scorecard is attached to Format customers/{customer_id}/profiles/{profile_id}/conversations/{conversation_id})required
agentUserNamestring(Resource name of the agent user this scorecard is for. Format: customers/{customer_id}/users/{user_id})required
creatorobject(User is a user entity for the cresta product Next ID: 32)
templateNamestring(Resource name of the scorecard template this scorecard is created from. Format customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id})required
commentstring

Comment left for the scorecard.

totalScorenumber(float)

Total score of the scorecard in percentage. It's -1 when the score is N/A, otherwise the value is between 0 and 100.

scoresArray of objects(coachingScore)required

A list of scores for each criterion in the scorecard.

scores[].​criterionIdstringrequired

Id of the criterion in the scorecard template this score refers to.

scores[].​criterionDisplayNamestring

The display name of the criterion.

scores[].​chapterIdstring

The chapter of the scorecard.

scores[].​numericValuenumber(float)

Numeric score for the given criterion. Either there is a numeric_value, text_value, or it is not_applicable.

scores[].​textValuestring

Text evaluation for the given criterion. Either there is a numeric_value, text_value, or it is not_applicable.

scores[].​commentstring(Comment left for the criterion. The purpose of the comment depents on the type of its associated scorecard. It could be used to appeal reason or resolve reason)
scores[].​notApplicablebooleanrequired

True if the criterion is marked as can not be scored for the given conversation, false otherwise. Either there is a numeric_value, text_value, or it is not_applicable.

scores[].​aiValuenumber(float)

The score given by auto scoring to the criterion.

scores[].​aiScoredboolean

True if the criterion was scored automatically, false otherwise.

scores[].​autoFailedboolean

True if one of the scores matches the auto failed criteria defined in the template.

scores[].​commentAccessRolesArray of strings(Roles that can view the comment)
Items Enum"ROLE_UNSPECIFIED""AGENT""MANAGER""ADMIN""SUPER_ADMIN""USER_ADMIN""CI_ADMIN""QA_ADMIN""QA_SPECIALIST""OPERA_ADMIN"
createTimestring(date-time)required

Creation time of this scorecard.

updateTimestring(date-time)required

Last update timestamp for this scorecard.

submitTimestring(date-time)

Submit time for the scorecard.

aiScoreTimestring(date-time)

Timestamp the ai scoring happened at.

manuallyScoredboolean(True if the scorecard has been manually scored, even partially, false otherwise. This means that scorecards in draft status have manually_scored = true)
autoFailedboolean

True if one of the scores matches the auto failed criteria defined in the template.

usecaseNamestring(Resource name of the usecase this scorecard belongs to. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})
updatedByobject(User is a user entity for the cresta product Next ID: 32)
submittedByobject(User is a user entity for the cresta product Next ID: 32)
calibratedScorecardNamestring(If the scorecard is a calibration scorecard, this is the original scorecard name. Format: customers/{customer_id}/profiles/{profile_id}/scorecards/{scorecard_id})
calibrationConsistencyScorenumber(float)

If the scorecard is a calibration scorecard, this is the consistency score between the original scorecard and it.

processInteractionTimestring(date-time)(Timestamp when the agent has acknowledged the scorecard)
processIdstring

The external ID for the process scorecard.

submissionSourcestring(Represents where the scorecard submitted from)
  • SCORECARD_SUBMISSION_SOURCE_UNSPECIFIED: Unspecified source
  • SCORECARD_SUBMISSION_SOURCE_CLOSED_CONVERSATIONS: Submitted from closed conversations page
  • SCORECARD_SUBMISSION_SOURCE_QM_TASK_HOME: Submitted from QM task home page
  • SCORECARD_SUBMISSION_SOURCE_LIVE_CONVERSATIONS: Submitted from live conversations page
Default "SCORECARD_SUBMISSION_SOURCE_UNSPECIFIED"
Enum"SCORECARD_SUBMISSION_SOURCE_UNSPECIFIED""SCORECARD_SUBMISSION_SOURCE_CLOSED_CONVERSATIONS""SCORECARD_SUBMISSION_SOURCE_QM_TASK_HOME""SCORECARD_SUBMISSION_SOURCE_LIVE_CONVERSATIONS"
scorecardTypestring(The types of a scorecard)
  • SCORECARD_TYPE_UNSPECIFIED: Unspecified. For backward compatibility, all scorecards created by QA for conversations of processes are of this type
  • SCORECARD_TYPE_APPEAL_ORIGINAL_REPLICA: A scorecard represents a replica of an scorecard of type SCORECARD_TYPE_UNSPECIFIED It holds the values of the original scorecards as of when it is created and will not be updated even when the original scorecard is updated.
  • SCORECARD_TYPE_APPEAL_REQUEST: A scorecard represents an appeal request
  • SCORECARD_TYPE_APPEAL_RESOLVE: A scorecard represents a resolve of an appeal request
  • SCORECARD_TYPE_GROUP_CALIBRATION_ANSWER_KEY: A scorecard represents a group calibration answer key
  • SCORECARD_TYPE_GROUP_CALIBRATION_RESPONSE: A scorecard represents a group calibration response of a QA analyst
Default "SCORECARD_TYPE_UNSPECIFIED"
Enum"SCORECARD_TYPE_UNSPECIFIED""SCORECARD_TYPE_APPEAL_ORIGINAL_REPLICA""SCORECARD_TYPE_APPEAL_REQUEST""SCORECARD_TYPE_APPEAL_RESOLVE""SCORECARD_TYPE_GROUP_CALIBRATION_ANSWER_KEY""SCORECARD_TYPE_GROUP_CALIBRATION_RESPONSE"
referenceScorecardIdstring(The ID of a scorecard that current scorecard refers to. For a scorecard of type SCORECARD_TYPE_UNSPECIFIED, it's empty For a scorecard of type SCORECARD_TYPE_APPEAL_ORIGINAL_REPLICA, it's the ID of a SCORECARD_TYPE_UNSPECIFIED scorecard For a scorecard of type SCORECARD_TYPE_APPEAL_REQUEST, it's the ID of a SCORECARD_TYPE_APPEAL_ORIGINAL_REPLICA scorecard For a scorecard of type SCORECARD_TYPE_APPEAL_RESOLVE, it's the ID of a SCORECARD_TYPE_APPEAL_REQUEST scorecard)
scorecardWorkflowsArray of objects(Scorecard workflow)

Workflows of a scorecard, like appeals, calibrations, etc.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/scorecards' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "conversationName": "string",
    "agentUserName": "string",
    "creator": {
      "name": "string",
      "userId": "string",
      "username": "string",
      "email": "string",
      "displayName": "string",
      "fullName": "string",
      "isDevUser": true,
      "roles": [
        "ROLE_UNSPECIFIED"
      ],
      "legacyRoles": [
        "ROLE_UNSPECIFIED"
      ],
      "agentProfiles": [
        {
          "agentProfileId": 0,
          "agentExtension": "string",
          "legacy": {
            "platformLoginName": "string",
            "platformUserId": "string"
          }
        }
      ],
      "team": "string",
      "state": "ACTIVE_STATE_UNSPECIFIED",
      "loginStatus": {
        "loginStatus": "LOGIN_STATUS_UNSPECIFIED"
      },
      "manager": "string",
      "externalIdmId": "string",
      "platformProfiles": [
        {
          "platformType": "PLATFORM_TYPE_UNSPECIFIED",
          "platformId": "string",
          "agentExtension": "string",
          "liveperson": {
            "accountNumber": "string",
            "loginName": "string"
          },
          "cisco": {
            "agentExtension": "string"
          },
          "userFeatureGate": {
            "teleportFeatures": {
              "enableScreenRecordingSamplingOverride": true,
              "userScreenRecordingSamplingPercent": 0
            }
          }
        }
      ],
      "isGuestUser": true,
      "type": "USER_TYPE_UNSPECIFIED",
      "profileNames": [
        "string"
      ],
      "usecases": [
        "string"
      ],
      "profileStates": {
        "property1": "PROFILE_STATE_UNSPECIFIED",
        "property2": "PROFILE_STATE_UNSPECIFIED"
      },
      "preferredProfile": "string",
      "authenticationFactors": [
        {
          "id": "string",
          "label": "string",
          "type": "TYPE_UNSPECIFIED",
          "enrollmentTime": "2019-08-24T14:15:22Z",
          "name": "string"
        }
      ],
      "requirePasswordReset": true,
      "migratedEntities": [
        "MIGRATABLE_ENTITY_UNSPECIFIED"
      ]
    },
    "templateName": "string",
    "comment": "string",
    "totalScore": 0.1,
    "scores": [
      {
        "criterionId": "string",
        "criterionDisplayName": "string",
        "chapterId": "string",
        "numericValue": 0.1,
        "textValue": "string",
        "comment": "string",
        "notApplicable": true,
        "aiValue": 0.1,
        "aiScored": true,
        "autoFailed": true,
        "commentAccessRoles": [
          "ROLE_UNSPECIFIED"
        ]
      }
    ],
    "createTime": "2019-08-24T14:15:22Z",
    "updateTime": "2019-08-24T14:15:22Z",
    "submitTime": "2019-08-24T14:15:22Z",
    "aiScoreTime": "2019-08-24T14:15:22Z",
    "manuallyScored": true,
    "autoFailed": true,
    "usecaseName": "string",
    "updatedBy": {
      "name": "string",
      "userId": "string",
      "username": "string",
      "email": "string",
      "displayName": "string",
      "fullName": "string",
      "isDevUser": true,
      "roles": [
        "ROLE_UNSPECIFIED"
      ],
      "legacyRoles": [
        "ROLE_UNSPECIFIED"
      ],
      "agentProfiles": [
        {
          "agentProfileId": 0,
          "agentExtension": "string",
          "legacy": {
            "platformLoginName": "string",
            "platformUserId": "string"
          }
        }
      ],
      "team": "string",
      "state": "ACTIVE_STATE_UNSPECIFIED",
      "loginStatus": {
        "loginStatus": "LOGIN_STATUS_UNSPECIFIED"
      },
      "manager": "string",
      "externalIdmId": "string",
      "platformProfiles": [
        {
          "platformType": "PLATFORM_TYPE_UNSPECIFIED",
          "platformId": "string",
          "agentExtension": "string",
          "liveperson": {
            "accountNumber": "string",
            "loginName": "string"
          },
          "cisco": {
            "agentExtension": "string"
          },
          "userFeatureGate": {
            "teleportFeatures": {
              "enableScreenRecordingSamplingOverride": true,
              "userScreenRecordingSamplingPercent": 0
            }
          }
        }
      ],
      "isGuestUser": true,
      "type": "USER_TYPE_UNSPECIFIED",
      "profileNames": [
        "string"
      ],
      "usecases": [
        "string"
      ],
      "profileStates": {
        "property1": "PROFILE_STATE_UNSPECIFIED",
        "property2": "PROFILE_STATE_UNSPECIFIED"
      },
      "preferredProfile": "string",
      "authenticationFactors": [
        {
          "id": "string",
          "label": "string",
          "type": "TYPE_UNSPECIFIED",
          "enrollmentTime": "2019-08-24T14:15:22Z",
          "name": "string"
        }
      ],
      "requirePasswordReset": true,
      "migratedEntities": [
        "MIGRATABLE_ENTITY_UNSPECIFIED"
      ]
    },
    "submittedBy": {
      "name": "string",
      "userId": "string",
      "username": "string",
      "email": "string",
      "displayName": "string",
      "fullName": "string",
      "isDevUser": true,
      "roles": [
        "ROLE_UNSPECIFIED"
      ],
      "legacyRoles": [
        "ROLE_UNSPECIFIED"
      ],
      "agentProfiles": [
        {
          "agentProfileId": 0,
          "agentExtension": "string",
          "legacy": {
            "platformLoginName": "string",
            "platformUserId": "string"
          }
        }
      ],
      "team": "string",
      "state": "ACTIVE_STATE_UNSPECIFIED",
      "loginStatus": {
        "loginStatus": "LOGIN_STATUS_UNSPECIFIED"
      },
      "manager": "string",
      "externalIdmId": "string",
      "platformProfiles": [
        {
          "platformType": "PLATFORM_TYPE_UNSPECIFIED",
          "platformId": "string",
          "agentExtension": "string",
          "liveperson": {
            "accountNumber": "string",
            "loginName": "string"
          },
          "cisco": {
            "agentExtension": "string"
          },
          "userFeatureGate": {
            "teleportFeatures": {
              "enableScreenRecordingSamplingOverride": true,
              "userScreenRecordingSamplingPercent": 0
            }
          }
        }
      ],
      "isGuestUser": true,
      "type": "USER_TYPE_UNSPECIFIED",
      "profileNames": [
        "string"
      ],
      "usecases": [
        "string"
      ],
      "profileStates": {
        "property1": "PROFILE_STATE_UNSPECIFIED",
        "property2": "PROFILE_STATE_UNSPECIFIED"
      },
      "preferredProfile": "string",
      "authenticationFactors": [
        {
          "id": "string",
          "label": "string",
          "type": "TYPE_UNSPECIFIED",
          "enrollmentTime": "2019-08-24T14:15:22Z",
          "name": "string"
        }
      ],
      "requirePasswordReset": true,
      "migratedEntities": [
        "MIGRATABLE_ENTITY_UNSPECIFIED"
      ]
    },
    "calibratedScorecardName": "string",
    "calibrationConsistencyScore": 0.1,
    "processInteractionTime": "2019-08-24T14:15:22Z",
    "processId": "string",
    "submissionSource": "SCORECARD_SUBMISSION_SOURCE_UNSPECIFIED",
    "scorecardType": "SCORECARD_TYPE_UNSPECIFIED",
    "referenceScorecardId": "string",
    "scorecardWorkflows": [
      {
        "appealWorkflows": [
          {
            "replicaScorecard": {},
            "appealRequestScorecard": {},
            "appealResolveScorecard": {}
          }
        ]
      }
    ]
  }'

Responses

A successful response.

Bodyapplication/json
scorecardobject(Represents a scorecard. Next ID: 29)
Response
application/json
{ "scorecard": { "name": "string", "conversationName": "string", "agentUserName": "string", "creator": { … }, "templateName": "string", "comment": "string", "totalScore": 0.1, "scores": [ … ], "coachingPlanNames": [ … ], "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "submitTime": "2019-08-24T14:15:22Z", "aiScoreTime": "2019-08-24T14:15:22Z", "manuallyScored": true, "autoFailed": true, "acknowledgeTime": "2019-08-24T14:15:22Z", "acknowledgeComment": "string", "usecaseName": "string", "updatedBy": { … }, "submittedBy": { … }, "calibratedScorecardName": "string", "calibrationConsistencyScore": 0.1, "processInteractionTime": "2019-08-24T14:15:22Z", "processId": "string", "submissionSource": "SCORECARD_SUBMISSION_SOURCE_UNSPECIFIED", "scorecardType": "SCORECARD_TYPE_UNSPECIFIED", "referenceScorecardId": "string", "scorecardWorkflows": [ … ] } }

Export scorecards as a csv file.

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 scorecards of. Format: customers/{customer_id}/users/{user_id})
startTimestring(date-time)required

Earliest timestamp that the exported scorecards could be created.

endTimestring(date-time)required

Latest timestamp that the exported scorecards could be created.

scorecardNamesArray of strings(Scorecard resource names of the scorecards you want to export. Ignored when empty Format: customers/{customer_id}/profiles/{profile_id}/scorecards/{scorecard_id})
teamNamesArray of strings(Team resource names of the agents to export the scorecards of Format: customers/{customer_id}/teams/{team_id})
includeDeactivatedUsersboolean(If the export 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 of the agents to export the scorecards of Format: customers/{customer_id}/groups/{group_id})
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})
includeDevUsersboolean(If the export 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.

excludeConversationMetadataboolean(If the export should exclude the conversation metadata)
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)
featuresArray of strings(ExportScorecardsRequestEnabledFeatures)

If absent, all features will be enabled.

Items Enum"ENABLED_FEATURES_UNSPECIFIED""ENABLED_FEATURES_BASE""ENABLED_FEATURES_AGENT_EMAIL_COLUMN"
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/scorecards:export' \
  -H 'Content-Type: application/json' \
  -d '{
    "agentUserNames": [
      "string"
    ],
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "scorecardNames": [
      "string"
    ],
    "teamNames": [
      "string"
    ],
    "includeDeactivatedUsers": true,
    "scorecardTemplateNames": [
      "string"
    ],
    "groupNames": [
      "string"
    ],
    "usecaseNames": [
      "string"
    ],
    "includeDevUsers": true,
    "timeZoneId": "string",
    "timeZoneOffset": 0,
    "excludeConversationMetadata": true,
    "includeIndirectGroupMembers": true,
    "includeDirectGroupMembersOnly": true,
    "features": [
      "ENABLED_FEATURES_UNSPECIFIED"
    ]
  }'

Responses

A successful response.

Bodyapplication/json
datastring(byte)required

The csv file blob.

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

Create a target

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired

Target to be created

namestring(Resource name of a target Format: customers/{customer_id}/profiles/{profile_id}/targets/{target_id})
scorecardTemplateNamestring(Resource name of the scorecard template this target is in relation to Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id})required
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.

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.

usecaseNamestring(Resource name of the usecase this target belongs to. Format: customers/{customer_id}/profiles/{profile_id}/usecases/{usecase_id})required
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})
createTimestring(date-time)

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

updateTimestring(date-time)

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

qaScorenumber(float)(The QA score of this target's criterion as of update_time)
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/targets' \
  -H 'Content-Type: application/json' \
  -d '{
    "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
  }'

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 } }