Associating Salesforce junction objects
Overview
The Salesforce integration allows you configure either a one-to-many or many-to-many relationship for objects connected via a junction object relationship (such as Opportunities). The correct settings to apply will depend on your desired outcome and how you want to sync your data.
Below are the available options and their configurations; here, we're using Opportunity Contact Role as the junction object connecting Opportunities and Contacts, but the same rules will apply for any junction object relationship.
One-to-many for Opportunities and Contact Roles
This configuration means that:
- Opportunity records and their associated activities can only be assigned to a single Person in Ortto.
- A Person can be associated with many Opportunities (ie one-to-many).
- A Person is associated with an Opportunity via the Opportunity Contact Role as the junction object, via the Primary Contact Role.
To configure this, follow the below steps:
- Make sure both the Opportunity and Opportunity Contact Role objects are selected
2. On the Opportunity object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Relationship via junction object (many-to-many)
- Junction object: Opportunity Contact Role
- Opportunity reference field: Opportunity ID
- Associate with Ortto object: Contact
- Reference ID field: Contact ID
3. On the Opportunity Contact Role object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Reference ID
- Associate with Ortto object: Contact
- Reference ID field: Contact ID
4. Confirm that the following filter has been added to your Selective sync settings:
One-to-many for Opportunities, many-to-many for Opportunity Contact roles
One limitation with a one-to-many configuration for Opportunities and Contact Roles (Option 1) is that it excludes the ability to use Opportunity Contact Role updated activities. This is because:
- Opportunity and Opportunity Contact Role activities are only associated with the Primary Contact Role.
- Once a Salesforce record is removed as the primary contact of an Opportunity, that Opportunity's activities (including Opportunity Contact Role activities) are no longer associated with the person's record in Ortto.
To enable Opportunity Contact Role activities, follow the below steps:
- Make sure both the Opportunity and Opportunity Contact Role objects are selected
2. In the Opportunity object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Reference ID
- Associate with Ortto object: Contact
- Reference ID field: Contact ID
3. In the Opportunity Contact Role object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Reference ID
- Associate with Ortto object: Contact
- Reference ID field: Contact ID
4. Remove the Opportunity Contact Role: Primary filter from the Selective sync settings.
Many-to-Many for Opportunities
By default, Ortto enables a one-to-many configuration for Opportunities, with activities tracked only for the Primary Contact Role (via the Opportunity Contact Role junction object). However, you might want all records linked to an Opportunity to receive activities related to that Opportunity.
To configure this, follow the below steps:
- Make sure both the Opportunity and Opportunity Contact Role objects are selected
2. In the Opportunity object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Relationship via junction object (many to many)
- Junction object: Opportunity Contact Role
- Opportunity reference field: Opportunity ID
- Object: Contact
- Reference ID field: Contact ID
3. In the Opportunity Contact Role object, set the following identifiers by clicking Edit identifiers:
- Identify object by: Reference ID
- Associate with Ortto object: Contact
- Reference ID field: Contact ID
4. Remove the Opportunity Contact Role: Primary filter from the Selective sync setting