Read Salesforce nonprofit mapping options
Returns organization donor forms, compatible contribution/number/campaign programs, writable provider fields, object names/labels, approved mappings and interaction availability. Requested choices fall back to stored choices, then only to a sole available option; multiple choices can leave selection null. Provider fields use stored metadata, live describe and built-in fallback in that order. Requires the integration platform global/configured client feature gate (normally integration_platform_foundation). Requires permission: one of access_account_settings.
curl --request GET \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options', 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.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"donor_forms": [
{
"id": 42,
"name": "Example",
"type": "donor",
"standardized_fields_enabled": true,
"standardized_fields_rollout_state": "Example",
"do_not_require_email": true
}
],
"selected_hysform_id": 42,
"hys_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
],
"salesforce_fields": [
{
"name": "Example",
"label": "Example",
"type": "Example",
"custom": true,
"nillable": true,
"createable": true,
"updateable": true,
"calculated": true,
"writable": true
}
],
"salesforce_donor_object": "Example",
"salesforce_donor_object_label": "Example",
"current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"recipient_program_options": [
{
"id": 42,
"name": "Example",
"type": "contribution",
"hysform_id": 42,
"recipient_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
]
}
],
"selected_recipient_program_id": 42,
"recipient_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
],
"salesforce_campaign_fields": [
{
"name": "Example",
"label": "Example",
"type": "Example",
"custom": true,
"nillable": true,
"createable": true,
"updateable": true,
"calculated": true,
"writable": true
}
],
"salesforce_recipient_object": "Example",
"salesforce_recipient_object_label": "Example",
"recipient_current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"recipient_inbound_enabled": true,
"interaction_sync_enabled": true,
"interaction_inbound_enabled": true,
"interaction_objects": [
"Task"
],
"interaction_object_options": [
{
"value": "Example",
"label": "Example",
"description": "Example",
"salesforce_object": "Example",
"disabled_reason": "Example",
"createable": true,
"updateable": true,
"available": true
}
],
"donation_outbound_enabled": true,
"donation_inbound_enabled": true,
"salesforce_donation_object": "Example",
"salesforce_donation_object_label": "Example",
"donation_current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"metadata_snapshot_id": 42
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Connection id in the current organization.
Query Parameters
Hysform id. Validation: nullable, integer.
Recipient program id. Validation: nullable, integer.
Response
Operation result.
"success"
Tenant form/program choices, writable provider fields and current mapping settings. Field metadata prefers the stored snapshot, then a live describe, then built-in fallback. Interaction availability reflects provider object create permission.
Show child attributes
Show child attributes
curl --request GET \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options', 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.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/salesforce/mapping-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"donor_forms": [
{
"id": 42,
"name": "Example",
"type": "donor",
"standardized_fields_enabled": true,
"standardized_fields_rollout_state": "Example",
"do_not_require_email": true
}
],
"selected_hysform_id": 42,
"hys_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
],
"salesforce_fields": [
{
"name": "Example",
"label": "Example",
"type": "Example",
"custom": true,
"nillable": true,
"createable": true,
"updateable": true,
"calculated": true,
"writable": true
}
],
"salesforce_donor_object": "Example",
"salesforce_donor_object_label": "Example",
"current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"recipient_program_options": [
{
"id": 42,
"name": "Example",
"type": "contribution",
"hysform_id": 42,
"recipient_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
]
}
],
"selected_recipient_program_id": 42,
"recipient_fields": [
{
"path": "Example",
"key": "Example",
"label": "Example",
"group": "Example",
"type": "Example",
"permissions": "Example",
"required": true,
"enabled": true
}
],
"salesforce_campaign_fields": [
{
"name": "Example",
"label": "Example",
"type": "Example",
"custom": true,
"nillable": true,
"createable": true,
"updateable": true,
"calculated": true,
"writable": true
}
],
"salesforce_recipient_object": "Example",
"salesforce_recipient_object_label": "Example",
"recipient_current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"recipient_inbound_enabled": true,
"interaction_sync_enabled": true,
"interaction_inbound_enabled": true,
"interaction_objects": [
"Task"
],
"interaction_object_options": [
{
"value": "Example",
"label": "Example",
"description": "Example",
"salesforce_object": "Example",
"disabled_reason": "Example",
"createable": true,
"updateable": true,
"available": true
}
],
"donation_outbound_enabled": true,
"donation_inbound_enabled": true,
"salesforce_donation_object": "Example",
"salesforce_donation_object_label": "Example",
"donation_current_mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "salesforce_npsp",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
},
"metadata_snapshot_id": 42
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}