Preview a Freshdesk config
curl --request POST \
--url https://api.statisfy.com/v1/integrations/freshdesk/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"customer_resolution": [
{
"column": "<string>",
"abbreviations": {},
"custom_field_key": "<string>",
"cutoff": 123,
"exclude_keywords": [
"<string>"
],
"field_to_parse": "<string>",
"value_transform": {
"regex_extract": "<string>",
"skip_if_contains": "<string>",
"skip_if_equals": "<string>",
"split_first_token": "<string>",
"strip_prefix": "<string>"
}
}
]
},
"tickets": [
{}
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/freshdesk/preview"
payload = {
"config": { "customer_resolution": [
{
"column": "<string>",
"abbreviations": {},
"custom_field_key": "<string>",
"cutoff": 123,
"exclude_keywords": ["<string>"],
"field_to_parse": "<string>",
"value_transform": {
"regex_extract": "<string>",
"skip_if_contains": "<string>",
"skip_if_equals": "<string>",
"split_first_token": "<string>",
"strip_prefix": "<string>"
}
}
] },
"tickets": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
customer_resolution: [
{
column: '<string>',
abbreviations: {},
custom_field_key: '<string>',
cutoff: 123,
exclude_keywords: ['<string>'],
field_to_parse: '<string>',
value_transform: {
regex_extract: '<string>',
skip_if_contains: '<string>',
skip_if_equals: '<string>',
split_first_token: '<string>',
strip_prefix: '<string>'
}
}
]
},
tickets: [{}]
})
};
fetch('https://api.statisfy.com/v1/integrations/freshdesk/preview', 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.statisfy.com/v1/integrations/freshdesk/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'customer_resolution' => [
[
'column' => '<string>',
'abbreviations' => [
],
'custom_field_key' => '<string>',
'cutoff' => 123,
'exclude_keywords' => [
'<string>'
],
'field_to_parse' => '<string>',
'value_transform' => [
'regex_extract' => '<string>',
'skip_if_contains' => '<string>',
'skip_if_equals' => '<string>',
'split_first_token' => '<string>',
'strip_prefix' => '<string>'
]
]
]
],
'tickets' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.statisfy.com/v1/integrations/freshdesk/preview"
payload := strings.NewReader("{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.statisfy.com/v1/integrations/freshdesk/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/freshdesk/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"match_rate": 123,
"tickets": [
{}
],
"warnings": [
"<string>"
]
}integrations
Preview a Freshdesk config
A dry run on the tickets /sample-tickets returned: every step of the draft chain for every ticket, the step that won and the account. Calls nothing and writes nothing. A chain the save would refuse is a 422. A step whose value is a list of more than 20 items, or that would go past the preview’s 100 account lookups, is not run: its error is TooManyValues.
POST
/
v1
/
integrations
/
freshdesk
/
preview
Preview a Freshdesk config
curl --request POST \
--url https://api.statisfy.com/v1/integrations/freshdesk/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"customer_resolution": [
{
"column": "<string>",
"abbreviations": {},
"custom_field_key": "<string>",
"cutoff": 123,
"exclude_keywords": [
"<string>"
],
"field_to_parse": "<string>",
"value_transform": {
"regex_extract": "<string>",
"skip_if_contains": "<string>",
"skip_if_equals": "<string>",
"split_first_token": "<string>",
"strip_prefix": "<string>"
}
}
]
},
"tickets": [
{}
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/freshdesk/preview"
payload = {
"config": { "customer_resolution": [
{
"column": "<string>",
"abbreviations": {},
"custom_field_key": "<string>",
"cutoff": 123,
"exclude_keywords": ["<string>"],
"field_to_parse": "<string>",
"value_transform": {
"regex_extract": "<string>",
"skip_if_contains": "<string>",
"skip_if_equals": "<string>",
"split_first_token": "<string>",
"strip_prefix": "<string>"
}
}
] },
"tickets": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
customer_resolution: [
{
column: '<string>',
abbreviations: {},
custom_field_key: '<string>',
cutoff: 123,
exclude_keywords: ['<string>'],
field_to_parse: '<string>',
value_transform: {
regex_extract: '<string>',
skip_if_contains: '<string>',
skip_if_equals: '<string>',
split_first_token: '<string>',
strip_prefix: '<string>'
}
}
]
},
tickets: [{}]
})
};
fetch('https://api.statisfy.com/v1/integrations/freshdesk/preview', 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.statisfy.com/v1/integrations/freshdesk/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'customer_resolution' => [
[
'column' => '<string>',
'abbreviations' => [
],
'custom_field_key' => '<string>',
'cutoff' => 123,
'exclude_keywords' => [
'<string>'
],
'field_to_parse' => '<string>',
'value_transform' => [
'regex_extract' => '<string>',
'skip_if_contains' => '<string>',
'skip_if_equals' => '<string>',
'split_first_token' => '<string>',
'strip_prefix' => '<string>'
]
]
]
],
'tickets' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.statisfy.com/v1/integrations/freshdesk/preview"
payload := strings.NewReader("{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.statisfy.com/v1/integrations/freshdesk/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/freshdesk/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"customer_resolution\": [\n {\n \"column\": \"<string>\",\n \"abbreviations\": {},\n \"custom_field_key\": \"<string>\",\n \"cutoff\": 123,\n \"exclude_keywords\": [\n \"<string>\"\n ],\n \"field_to_parse\": \"<string>\",\n \"value_transform\": {\n \"regex_extract\": \"<string>\",\n \"skip_if_contains\": \"<string>\",\n \"skip_if_equals\": \"<string>\",\n \"split_first_token\": \"<string>\",\n \"strip_prefix\": \"<string>\"\n }\n }\n ]\n },\n \"tickets\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"match_rate": 123,
"tickets": [
{}
],
"warnings": [
"<string>"
]
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
application/json
Was this page helpful?