Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create triage rule

Ordered auto-delegate rules evaluated on inbound records (lead, intake_item, customer, deal, issue, support_ticket). Rules run in sortOrder then createdAt order; the first match wins and the evaluation is logged to /triage/evaluations.

POST/workspaces/{organizationId}/triage/rules
Path parameters
organizationIdstringrequired
Request body
application/json
namestringrequired
min length 1
recordTypestringrequired
Allowed:leadintake_itemcustomerdealissuesupport_ticket
isActiveboolean
sortOrderinteger
conditionsobjectrequired
Show properties
keywordsstring[]
sourcesstring[]
channelsstring[]
customerDomainsstring[]
teamIdsstring[]
labelIdsstring[]
prioritiesstring[]
statusesstring[]
fieldsobject[]
Show properties
Array of object
fieldstringrequired
min length 1
equalsstring | number | boolean
Show properties
Any of:
string
string
number
number
boolean
boolean
actionobjectrequired
Show properties
One of:
object
typestringrequired
Allowed:delegate
agentIdstringrequired
min length 1
teamIdstring
templateIdstring
titlestring
statusstring
Allowed:triagebacklogtodoin_progressdonecanceled
prioritystring
Allowed:lowmediumhighurgent
labelIdsstring[]
repostring
instructionsstring
dispatchboolean
object
typestringrequired
Allowed:set_status
statusstringrequired
min length 1
Responses
201

Rule created

ruleobjectrequired
Show properties
idstringrequired
organizationIdstringrequired
namestringrequired
recordTypestringrequired
Allowed:leadintake_itemcustomerdealissuesupport_ticket
isActivebooleanrequired
sortOrdernumberrequired
conditionsobjectrequired
Show properties
keywordsstring[]
sourcesstring[]
channelsstring[]
customerDomainsstring[]
teamIdsstring[]
labelIdsstring[]
prioritiesstring[]
statusesstring[]
fieldsobject[]
Show properties
Array of object
fieldstringrequired
min length 1
equalsstring | number | boolean
Show properties
Any of:
string
string
number
number
boolean
boolean
actionobjectrequired
Show properties
One of:
object
typestringrequired
Allowed:delegate
agentIdstringrequired
min length 1
teamIdstring
templateIdstring
titlestring
statusstring
Allowed:triagebacklogtodoin_progressdonecanceled
prioritystring
Allowed:lowmediumhighurgent
labelIdsstring[]
repostring
instructionsstring
dispatchboolean
object
typestringrequired
Allowed:set_status
statusstringrequired
min length 1
createdAtstringrequired
updatedAtstringrequired
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST '/workspaces/string/triage/rules' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "recordType": "lead",
  "isActive": true,
  "sortOrder": 0,
  "conditions": {
    "keywords": [
      "string"
    ],
    "sources": [
      "string"
    ],
    "channels": [
      "string"
    ],
    "customerDomains": [
      "string"
    ],
    "teamIds": [
      "string"
    ],
    "labelIds": [
      "string"
    ],
    "priorities": [
      "string"
    ],
    "statuses": [
      "string"
    ],
    "fields": [
      {
        "field": "string",
        "equals": "string"
      }
    ]
  },
  "action": {
    "type": "delegate",
    "agentId": "string",
    "teamId": "string",
    "templateId": "string",
    "title": "string",
    "status": "triage",
    "priority": "low",
    "labelIds": [
      "string"
    ],
    "repo": "string",
    "instructions": "string",
    "dispatch": true
  }
}'
Response
{
  "rule": {
    "id": "string",
    "organizationId": "string",
    "name": "string",
    "recordType": "lead",
    "isActive": true,
    "sortOrder": 0,
    "conditions": {
      "keywords": [
        "string"
      ],
      "sources": [
        "string"
      ],
      "channels": [
        "string"
      ],
      "customerDomains": [
        "string"
      ],
      "teamIds": [
        "string"
      ],
      "labelIds": [
        "string"
      ],
      "priorities": [
        "string"
      ],
      "statuses": [
        "string"
      ],
      "fields": [
        {
          "field": "string",
          "equals": "string"
        }
      ]
    },
    "action": {
      "type": "delegate",
      "agentId": "string",
      "teamId": "string",
      "templateId": "string",
      "title": "string",
      "status": "triage",
      "priority": "low",
      "labelIds": [
        "string"
      ],
      "repo": "string",
      "instructions": "string",
      "dispatch": true
    },
    "createdAt": "string",
    "updatedAt": "string"
  }
}

Was this page helpful?