Create a CRM integration
curl --request POST \
--url https://app.herondata.io/api/crm_integrations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"auth": {},
"config": {
"child_file_filtering_enabled": true,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": [
"<string>"
],
"external_lookup_fields_or": [
"<string>"
],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": true,
"regex_remove": "pattern",
"required": true,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": false,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": false,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"secret": "<string>",
"failure_notification_channel": "<string>",
"is_enabled": true,
"is_live": true
}
'import requests
url = "https://app.herondata.io/api/crm_integrations"
payload = {
"auth": {},
"config": {
"child_file_filtering_enabled": True,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": ["<string>"],
"external_lookup_fields_or": ["<string>"],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": True,
"regex_remove": "pattern",
"required": True,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": False,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": False,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"secret": "<string>",
"failure_notification_channel": "<string>",
"is_enabled": True,
"is_live": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auth: {},
config: {
child_file_filtering_enabled: true,
data_source_accounts_config: {
external_name: 'Account',
key: 'Account',
description: 'A company or person',
external_lookup_config: {
external_lookup_fields_and: ['<string>'],
external_lookup_fields_or: ['<string>'],
sort_field_name: 'CreatedDate'
},
field_mappings: [
{
field_name: 'Name',
external_lookup_field_name: '<string>',
external_object_name_for_id: 'Account',
heron_company_attribute_label: 'owner_1_first_name',
max_length: 255,
overwrite_on_update: true,
regex_remove: 'pattern',
required: true,
static_value: 'static value',
value_mapping_name: 'state',
value_type: 'Text'
}
],
is_optional: false,
required_ids: [{external_name: 'Account', alias: 'Company'}],
static_data: [{key: 'status', value: 'active'}]
},
default_id: {external_name: 'Account', alias: 'Company'},
object_configs: [],
policy_evaluation_config: {
external_object_name: 'Opportunity',
failure_reason_external_name: 'Failure_Reason__c',
result_external_name: 'Submission_Result_from_Heron__c'
},
small_file_filtering_enabled: false,
sync_file_classes: {},
value_mappings: []
},
instance_url: 'https://sandbox.salesforce.com',
provider: '<string>',
secret: '<string>',
failure_notification_channel: '<string>',
is_enabled: true,
is_live: true
})
};
fetch('https://app.herondata.io/api/crm_integrations', 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://app.herondata.io/api/crm_integrations",
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([
'auth' => [
],
'config' => [
'child_file_filtering_enabled' => true,
'data_source_accounts_config' => [
'external_name' => 'Account',
'key' => 'Account',
'description' => 'A company or person',
'external_lookup_config' => [
'external_lookup_fields_and' => [
'<string>'
],
'external_lookup_fields_or' => [
'<string>'
],
'sort_field_name' => 'CreatedDate'
],
'field_mappings' => [
[
'field_name' => 'Name',
'external_lookup_field_name' => '<string>',
'external_object_name_for_id' => 'Account',
'heron_company_attribute_label' => 'owner_1_first_name',
'max_length' => 255,
'overwrite_on_update' => true,
'regex_remove' => 'pattern',
'required' => true,
'static_value' => 'static value',
'value_mapping_name' => 'state',
'value_type' => 'Text'
]
],
'is_optional' => false,
'required_ids' => [
[
'external_name' => 'Account',
'alias' => 'Company'
]
],
'static_data' => [
[
'key' => 'status',
'value' => 'active'
]
]
],
'default_id' => [
'external_name' => 'Account',
'alias' => 'Company'
],
'object_configs' => [
],
'policy_evaluation_config' => [
'external_object_name' => 'Opportunity',
'failure_reason_external_name' => 'Failure_Reason__c',
'result_external_name' => 'Submission_Result_from_Heron__c'
],
'small_file_filtering_enabled' => false,
'sync_file_classes' => [
],
'value_mappings' => [
]
],
'instance_url' => 'https://sandbox.salesforce.com',
'provider' => '<string>',
'secret' => '<string>',
'failure_notification_channel' => '<string>',
'is_enabled' => true,
'is_live' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.herondata.io/api/crm_integrations"
payload := strings.NewReader("{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.herondata.io/api/crm_integrations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/crm_integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}"
response = http.request(request)
puts response.read_body{
"crm_integration": {
"config": {
"child_file_filtering_enabled": true,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": [
"<string>"
],
"external_lookup_fields_or": [
"<string>"
],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": true,
"regex_remove": "pattern",
"required": true,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": false,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": false,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"failure_notification_channel": "<string>",
"heron_id": "<string>",
"is_enabled": true,
"is_live": true
}
}CrmIntegrations
Create a CRM integration
Create a CRM integration, e.g., with Salesforce
POST
/
api
/
crm_integrations
Create a CRM integration
curl --request POST \
--url https://app.herondata.io/api/crm_integrations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"auth": {},
"config": {
"child_file_filtering_enabled": true,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": [
"<string>"
],
"external_lookup_fields_or": [
"<string>"
],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": true,
"regex_remove": "pattern",
"required": true,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": false,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": false,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"secret": "<string>",
"failure_notification_channel": "<string>",
"is_enabled": true,
"is_live": true
}
'import requests
url = "https://app.herondata.io/api/crm_integrations"
payload = {
"auth": {},
"config": {
"child_file_filtering_enabled": True,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": ["<string>"],
"external_lookup_fields_or": ["<string>"],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": True,
"regex_remove": "pattern",
"required": True,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": False,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": False,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"secret": "<string>",
"failure_notification_channel": "<string>",
"is_enabled": True,
"is_live": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auth: {},
config: {
child_file_filtering_enabled: true,
data_source_accounts_config: {
external_name: 'Account',
key: 'Account',
description: 'A company or person',
external_lookup_config: {
external_lookup_fields_and: ['<string>'],
external_lookup_fields_or: ['<string>'],
sort_field_name: 'CreatedDate'
},
field_mappings: [
{
field_name: 'Name',
external_lookup_field_name: '<string>',
external_object_name_for_id: 'Account',
heron_company_attribute_label: 'owner_1_first_name',
max_length: 255,
overwrite_on_update: true,
regex_remove: 'pattern',
required: true,
static_value: 'static value',
value_mapping_name: 'state',
value_type: 'Text'
}
],
is_optional: false,
required_ids: [{external_name: 'Account', alias: 'Company'}],
static_data: [{key: 'status', value: 'active'}]
},
default_id: {external_name: 'Account', alias: 'Company'},
object_configs: [],
policy_evaluation_config: {
external_object_name: 'Opportunity',
failure_reason_external_name: 'Failure_Reason__c',
result_external_name: 'Submission_Result_from_Heron__c'
},
small_file_filtering_enabled: false,
sync_file_classes: {},
value_mappings: []
},
instance_url: 'https://sandbox.salesforce.com',
provider: '<string>',
secret: '<string>',
failure_notification_channel: '<string>',
is_enabled: true,
is_live: true
})
};
fetch('https://app.herondata.io/api/crm_integrations', 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://app.herondata.io/api/crm_integrations",
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([
'auth' => [
],
'config' => [
'child_file_filtering_enabled' => true,
'data_source_accounts_config' => [
'external_name' => 'Account',
'key' => 'Account',
'description' => 'A company or person',
'external_lookup_config' => [
'external_lookup_fields_and' => [
'<string>'
],
'external_lookup_fields_or' => [
'<string>'
],
'sort_field_name' => 'CreatedDate'
],
'field_mappings' => [
[
'field_name' => 'Name',
'external_lookup_field_name' => '<string>',
'external_object_name_for_id' => 'Account',
'heron_company_attribute_label' => 'owner_1_first_name',
'max_length' => 255,
'overwrite_on_update' => true,
'regex_remove' => 'pattern',
'required' => true,
'static_value' => 'static value',
'value_mapping_name' => 'state',
'value_type' => 'Text'
]
],
'is_optional' => false,
'required_ids' => [
[
'external_name' => 'Account',
'alias' => 'Company'
]
],
'static_data' => [
[
'key' => 'status',
'value' => 'active'
]
]
],
'default_id' => [
'external_name' => 'Account',
'alias' => 'Company'
],
'object_configs' => [
],
'policy_evaluation_config' => [
'external_object_name' => 'Opportunity',
'failure_reason_external_name' => 'Failure_Reason__c',
'result_external_name' => 'Submission_Result_from_Heron__c'
],
'small_file_filtering_enabled' => false,
'sync_file_classes' => [
],
'value_mappings' => [
]
],
'instance_url' => 'https://sandbox.salesforce.com',
'provider' => '<string>',
'secret' => '<string>',
'failure_notification_channel' => '<string>',
'is_enabled' => true,
'is_live' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.herondata.io/api/crm_integrations"
payload := strings.NewReader("{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.herondata.io/api/crm_integrations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/crm_integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auth\": {},\n \"config\": {\n \"child_file_filtering_enabled\": true,\n \"data_source_accounts_config\": {\n \"external_name\": \"Account\",\n \"key\": \"Account\",\n \"description\": \"A company or person\",\n \"external_lookup_config\": {\n \"external_lookup_fields_and\": [\n \"<string>\"\n ],\n \"external_lookup_fields_or\": [\n \"<string>\"\n ],\n \"sort_field_name\": \"CreatedDate\"\n },\n \"field_mappings\": [\n {\n \"field_name\": \"Name\",\n \"external_lookup_field_name\": \"<string>\",\n \"external_object_name_for_id\": \"Account\",\n \"heron_company_attribute_label\": \"owner_1_first_name\",\n \"max_length\": 255,\n \"overwrite_on_update\": true,\n \"regex_remove\": \"pattern\",\n \"required\": true,\n \"static_value\": \"static value\",\n \"value_mapping_name\": \"state\",\n \"value_type\": \"Text\"\n }\n ],\n \"is_optional\": false,\n \"required_ids\": [\n {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n }\n ],\n \"static_data\": [\n {\n \"key\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"default_id\": {\n \"external_name\": \"Account\",\n \"alias\": \"Company\"\n },\n \"object_configs\": [],\n \"policy_evaluation_config\": {\n \"external_object_name\": \"Opportunity\",\n \"failure_reason_external_name\": \"Failure_Reason__c\",\n \"result_external_name\": \"Submission_Result_from_Heron__c\"\n },\n \"small_file_filtering_enabled\": false,\n \"sync_file_classes\": {},\n \"value_mappings\": []\n },\n \"instance_url\": \"https://sandbox.salesforce.com\",\n \"provider\": \"<string>\",\n \"secret\": \"<string>\",\n \"failure_notification_channel\": \"<string>\",\n \"is_enabled\": true,\n \"is_live\": true\n}"
response = http.request(request)
puts response.read_body{
"crm_integration": {
"config": {
"child_file_filtering_enabled": true,
"data_source_accounts_config": {
"external_name": "Account",
"key": "Account",
"description": "A company or person",
"external_lookup_config": {
"external_lookup_fields_and": [
"<string>"
],
"external_lookup_fields_or": [
"<string>"
],
"sort_field_name": "CreatedDate"
},
"field_mappings": [
{
"field_name": "Name",
"external_lookup_field_name": "<string>",
"external_object_name_for_id": "Account",
"heron_company_attribute_label": "owner_1_first_name",
"max_length": 255,
"overwrite_on_update": true,
"regex_remove": "pattern",
"required": true,
"static_value": "static value",
"value_mapping_name": "state",
"value_type": "Text"
}
],
"is_optional": false,
"required_ids": [
{
"external_name": "Account",
"alias": "Company"
}
],
"static_data": [
{
"key": "status",
"value": "active"
}
]
},
"default_id": {
"external_name": "Account",
"alias": "Company"
},
"object_configs": [],
"policy_evaluation_config": {
"external_object_name": "Opportunity",
"failure_reason_external_name": "Failure_Reason__c",
"result_external_name": "Submission_Result_from_Heron__c"
},
"small_file_filtering_enabled": false,
"sync_file_classes": {},
"value_mappings": []
},
"instance_url": "https://sandbox.salesforce.com",
"provider": "<string>",
"failure_notification_channel": "<string>",
"heron_id": "<string>",
"is_enabled": true,
"is_live": true
}
}Authorizations
Body
application/json
Authentication details for the CRM integration
Show child attributes
Show child attributes
The configuration for the CRM integration
Show child attributes
Show child attributes
Base URL of the CRM integration
Example:
"https://sandbox.salesforce.com"
The CRM provider
A secret key for the CRM integration
The channel to send failure notifications to
Whether the integration is enabled
Example:
true
Whether the integration is live
Example:
true
Response
201 - application/json
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I