Pular para o conteúdo

PUT /v1/departments/distribution-rules

PUT
/v1/departments/distribution-rules
curl --request PUT \
--url https://seu-endereco-da-api/v1/departments/distribution-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rules": [ { "filter": {}, "conditions": {}, "departmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ownerFieldKey": "example" } ] }'

Permissão que a Chave de acesso precisa: Gerenciar departamentos (departments:manage).

Media typeapplication/json
object
rules
required
Array<object>
<= 50 items
object
filter
required
object
key
additional properties
any
conditions
object
key
additional properties
any
departmentId
string format: uuid
ownerFieldKey
string
>= 1 characters

Example generated

{
"rules": [
{
"filter": {},
"conditions": {},
"departmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"ownerFieldKey": "example"
}
]
}
Media typeapplication/json
Array<object>
object
id
required
string
position
required

The first rule, in this order, whose filter matches the contact decides where the ticket opens

number
filter
required

Contact filter in the same dialect as the contact list

object
key
additional properties
any
conditions
required

How the screen drew the filter, kept so it can be redrawn

object
key
additional properties
any
departmentId
required

Null when the rule sends the ticket to the user in ownerFieldKey

string
nullable
ownerFieldKey
required

Key of a contact field of type USER: the ticket goes to that user, or to his first department while he is offline or at his conversation limit

string
nullable

Example generated

[
{
"id": "example",
"position": 1,
"filter": {},
"conditions": {},
"departmentId": "example",
"ownerFieldKey": "example"
}
]

A destination department does not exist

The rules were saved at the same time by someone else