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

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

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