Using Salesforce Related Fields
If you are wanting to build more complex metrics within Ambition you may choose to use related fields. Related fields are the same as Salesforce's Relationships that "associate objects with other objects".
How do I sync related fields on a Salesforce Object in Ambition?
What should I consider with related fields?
Recommended Use and Work Around
Sync Related Fields
1. Open the left navigation and click Administration > Data > Integrations.
2. Click Edit in line with the Salesforce integration.
3. Once you are in the Salesforce Integration, you will click on Data Configuration in order to see all Objects that are currently synced with Ambition.
4. Locate the Object on which you are wanting to add access to related fields. Click Edit.
5. Switch the Sync Related Fields toggle to the Yes position, and click the Update Object button.
Syncing related fields will allow access in Ambition to all available related fields associated with the Object selected.
Ambition will denote related fields by displaying the field's name along with the related Object's name featured in a black box.
Example of a related field, Owner ID, on the Account Object.
What should I consider with Related fields?
While related fields are a simple alternative to Report Sync metrics, it's important to understand their limitations when using them for metric attribution. Specifically, it's important to know that Ambition only receives updates when the source Object is updated, not when any of its Related Objects are updated.
Example of Utilizing a Related Field as a Metric's User Field
Consider an example where an Ambition metric is configured for the Task Object, a count-type metric whose user attribution is tied to the related Account Owner (Task.Account.OwnerId
).
When a given Task object is received, it is received with the current Account Owner and is attributed as expected. However, if the Account Owner is later changed and no subsequent change is made to the Task, the metric record will not be attributed to the new owner in Ambition.
Attribution based on fields of related objects should not be confused with information from related objects themselves.
For example, consider a metric configured for the Opportunity object, a count-type metric with a filter that only counts Opportunity objects that are related to a specific Campaign (Opportunity.CampaignId
).
Any time a given Opportunity's association with a Campaign is changed, our process in Salesforce will recognize that there are changes to the Opportunity object, and Ambition will receive the updated state of the Opportunity.
When metric configuration is based on information from related objects, rather than the fields of related objects, the metric state in Ambition stays in-sync with Salesforce seamlessly.
Recommended Use and Work-Around
We recommend that when using related fields to filter or attribute metric records to users or dates/times, you choose related fields whose state is static. For example, attributing the user in the first example will have no negative impact on data consistency as long as the Account's Owner isn't likely to change.
If there is no alternative to metric filtering/attribution based on fields of related objects whose value is likely to change often, there is a relatively simple workaround: Implement a simple trigger on the related object that updates the source object.
An example trigger that would solve the case in the first example is shown below.
trigger AmbitionOnAccountUpdatedTouchTask on Account (after update) {
List<string> updatedIds = new List<string>();
for (Account account: Trigger.new)
{
updatedIds.add(account.Id);
}
List<Task> relatedTasks = [SELECT Id FROM Task WHERE AccountId IN :updatedIds];
update relatedTasks;
}
Comments
0 comments
Please sign in to leave a comment.