MCP Tool: create_team_routing_rule

Creates a new routing rule for a specific team. Routing rules determine how tickets are automatically assigned and routed within the team based on various conditions and criteria.

Example Prompt

Create a routing rule for team T88WCYYHPS named "High Priority Tickets" that routes to team T99WCYYHPS

Input Parameters

NameTypeRequiredDescription
teamIdstringYesThe ID of the team to create a routing rule for
namestringYesThe name of the routing rule group
resultTeamIdstringYesThe ID of the team that tickets will be routed to
descriptionstringNoThe description of the routing rule group
evaluationOrdernumberNoThe order in which this rule should be evaluated
andRulesstring[]NoRules that must all match (AND condition)
orRulesstring[]NoRules where any match is sufficient (OR condition)

Response Fields

The response will contain the created routing rule with the same structure as the get_team_routing_rules tool:
FieldTypeDescription
idstringRouting rule unique ID
namestringRouting rule name
descriptionstringRouting rule description
teamIdstringTeam ID this rule belongs to
evaluationOrdernumberPriority/order for rule evaluation
resultTeamIdstringTarget team ID for routing
fallbackTeamIdstringFallback team ID if primary routing fails
andRulesarrayArray of AND conditions (all must match)
orRulesarrayArray of OR conditions (any can match)
createdBystringName of user who created the rule
createdByIdstringID of user who created the rule
createdAtstring (ISO8601)Creation timestamp
updatedAtstring (ISO8601)Last update timestamp

Sample Response

{
  "data": {
    "id": "RR001",
    "name": "High Priority Tickets",
    "description": "Route high priority tickets to senior team",
    "teamId": "T88WCYYHPS",
    "evaluationOrder": 1,
    "resultTeamId": "T99WCYYHPS",
    "fallbackTeamId": null,
    "andRules": [
      {
        "field": "priority",
        "operator": "EQUALS",
        "value": "high",
        "precedence": 1
      },
      {
        "field": "status",
        "operator": "NOT_EQUALS",
        "value": "closed",
        "precedence": 2
      }
    ],
    "orRules": [
      {
        "field": "account",
        "operator": "CONTAINS",
        "value": "enterprise",
        "precedence": 1
      }
    ],
    "createdBy": "John Doe",
    "createdById": "USER123",
    "createdAt": "2025-07-25T12:50:38.937Z",
    "updatedAt": "2025-07-25T12:50:38.937Z"
  },
  "status": true,
  "message": "Team routing rule created successfully!",
  "timestamp": "2025-07-25T12:50:38.937Z"
}