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

List targets

Request

Path
parentstringrequired

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

Bodyapplication/jsonrequired
scorecardTemplateNamesArray of strings(Scorecard template names to filter on for targets. Format: customers/{customer_id}/profiles/{profile_id}/scorecardTemplates/{scorecard_template_id})
agentNamesArray of strings(Agent names to filter on Format: customers/{customer_id}/users/{user_id})
coachingPlanNamesArray of strings(Coaching plan names to filter on Format: customers/{customer_id}/profiles/{profile_id}/coachingPlans/{coaching_plan_id})
filterOrgGoalsboolean

Whether to only return the org goals. The org goals are the overall targets in the org which are not set on any specific agents or coaching plans. It raises errors when either agent_names or coaching_plan_names are also set.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*}/targets:list' \
  -H 'Content-Type: application/json' \
  -d '{
    "scorecardTemplateNames": [
      "string"
    ],
    "agentNames": [
      "string"
    ],
    "coachingPlanNames": [
      "string"
    ],
    "filterOrgGoals": true
  }'

Responses

A successful response.

Bodyapplication/json
targetsArray of objects(Returned targets)
Response
application/json
{ "targets": [ {} ] }

Update an individual scorecard

Request

Path
scorecard.namestringrequired

Resource name of a scorecard Format: customers/{customer_id}/profiles/{profile_id}/scorecards/{scorecard_id}

Bodyapplication/jsonrequired
scorecardobject(Represents a scorecard. Next ID: 29)
curl -i -X PATCH \
  'https://{api-domain}.cresta.com/v1/{scorecard.name=customers/*/profiles/*/scorecards/*}' \
  -H 'Content-Type: application/json' \
  -d '{
    "scorecard": {
      "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": [] } }