--- title: "Routing Config" slug: "server-api-ticketing-routing-config" updated: 2022-06-16T07:32:21Z published: 2022-06-16T07:32:21Z canonical: "developer.comm100.com/server-api-ticketing-routing-config" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Routing Config ## Routing Config Config of ticketing routing. - `Routing Config` - Routing Config Manage - `GET ticketing/routingConfig` - [Get a single Routing Config](/docs/server-api-ticketing-routing-config#get-a-single-routing-config) - `POST ticketing/routingConfig:disable` - [Disable the Routing Config](/docs/server-api-ticketing-routing-config#disable-the-routing-config) - `POST ticketing/routingConfig:enable` - [Enable the Routing Config](/docs/server-api-ticketing-routing-config#enable-the-routing-config) - `PUT ticketing/routingConfig` - [Update the Routing Config](/docs/server-api-ticketing-routing-config#update-the-routing-config) ### Routing Config JSON Format Routing Config is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `isEnabled` | bool | Whether the Routing rule is enabled or not. | | `type` | string | How to route tickets. Allowed values are "simple", "customRules". | | `routeToTypeForSimpleRouting` | string | How to route tickets when route type is simple. Allowed values are "agent", "department". | | `simpleRoutingRouteToAgentId` | guid | Id of agent whom the ticket is assigned to when routing tickets to agent. | | `simpleRoutingRouteToDepartmentId` | guid | Id of department that the ticket is assigned to when routing tickets to department. | | `priorityForSimpleRouting` | string | Priority for routing tickets when route type is simple. Allowed values are "urgent", "high", "normal", "low". | | `percentageToBotWhenOnline` | integer | Percentage of tickets to be routed to bot when agent is online. | | `percentageToBotWhenOffline` | integer | Percentage of tickets to be routed to bot when agent is offline. | | `routeToTypeWhenNoRuleMatched` | string | How to route tickets when no custom rule matches. Allowed values are "agent", "department". | | `noRuleMatchedRouteToAgentId` | guid | Id of agent whom the ticket is assigned to when no custom rule matches. | | `noRuleMatchedRouteToDepartmentId` | guid | Id of department which the ticket is assigned to when no custom rule matches. | | `priorityWhenNoRuleMatched` | string | Priority of ticket when no custom rule matches. Allowed values are "urgent", "high", "normal", "low". | | `percentageToBotWhenOnlineWhenNoRuleMatched` | integer | Percentage of tickets to be routed to bot when agent is online and no rules matched. | | `percentageToBotWhenOfflineWhenNoRuleMatched` | integer | Percentage of tickets to be routed to bot when agent is offline and no rules matched. | | `routingRules` | [routingRules[]](/docs/server-api-ticketing-routing-config#routing-rules-json-format) | Reference to Routing Rules. | ### Routing Rules JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the custom rule. | | `name` | string | Name of the custom rule. | | `isEnabled` | bool | Whether custom rule is enabled or not. | | `order` | integer | Order of custom rule. | | `conditionMetType` | string | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `logicalExpression` | string | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `routeToType` | string | How to route tickets. Allowed values are "agent", "department". | | `routeToAgentId` | guid | Id of agent whom the ticket is assigned to. | | `routeToDepartmentId` | guid | Id of department that the ticket is assigned to. | | `priority` | string | Priority of routing tickets. Allowed values are "urgent", "high", "normal", "low". | | `percentageToBotWhenOnline` | integer | Percentage of routing to bot when there is agent online. | | `percentageToBotWhenOffline` | integer | Percentage of routing to bot when all agents are offline. | | `routingRuleConditions` | [routingRuleConditions[]](/docs/server-api-ticketing-routing-config#routing-rule-condition-json-format) | Reference to Routing Rule Condition. | ### Routing Rule Condition JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the custom rule condition. | | `routingRuleId` | guid | Id of the custom rule. | | `fieldName` | string | Name of the ticketing field you want to set value for. | | `operator` | string | How value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn". | | `value` | string | Value of the condition field. | | `order` | integer | Order of the field. | | `description` | string | Description of the custom rule condition. | ### Get a single Routing Config `GET ticketing/routingConfig` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "ticketingRoutingRule". | - #### Response: [Routing Config](/docs/server-api-ticketing-routing-config#routing-config-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/routingConfig \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "isEnabled": true, "type": "simple", "routeToTypeForSimpleRouting": "agent", "simpleRoutingRouteToAgentId": "9e7b03e6-e4b8-4026-ba5c-5863e482e87c", "simpleRoutingRouteToDepartmentId": "80e1220e-19d2-4ad8-abcf-becb8e3a8155", "priorityForSimpleRouting": "normal", "percentageToBotWhenOnline": 100, "percentageToBotWhenOffline": 100, "routeToTypeWhenNoRuleMatched": "agent", "noRuleMatchedRouteToAgentId": "be488667-e2bc-4335-b094-fc7ea8cc19d9", "noRuleMatchedRouteToDepartmentId": "96e7964a-29cb-40d6-8251-4f334b5748bd", "priorityWhenNoRuleMatched": "high", "percentageToBotWhenOnlineWhenNoRuleMatched": 100, "percentageToBotWhenOfflineWhenNoRuleMatched": 0, "routingRules": [ { "id": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "name": "custom rules 1", "isEnabled": false, "order": 1, "conditionMetType": "all", "logicalExpression": "", "routeToType": "agent", "routeToAgentId": "52c14ca6-a63f-40a4-8f78-83b96b11a362", "routeToDepartmentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "priority": "urgent", "percentageToBotWhenOnline": 50, "percentageToBotWhenOffline": 50, "routingRuleConditions": [ { "id": "6cab0a7a-e497-4344-807e-9362399d1096", "routingRuleId": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "fieldName": "{!Ticket.@Mentioned Agent}", "operator": "isOneOf", "value": "[\"be488667-e2bc-4335-b094-fc7ea8cc19d9\",\"b13e222d-4832-4198-9f17-83e5612fa9da\"]", "order": 1, "description": "@Mentioned Agent is oden3 1000014 or oden2 1000014" } ] } ] } ``` ### Disable the Routing Config `POST ticketing/routingConfig:disable` - #### Parameters: No Parameters - #### Response: [Routing Config](/docs/server-api-ticketing-routing-config#routing-config-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/routingConfig:disable \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "isEnabled": false, "type": "simple", "routeToTypeForSimpleRouting": "agent", "simpleRoutingRouteToAgentId": "9e7b03e6-e4b8-4026-ba5c-5863e482e87c", "simpleRoutingRouteToDepartmentId": "80e1220e-19d2-4ad8-abcf-becb8e3a8155", "priorityForSimpleRouting": "normal", "percentageToBotWhenOnline": 100, "percentageToBotWhenOffline": 100, "routeToTypeWhenNoRuleMatched": "agent", "noRuleMatchedRouteToAgentId": "be488667-e2bc-4335-b094-fc7ea8cc19d9", "noRuleMatchedRouteToDepartmentId": "96e7964a-29cb-40d6-8251-4f334b5748bd", "priorityWhenNoRuleMatched": "high", "percentageToBotWhenOnlineWhenNoRuleMatched": 100, "percentageToBotWhenOfflineWhenNoRuleMatched": 0, "routingRules": [ { "id": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "name": "custom rules 1", "isEnabled": false, "order": 1, "conditionMetType": "all", "logicalExpression": "", "routeToType": "agent", "routeToAgentId": "52c14ca6-a63f-40a4-8f78-83b96b11a362", "routeToDepartmentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "priority": "urgent", "percentageToBotWhenOnline": 50, "percentageToBotWhenOffline": 50, "routingRuleConditions": [ { "id": "6cab0a7a-e497-4344-807e-9362399d1096", "routingRuleId": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "fieldName": "{!Ticket.@Mentioned Agent}", "operator": "isOneOf", "value": "[\"be488667-e2bc-4335-b094-fc7ea8cc19d9\",\"b13e222d-4832-4198-9f17-83e5612fa9da\"]", "order": 1, "description": "@Mentioned Agent is oden3 1000014 or oden2 1000014" } ] } ] } ``` ### Enable the Routing Config `POST ticketing/routingConfig:enable` - #### Parameters: No Parameters - #### Response: [Routing Config](/docs/server-api-ticketing-routing-config#routing-config-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/routingConfig:enable \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "isEnabled": true, "type": "simple", "routeToTypeForSimpleRouting": "agent", "simpleRoutingRouteToAgentId": "9e7b03e6-e4b8-4026-ba5c-5863e482e87c", "simpleRoutingRouteToDepartmentId": "80e1220e-19d2-4ad8-abcf-becb8e3a8155", "priorityForSimpleRouting": "normal", "percentageToBotWhenOnline": 100, "percentageToBotWhenOffline": 100, "routeToTypeWhenNoRuleMatched": "agent", "noRuleMatchedRouteToAgentId": "be488667-e2bc-4335-b094-fc7ea8cc19d9", "noRuleMatchedRouteToDepartmentId": "96e7964a-29cb-40d6-8251-4f334b5748bd", "priorityWhenNoRuleMatched": "high", "percentageToBotWhenOnlineWhenNoRuleMatched": 100, "percentageToBotWhenOfflineWhenNoRuleMatched": 0, "routingRules": [ { "id": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "name": "custom rules 1", "isEnabled": false, "order": 1, "conditionMetType": "all", "logicalExpression": "", "routeToType": "agent", "routeToAgentId": "52c14ca6-a63f-40a4-8f78-83b96b11a362", "routeToDepartmentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "priority": "urgent", "percentageToBotWhenOnline": 50, "percentageToBotWhenOffline": 50, "routingRuleConditions": [ { "id": "6cab0a7a-e497-4344-807e-9362399d1096", "routingRuleId": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "fieldName": "{!Ticket.@Mentioned Agent}", "operator": "isOneOf", "value": "[\"be488667-e2bc-4335-b094-fc7ea8cc19d9\",\"b13e222d-4832-4198-9f17-83e5612fa9da\"]", "order": 1, "description": "@Mentioned Agent is oden3 1000014 or oden2 1000014" } ] } ] } ``` ### Update the Routing Config `PUT ticketing/routingConfig` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isEnabled` | bool | body | yes | Whether the Routing rule is enabled or not. | | `type` | string | body | yes | How to route tickets. Allowed values are "simple", "customRules". | | `routeToTypeForSimpleRouting` | string | body | yes | How to route tickets when route type is simple. Allowed values are "agent", "department". | | `simpleRoutingRouteToAgentId` | guid | body | yes | Id of agent whom the ticket is assigned to when routing tickets to agent. | | `simpleRoutingRouteToDepartmentId` | guid | body | yes | Id of department that the ticket is assigned to when routing tickets to department. | | `priorityForSimpleRouting` | string | body | yes | Priority for routing tickets when route type is simple. Allowed values are "urgent", "high", "normal", "low". | | `percentageToBotWhenOnline` | integer | body | no | Percentage of tickets to be routed to bot when agent is online. | | `percentageToBotWhenOffline` | integer | body | no | Percentage of tickets to be routed to bot when agent is offline. | | `routeToTypeWhenNoRuleMatched` | string | body | yes | How to route tickets when no custom rule matches. Allowed values are "agent", "department". | | `noRuleMatchedRouteToAgentId` | guid | body | yes | Id of agent whom the ticket is assigned to when no custom rule matches. | | `noRuleMatchedRouteToDepartmentId` | guid | body | yes | Id of department which the ticket is assigned to when no custom rule matches. | | `priorityWhenNoRuleMatched` | string | body | yes | Priority of ticket when no custom rule matches. Allowed values are "urgent", "high", "normal", "low". | | `percentageToBotWhenOnlineWhenNoRuleMatched` | integer | body | yes | Percentage of tickets to be routed to bot when agent is online and no rules matched. | | `percentageToBotWhenOfflineWhenNoRuleMatched` | integer | body | yes | Percentage of tickets to be routed to bot when agent is offline and no rules matched. | | `routingRules` | [routingRules[]](/docs/server-api-ticketing-routing-config#routing-rules-json-format) | body | no | Settings of routing rule. | - #### Response: [Routing Config](/docs/server-api-ticketing-routing-config#routing-config-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/routingConfig \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"isEnabled":true,"type":"simple","routeToTypeForSimpleRouting":"agent","simpleRoutingRouteToAgentId":"9e7b03e6-e4b8-4026-ba5c-5863e482e87c","simpleRoutingRouteToDepartmentId":"80e1220e-19d2-4ad8-abcf-becb8e3a8155","priorityForSimpleRouting":"normal","percentageToBotWhenOnline":100,"percentageToBotWhenOffline":100,"routeToTypeWhenNoRuleMatched":"agent","noRuleMatchedRouteToAgentId":"be488667-e2bc-4335-b094-fc7ea8cc19d9","noRuleMatchedRouteToDepartmentId":"96e7964a-29cb-40d6-8251-4f334b5748bd","priorityWhenNoRuleMatched":"high","percentageToBotWhenOnlineWhenNoRuleMatched":100,"percentageToBotWhenOfflineWhenNoRuleMatched":0,"routingRules":[{"name":"custom rules 1","isEnabled":false,"order":1,"conditionMetType":"all","logicalExpression":"","routeToType":"agent","routeToAgentId":"52c14ca6-a63f-40a4-8f78-83b96b11a362","routeToDepartmentId":"bdf96bad-890f-4af5-8f4e-42d2cc29e61b","priority":"urgent","percentageToBotWhenOnline":50,"percentageToBotWhenOffline":50,"routingRuleConditions":[{"fieldName":"{!Ticket.@Mentioned Agent}","operator":"isOneOf","value":"[\"be488667-e2bc-4335-b094-fc7ea8cc19d9\",\"b13e222d-4832-4198-9f17-83e5612fa9da\"]","order":1,"description":"@Mentioned Agent is oden3 1000014 or oden2 1000014"}]}]}' ``` Response: HTTP/1.1 200 OK ``` { "isEnabled": true, "type": "simple", "routeToTypeForSimpleRouting": "agent", "simpleRoutingRouteToAgentId": "9e7b03e6-e4b8-4026-ba5c-5863e482e87c", "simpleRoutingRouteToDepartmentId": "80e1220e-19d2-4ad8-abcf-becb8e3a8155", "priorityForSimpleRouting": "normal", "percentageToBotWhenOnline": 100, "percentageToBotWhenOffline": 100, "routeToTypeWhenNoRuleMatched": "agent", "noRuleMatchedRouteToAgentId": "be488667-e2bc-4335-b094-fc7ea8cc19d9", "noRuleMatchedRouteToDepartmentId": "96e7964a-29cb-40d6-8251-4f334b5748bd", "priorityWhenNoRuleMatched": "high", "percentageToBotWhenOnlineWhenNoRuleMatched": 100, "percentageToBotWhenOfflineWhenNoRuleMatched": 0, "routingRules": [ { "id": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "name": "custom rules 1", "isEnabled": false, "order": 1, "conditionMetType": "all", "logicalExpression": "", "routeToType": "agent", "routeToAgentId": "52c14ca6-a63f-40a4-8f78-83b96b11a362", "routeToDepartmentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "priority": "urgent", "percentageToBotWhenOnline": 50, "percentageToBotWhenOffline": 50, "routingRuleConditions": [ { "id": "6cab0a7a-e497-4344-807e-9362399d1096", "routingRuleId": "9bdbfda6-ec89-490c-957b-6555bf5a8461", "fieldName": "{!Ticket.@Mentioned Agent}", "operator": "isOneOf", "value": "[\"be488667-e2bc-4335-b094-fc7ea8cc19d9\",\"b13e222d-4832-4198-9f17-83e5612fa9da\"]", "order": 1, "description": "@Mentioned Agent is oden3 1000014 or oden2 1000014" } ] } ] } ```