Lead Routing
Update default (supplement) routing rule
Updates the default / fallback routing rule for the given business type.
Notes:
- BLAST_ALERT and Next_Up strategies are not allowed for ASSISTANT_LEAD.
- When strategyType = DEFAULT_ASSIGNEE and type = AGENT_LEAD, exactly one of assigneeAgentId or assigneeGroupId must be supplied.
- For non-DEFAULT_ASSIGNEE strategies, touchMinutes must be in (0, 1440] and, when > 60, an integer multiple of 60.
Caller must have MANAGE_LEAD_DISTRIBUTION or MANAGE_LEAD_DISTRIBUTION_DEPARTMENT permission.
PUT
/
v1.0
/
routing
/
rule
/
supplement
/
{type}
Update default (supplement) routing rule
curl --request PUT \
--url https://api.lofty.com/v1.0/routing/rule/supplement/{type} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"roleId": 123,
"strategyType": 123,
"touchMinutes": 123,
"assigneeAgentId": 123,
"assigneeGroupId": 123
}
'import requests
url = "https://api.lofty.com/v1.0/routing/rule/supplement/{type}"
payload = {
"roleId": 123,
"strategyType": 123,
"touchMinutes": 123,
"assigneeAgentId": 123,
"assigneeGroupId": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
roleId: 123,
strategyType: 123,
touchMinutes: 123,
assigneeAgentId: 123,
assigneeGroupId: 123
})
};
fetch('https://api.lofty.com/v1.0/routing/rule/supplement/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lofty.com/v1.0/routing/rule/supplement/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => 123,
'strategyType' => 123,
'touchMinutes' => 123,
'assigneeAgentId' => 123,
'assigneeGroupId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v1.0/routing/rule/supplement/{type}"
payload := strings.NewReader("{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v1.0/routing/rule/supplement/{type}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/routing/rule/supplement/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}"
response = http.request(request)
puts response.read_body"ok""<string>""<string>""<string>"Path Parameters
Routing business type.
Available options:
1, 2, 4 Body
application/json
Supplement routing rule payload.
Role id, This parameter is required when type == 4
Strategy type
Only next up and blast alert are affected
Only default assignee are affected
Only default assignee and routing type is AGENT_LEAD are affected
Response
Rule updated.
The response is of type string.
Example:
"ok"
⌘I
Update default (supplement) routing rule
curl --request PUT \
--url https://api.lofty.com/v1.0/routing/rule/supplement/{type} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"roleId": 123,
"strategyType": 123,
"touchMinutes": 123,
"assigneeAgentId": 123,
"assigneeGroupId": 123
}
'import requests
url = "https://api.lofty.com/v1.0/routing/rule/supplement/{type}"
payload = {
"roleId": 123,
"strategyType": 123,
"touchMinutes": 123,
"assigneeAgentId": 123,
"assigneeGroupId": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
roleId: 123,
strategyType: 123,
touchMinutes: 123,
assigneeAgentId: 123,
assigneeGroupId: 123
})
};
fetch('https://api.lofty.com/v1.0/routing/rule/supplement/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lofty.com/v1.0/routing/rule/supplement/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => 123,
'strategyType' => 123,
'touchMinutes' => 123,
'assigneeAgentId' => 123,
'assigneeGroupId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v1.0/routing/rule/supplement/{type}"
payload := strings.NewReader("{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lofty.com/v1.0/routing/rule/supplement/{type}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/routing/rule/supplement/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"roleId\": 123,\n \"strategyType\": 123,\n \"touchMinutes\": 123,\n \"assigneeAgentId\": 123,\n \"assigneeGroupId\": 123\n}"
response = http.request(request)
puts response.read_body"ok""<string>""<string>""<string>"