Accelerate the Value of Data

Mapping Configuration - Set Tenant Mapping

This API validates tenant mapping and sets the tenant mapping if it is valid.

Request

Operation Endpoint:

POST {SFDCConnectorURL}\configuration\{tenantId}\{profileName}\mapping
Table 1. Parameters
Parameter Required Description
HeadersAuthorizationYesAccess Token in format "Bearer <accessToken>" (see details in Authentication API)
Content-TypeYesMust be "Content-Type: application/json"
QuerytenantIdYesTenant ID
QueryprofileNameYesName of the Profile
BodyYes
{
    "sfcache": [
        {
            "table": "recordtype",
            "cachename": "idtoname",
            "select": "Id,DeveloperName",
            "key": "Id",
            "value": "DeveloperName"
        }
    ],
    "dictionaries":
    {
        "companyTypeToRecordTypeIds":
        {
            "Business_Account": "012f40000000001",
            "Hospital": "012f400000000002"
        }
    },
    "to_salesforce":
    {
        "calculateDeltaBySF": true,
        "preserveInMapping": [
            "Id",
            "__entity",
            "__sobjentity"
        ],
        "merge": {},
        "deleteaction": "enddate",
        "keepNestedAfterMerge": "true",
        "interactions": "true",
        "entityTypes": [
            "configuration/entityTypes/HCP"
        ],
        "relationTypes": [],
        "entityMapping": [
            {
                "type": "configuration/entityTypes/HCP",
                "destType": "Account",
                "salesforceCrosswalkType": "configuration/sources/SFDC",
                "salesforceCrosswalkSourceTable": "Account",
                "SyncField": "*/attributes/SFDCFlag/*[string(@ov)]/@value",
                "attributes":
                {
                    "FirstName": "*/attributes/FirstName/*[string(@ov)]/@value",
                    "LastName": "*/attributes/LastName/*[string(@ov)]/@value"
                },
                "requiredAttributes": [
                    "*/attributes/FirstName/*[string(@ov)]/@value"
                ],
                "nestedsobjects": [
                    {
                        "type": "configuration/entityTypes/Organization/attributes/Address",
                        "root": "*/attributes/Address/*[string(@ov)]",
                        "refentity": true
                    }
                ]
            },
            {
                "type": "configuration/entityTypes/Organization/attributes/Address",
                "refentity": true,
                "nested": "true",
                "destType": "Address_vod__c",
                "useSurrogateCrosswalk": true,
                "salesforceCrosswalkType": "configuration/sources/SFDC",
                "salesforceCrosswalkSourceTable": "Address_vod__c",
                "excludeFromSfSync": [],
                "parentIdField": "Account_vod__c",
                "soql": "select Id, Account_vod__c from Address_vod__c where Account_vod__c='@@@id@@@'",
                "deleteLooserOnMerge": false,
                "attributes":
                {
                    "Name": "*/value/AddressLine1/*[string(@ov)]/@value",
                    "City_vod__c": "*/value/City/*[string(@ov)]/@value"
                }
            }
        ]
    },
    "to_reltio":
    {
        "sendNestedWithParent": true,
        "soMappings": [
            {
                "type": "Account",
                "nested": false,
                "SyncField": true,
                "table": "Account",
                "firstLevel": [
                    "attributes"
                ],
                "recordType": "PersonAccount",
                "source": "configuration/sources/SFDC",
                "parentTable": "Account",
                "entityType": "configuration/entityTypes/HCP",
                "delete": true,
                "attributes":
                {
                    "additionalField": [
                        "SFDCFlag"
                    ],
                    "nestedFields": [
                        {
                            "type": "Address_vod__c",
                            "field": "Address",
                            "combineWithParent": true
                        }
                    ],
                    "SFDCFlag": true,
                    "FirstName": "FirstName",
                    "LastName": "LastName",
                    "Id":
                    {
                        "name": "crosswalks",
                        "template": "crosswalk",
                        "attributes":
                        {
                            "type": "configuration/sources/SFDC",
                            "sourceTable": "Account",
                            "dataProvider": true,
                            "contributorProvider": false,
                            "url": "/@@@Id@@@",
                            "value": "@@@Id@@@"
                        }
                    }
                }
            },
            {
                "type": "Address",
                "alias": "Address_vod__c",
                "source": "configuration/sources/SFDC",
                "parent": "Account_vod__c",
                "SyncField": true,
                "table": "Address_vod__c",
                "postGeneric": true,
                "firstLevel": [
                    "attributes"
                ],
                "nested": true,
                "hasrelation": true,
                "parentTable": "Account",
                "entityType": "configuration/entityTypes/Organization/attributes/Address",
                "delete": true,
                "attributes":
                {
                    "additionalField": [
                    ],
                    "Name": "AddressLine1",
                    "City_vod__c": "City",
                    "Id":
                    {
                        "name": "crosswalks",
                        "hasrelation": true,
                        "relationtype": "refRelation",
                        "type": "configuration/relationTypes/HasAddress",
                        "template": "crosswalk",
                        "attributes":
                        {
                            "type": "configuration/sources/SFDC",
                            "sourceTable": "Address_vod__c",
                            "dataProvider": true,
                            "url": "/@@@Id@@@",
                            "value": "@@@Id@@@"
                        }
                    },
                    "LastModifiedDate":
                    {
                        "name": "crosswalks",
                        "hasrelation": true,
                        "relationtype": "refEntity",
                        "type": "configuration/relationTypes/Location",
                        "template": "crosswalk",
                        "attributes":
                        {
                            "type": "configuration/sources/SFDC",
                            "sourceTable": "Address_vod__c",
                            "dataProvider": true,
                            "value": "Surrogate"
                        }
                    }
                }
            }
        ]
    }
}

Response

Success: 200 status: Mapping for {tenantId}+{profileName} has been updated}
Error:   400 Bad Request, { error: {reason}}