Salesforce Relation Mappings
Last updated
Last updated
The Salesforce data structure is based on objects and relations between objects. For example, you have an Opportunity object, tied to an Account object, that might have a parent Account, and might have Contacts associated to it.
The HockeyStack data structure is based on actions that happen on a timeline. The concept of objects does not exist in our reporting.
Sometimes you will want to create an object-based report (for example, an Accounts with Contacts report), similar to what you are used to in Salesforce. With Relation Mappings in HockeyStack, you have the flexibility to do that!
"Relation mappings" are fields you want to transfer over from one object to another for reporting purposes.
Example: You have an Opportunity object that you want to filter by Account Region__c.
Navigate to Settings > API & Integrations > "Configure" button next to Salesforce
In the property relation mappings section, click "Add Property"
In this example we want to transfer an Account field into Opportunity. So the configuratiion looks like below. Note that "Account_Region" is the name I give to this new property on the Opportunity object. It will appear as "salesforce__Account_Region"
Wait about 24 hours for the data to sync and your salesforce__Account_Region property will be ready to use in your Opportunity-based reports!
Example 2: A significantly more complex example would be transferring over the Account Owner Territory property into the Lead object. There are 2 complexities here:
The Lead object does not have a relation to the Account object. Usually this connection can be achieved by having a custom field on the Lead object that connects to the account object. Let's call this Account__c.
Owner Territory is not on the Account object. It is on the User object that is attached to the Account object. You can confirm this from the Salesforce field manager. Owner is a relation to the User object.
Therefore, the setup looks like this:
Note the nuances:
You must enable "Property Key" in cases where the relation is a custom relation, like the Lead to Account relation in our example
The property key uses a dot to signify another relation level. Also "Account__c" turns into "Account__r" when it is used with a dot.
You must map from the User object to Lead object. The Territory__c field is not on the Account object, it is on the User object.
Since we have to wait 24 hours for this to sync, the best approach to relation mappings is to list out every relation field you anticipate a need for and add them all at once.