Routing Config
  • 16 Jun 2022
  • 6 Minutes to read
  • Dark
    Light

Routing Config

  • Dark
    Light

Article summary

Routing Config

Config of ticketing routing.

Routing Config JSON Format

Routing Config is represented as simple flat JSON objects with the following keys:

NameTypeDescription
isEnabledboolWhether the Routing rule is enabled or not.
typestringHow to route tickets. Allowed values are "simple", "customRules".
routeToTypeForSimpleRoutingstringHow to route tickets when route type is simple. Allowed values are "agent", "department".
simpleRoutingRouteToAgentIdguidId of agent whom the ticket is assigned to when routing tickets to agent.
simpleRoutingRouteToDepartmentIdguidId of department that the ticket is assigned to when routing tickets to department.
priorityForSimpleRoutingstringPriority for routing tickets when route type is simple. Allowed values are "urgent", "high", "normal", "low".
percentageToBotWhenOnlineintegerPercentage of tickets to be routed to bot when agent is online.
percentageToBotWhenOfflineintegerPercentage of tickets to be routed to bot when agent is offline.
routeToTypeWhenNoRuleMatchedstringHow to route tickets when no custom rule matches. Allowed values are "agent", "department".
noRuleMatchedRouteToAgentIdguidId of agent whom the ticket is assigned to when no custom rule matches.
noRuleMatchedRouteToDepartmentIdguidId of department which the ticket is assigned to when no custom rule matches.
priorityWhenNoRuleMatchedstringPriority of ticket when no custom rule matches. Allowed values are "urgent", "high", "normal", "low".
percentageToBotWhenOnlineWhenNoRuleMatchedintegerPercentage of tickets to be routed to bot when agent is online and no rules matched.
percentageToBotWhenOfflineWhenNoRuleMatchedintegerPercentage of tickets to be routed to bot when agent is offline and no rules matched.
routingRulesroutingRules[]Reference to Routing Rules.

Routing Rules JSON Format:

NameTypeDescription
idguidId of the custom rule.
namestringName of the custom rule.
isEnabledboolWhether custom rule is enabled or not.
orderintegerOrder of custom rule.
conditionMetTypestringHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
logicalExpressionstringLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
routeToTypestringHow to route tickets. Allowed values are "agent", "department".
routeToAgentIdguidId of agent whom the ticket is assigned to.
routeToDepartmentIdguidId of department that the ticket is assigned to.
prioritystringPriority of routing tickets. Allowed values are "urgent", "high", "normal", "low".
percentageToBotWhenOnlineintegerPercentage of routing to bot when there is agent online.
percentageToBotWhenOfflineintegerPercentage of routing to bot when all agents are offline.
routingRuleConditionsroutingRuleConditions[]Reference to Routing Rule Condition.

Routing Rule Condition JSON Format:

NameTypeDescription
idguidId of the custom rule condition.
routingRuleIdguidId of the custom rule.
fieldNamestringName of the ticketing field you want to set value for.
operatorstringHow value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn".
valuestringValue of the condition field.
orderintegerOrder of the field.
descriptionstringDescription of the custom rule condition.

Get a single Routing Config

GET ticketing/routingConfig

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "ticketingRoutingRule".
  • Response:

Routing Config

  • 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

  • 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

  • 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:

NameTypeinRequiredDescription
isEnabledboolbodyyesWhether the Routing rule is enabled or not.
typestringbodyyesHow to route tickets. Allowed values are "simple", "customRules".
routeToTypeForSimpleRoutingstringbodyyesHow to route tickets when route type is simple. Allowed values are "agent", "department".
simpleRoutingRouteToAgentIdguidbodyyesId of agent whom the ticket is assigned to when routing tickets to agent.
simpleRoutingRouteToDepartmentIdguidbodyyesId of department that the ticket is assigned to when routing tickets to department.
priorityForSimpleRoutingstringbodyyesPriority for routing tickets when route type is simple. Allowed values are "urgent", "high", "normal", "low".
percentageToBotWhenOnlineintegerbodynoPercentage of tickets to be routed to bot when agent is online.
percentageToBotWhenOfflineintegerbodynoPercentage of tickets to be routed to bot when agent is offline.
routeToTypeWhenNoRuleMatchedstringbodyyesHow to route tickets when no custom rule matches. Allowed values are "agent", "department".
noRuleMatchedRouteToAgentIdguidbodyyesId of agent whom the ticket is assigned to when no custom rule matches.
noRuleMatchedRouteToDepartmentIdguidbodyyesId of department which the ticket is assigned to when no custom rule matches.
priorityWhenNoRuleMatchedstringbodyyesPriority of ticket when no custom rule matches. Allowed values are "urgent", "high", "normal", "low".
percentageToBotWhenOnlineWhenNoRuleMatchedintegerbodyyesPercentage of tickets to be routed to bot when agent is online and no rules matched.
percentageToBotWhenOfflineWhenNoRuleMatchedintegerbodyyesPercentage of tickets to be routed to bot when agent is offline and no rules matched.
routingRulesroutingRules[]bodynoSettings of routing rule.
  • Response:

Routing Config

  • 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"
              }
          ]
      }
  ]
} 

Was this article helpful?

What's Next