Skip to content

Commit 624f317

Browse files
Document writing team priority levels on the Preview update endpoint (#626)
1 parent 528b0f2 commit 624f317

1 file changed

Lines changed: 89 additions & 14 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 89 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21325,6 +21325,11 @@ paths:
2132521325
admin_ids:
2132621326
- 493881
2132721327
- 493882
21328+
admin_priority_level:
21329+
primary_admin_ids:
21330+
- 493881
21331+
secondary_admin_ids:
21332+
- 493882
2132821333
schema:
2132921334
"$ref": "#/components/schemas/update_team_members_request"
2133021335
responses:
@@ -21341,6 +21346,13 @@ paths:
2134121346
admin_ids:
2134221347
- 493881
2134321348
- 493882
21349+
admin_priority_level:
21350+
primary_admin_ids:
21351+
- 493881
21352+
secondary_admin_ids:
21353+
- 493882
21354+
assignment_limit: 10
21355+
distribution_method: load_balanced
2134421356
schema:
2134521357
"$ref": "#/components/schemas/team"
2134621358
'400':
@@ -21361,8 +21373,24 @@ paths:
2136121373
request_id: 1c9d6f0b-7a24-4b8e-9f31-3e5a2c6b8d70
2136221374
errors:
2136321375
- code: parameter_invalid
21364-
message: Only admin_ids can be updated on a team, but the request
21365-
changed name
21376+
message: Only admin_ids and admin_priority_level can be updated
21377+
on a team, but the request changed name
21378+
Priority level names someone off the team:
21379+
value:
21380+
type: error.list
21381+
request_id: 0d3a7e51-9c62-4b18-8f74-6a2e5c1b9d38
21382+
errors:
21383+
- code: parameter_invalid
21384+
message: admin_priority_level names 814865, which is on neither
21385+
the team nor admin_ids
21386+
Priority level given twice:
21387+
value:
21388+
type: error.list
21389+
request_id: 7f4b2a90-1e58-4c63-9a07-3d6f8b2e5c14
21390+
errors:
21391+
- code: parameter_invalid
21392+
message: admin_priority_level gives 493881 more than one priority
21393+
level
2136621394
schema:
2136721395
"$ref": "#/components/schemas/error"
2136821396
'403':
@@ -26918,6 +26946,29 @@ components:
2691826946
- 814865
2691926947
items:
2692026948
type: integer
26949+
admin_priority_level_request:
26950+
title: Admin Priority Level Request
26951+
type: object
26952+
nullable: true
26953+
description: The priority levels to set, naming only the teammates whose level
26954+
is being set
26955+
properties:
26956+
primary_admin_ids:
26957+
type: array
26958+
description: The ids of the teammates to make primary members of the team
26959+
nullable: true
26960+
example:
26961+
- 493881
26962+
items:
26963+
type: integer
26964+
secondary_admin_ids:
26965+
type: array
26966+
description: The ids of the teammates to make secondary members of the team
26967+
nullable: true
26968+
example:
26969+
- 493882
26970+
items:
26971+
type: integer
2692126972
admin_reply_conversation_request:
2692226973
title: Admin Reply
2692326974
type: object
@@ -39352,6 +39403,16 @@ components:
3935239403
type: integer
3935339404
admin_priority_level:
3935439405
"$ref": "#/components/schemas/admin_priority_level"
39406+
assignment_limit:
39407+
type: integer
39408+
nullable: true
39409+
description: The assignment limit for the team. This field is only present when the team's distribution type is load balanced.
39410+
example: 10
39411+
distribution_method:
39412+
type: string
39413+
nullable: true
39414+
description: Describes how assignments are distributed among the team members
39415+
example: "round_robin"
3935539416
team_list:
3935639417
title: Team List
3935739418
type: object
@@ -40706,18 +40767,30 @@ components:
4070640767
the request completes, not a list of changes to apply. Any teammate currently
4070740768
on the team but absent from `admin_ids` is removed.
4070840769

40709-
Membership is the only part of a team this endpoint writes, and the request is
40710-
read from the body: a parameter sent in the query string is rejected rather than
40711-
applied. A team read from the API can be sent back whole, since the other fields
40712-
of the representation are accepted as long as they are unchanged. Trying to
40713-
change one of them returns a 400 rather than being ignored, as does any field a
40714-
team does not have.
40715-
40716-
On a team that balances assignment across its members, teammates already on the
40717-
team keep their current priority level and teammates being added join as primary
40718-
members. Priority levels cannot be set here, so `admin_priority_level` follows
40719-
from `admin_ids`: it is accepted when sent back unchanged and returns a 400 when
40720-
the request tries to change it.
40770+
The team's members and their priority levels are the only parts of a team this
40771+
endpoint writes, and the request is read from the body: a parameter sent in the
40772+
query string is rejected rather than applied. A team read from the API can be sent
40773+
back whole, since the other fields of the representation are accepted as long as
40774+
they are unchanged. Trying to change one of them returns a 400 rather than being
40775+
ignored, as does any field a team does not have.
40776+
40777+
`admin_priority_level` sets which teammates take work first. It is optional, and
40778+
names only the teammates whose level the request is setting: a teammate it leaves
40779+
out keeps the level they already have, and one joining the team without a level
40780+
named becomes a primary member. A level named for a teammate the request removes is
40781+
ignored, so a team read from the API can still be sent back whole with only
40782+
`admin_ids` changed.
40783+
40784+
Naming an id that is on neither the team nor `admin_ids` returns a 400. So does
40785+
naming the same id at both levels, unless the team really does hold that teammate
40786+
at both: a read reports that shape, and sending it back settles them at a single
40787+
level rather than being refused.
40788+
40789+
Only a team whose `distribution_method` is `load_balanced` can have secondary
40790+
members, so `secondary_admin_ids` returns a 400 on any other team.
40791+
`primary_admin_ids` is accepted on every team, but a team that does not balance
40792+
assignment does not report `admin_priority_level` back and does not use the levels
40793+
to decide who work goes to.
4072140794
type: object
4072240795
title: Update Team Members Request Payload
4072340796
properties:
@@ -40730,6 +40803,8 @@ components:
4073040803
example:
4073140804
- 493881
4073240805
- 493882
40806+
admin_priority_level:
40807+
"$ref": "#/components/schemas/admin_priority_level_request"
4073340808
required:
4073440809
- admin_ids
4073540810
update_ticket_request:

0 commit comments

Comments
 (0)