Associating Salesforce Junction Objects: A Guide

Salesforce allows you to configure either a one-to-many or many-to-many relationship between objects through junction objects. The specific configuration you choose depends on your desired outcome and how you plan to sync data between the related objects.

For this example, we will use Opportunity Contact Role as the junction object that connects Opportunities and Contacts. These same principles apply to any junction object relationship.


One-to-Many for Opportunities and Contact Roles

This configuration establishes that:

  • Opportunity records and their associated activities can be assigned to only a single person in Ortto.
  • A person can be associated with many Opportunities (one-to-many relationship).
  • The person is linked to an Opportunity through the Opportunity Contact Role, which acts as the junction object, using the Primary Contact Role.

Steps to Configure:

  1. Select Opportunity and Opportunity Contact Role objects.
  2. In the Opportunity object, edit identifiers as follows:
    • 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. In the Opportunity Contact Role object, edit identifiers as follows:
    • Identify object by: Reference ID
    • Associate with Ortto object: Contact
    • Reference ID field: Contact ID
  4. Ensure that the following filter is added to your Selective sync settings:
    • Primary filter: Opportunity Contact Role: Primary

One-to-Many for Opportunities, Many-to-Many for Opportunity Contact Roles

A limitation with the one-to-many configuration (Option 1) is that it does not allow for syncing updated activities related to Opportunity Contact Roles. This happens because:

  • Activities related to Opportunities and Opportunity Contact Roles are tied to the Primary Contact Role.
  • If a Salesforce record is removed as the primary contact for an Opportunity, the associated activities (including Opportunity Contact Role activities) are no longer linked to that person’s record in Ortto.

To allow activities for Opportunity Contact Roles, follow these steps:

  1. Select Opportunity and Opportunity Contact Role objects.
  2. In the Opportunity object, set the following 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:
    • 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 uses a one-to-many configuration for Opportunities, tracking activities only for the Primary Contact Role through the Opportunity Contact Role junction object. However, if you want all records associated with an Opportunity to receive activities tied to that Opportunity, you can configure a many-to-many relationship.

Steps to Configure:

  1. Select Opportunity and Opportunity Contact Role objects.
  2. In the Opportunity object, set the following 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. In the Opportunity Contact Role object, set the following 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.

This insight from Ortto provides the necessary configurations for different relationships between Opportunities and Contact Roles using junction objects in Salesforce. The settings can be adjusted based on your specific data synchronization needs.

Related Posts
Who is Salesforce?
Salesforce

Who is Salesforce? Here is their story in their own words. From our inception, we've proudly embraced the identity of Read more

Salesforce Marketing Cloud Transactional Emails
Salesforce Marketing Cloud

Salesforce Marketing Cloud Transactional Emails are immediate, automated, non-promotional messages crucial to business operations and customer satisfaction, such as order Read more

Salesforce Unites Einstein Analytics with Financial CRM
Financial Services Sector

Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more

AI-Driven Propensity Scores
AI-driven propensity scores

AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more