Add a Call Routing Rule
Description
You can use this API to add a call routing rule.
Requested Payload:
- and_criteria (Mandatory): To add an additional condition and criteria to the call routing rule. You can specify a group of or_criteria within the and_criteria.
- or_criteria : Specifies a set of criteria containing the comparator, values and field name ie., you can provide more than one criteria and the rule will execute if the visitor matches any of the given criteria.
- field_name : Fields that you set to filter the visitor who matches the rule.
- comparator : The comparator strings for that specific rule you have set is used to match the values (eg: Contains, Equals to, etc.)
- values : The values that you have defined for each field that the visitor should obtain to match the rule.
Note: You can find the values of these keys in the criteria of the fields section.
- userset : To notify the list of users who matches the rule to a specific operator.
- department_ids : To list the department IDs
- operator_ids : To list the operator IDs
- dynamic_users : To specify the details of the user ( whether the user is a CRM attender / Last available attender / All available users.)
- app_id : To embed the id of the website.
- routing_type : The type of routing rule you have set to route your website visitors call.
- id: Unique Id that specifies the call routing rule.
OAuth Scope:
callroutingrules.CREATE
URL:
Copiedhttps://salesiq.zoho.com/api/v2/{screenname}/callroutingrulesExample
Copiedhttps://salesiq.zoho.com/api/v2/zylker/callroutingrules
Payload
Copied{
"app_id":"44000000000047",
"title":"Zylker-campaigns",
"and_criteria":[
{
{
"field_name":"campaign_medium",
"values":["orset 1"],
"comparator":"contains"
}
]
}
],
"routing_type":"route_to_selected_users",
"userset":[
{
"operator_ids":[
"44000000018001"
],
"department_ids":[
],
"dynamic_users":[
]
}
]
}Sample Response
Copied{
"url": "/api/v2/zylker/callroutingrules",
"object": "call_routing_rule",
"data": {
"modified_time": 1546845430168,
"id": 44000000014017,
"routed_count": "5",
"attended_count": "1",
"enabled": true,
"last_routed_time": "1546846597340",
"position": 29,
"creator": {
"id": 44000000000005
},
"app_id": 44000000000047,
"title": "zylker-campaigns",
"created_time": 1546688046412,
"missed_count": "4",
"and_criteria": [
{
"or_criteria": [
{
"field_name": "campaign_medium",
"values": [
"orset 1"
],
"comparator": "contains"
}
]
}
],
"routing_type": "route_to_selected_users",
"userset": [
{
"operator_ids": [
"44000000018001"
],
"department_ids": [],
"dynamic_users": []
}
],
"condition": "at_least_one_user_online"
}
}