Triggers for primary calculation

AD
DM

There are two primary field configurations in Network: Network Calculated and Unique Checkbox.

The trigger for recalculation depends on the primary type configured for the field.

  • Network Calculated

    Network will automatically recalculate the primary when the record meets the following conditions:

    • The record DOES NOT HAVE a primary.

    • The status of the primary is INACTIVE.

    • The record state of the primary is INVALID or DELETED.

    Any changes to the primary's status, record state, or primary field will trigger the recalculation logic.

  • Unique Checkbox configurations that use the Network calculate options

    You can choose options in the configuration to allow Network to calculate primary for specific conditions.

    • The record DOES NOT HAVE a primary.

    • The status of the primary is INACTIVE.

    • The record state of the primary is INVALID or DELETED.

    If any of these options are selected, Network will calculate the primary when changes are made to any field on the record. Otherwise, the Unique Checkbox primary will not recalculate, except when there are duplicate primaries on an object.

Events

Network will calculate a primary if the object fields are changed during the following events:

  • New object is added using source subscriptions, data change requests, or the Network API

    For data change requests, if an inactive object is set to Primary, or a primary object is set to Inactive, the DCR is successfully processed and Network automatically finds the next best primary to add to the record.

  • Primary object fields are changed using source subscriptions, data change requests, or the Network API
  • Merging records manually using Find Suspect Match or merging in bulk through source subscriptions
  • Unmerging records

    When records are unmerged, objects that were defined as primary on each record before a merge are recovered. If there was no primary prior to a merge, a primary is automatically defined for the unmerged entities.

  • Downloading records from Veeva OpenData (using OpenData subscriptions or the Ad Hoc Download or Download from OpenData buttons on a record).
  • Syncing a record with Veeva OpenData (using the Sync with OpenData button).

Object fields

Network can calculate primary when fields change on an existing primary object.

  • Unique Checkbox - Changes to any field can trigger Network to recalculate the primary when the recalculation conditions are met (depending on the configuration, for example, if the option, The record DOES NOT HAVE a primary address, is selected).

    If no recalculation conditions are selected, the Unique Checkbox primary is not recalculated.

  • Network Calculated - Changes to specific fields will trigger primary calculation.

    Fields that trigger changes for Network Calculated primary

    Field Details
    <object>_status__v The primary object must be active.
    Network will recalculate the primary if the status of the primary object is changed from Active to any other status (Inactive or any custom status values).
    Example: address_status__v = I
    record_state__v The primary object must be valid.
    Network will recalculate the primary if the record state of the primary object is changed from Valid to any other state (Deleted, Invalid, or any custom record state values in your Network instance.
    Example: record_state__v = INVALID

    Note: Objects with these record states are not considered for primary calculation: MERGED_INTO, PARENT_MERGED, MERGE_INACTIVATED, MERGE_ADDED.

    <primary_field>__c Network recalculates primary if the primary field on the current primary object is changed from TRUE to FALSE. This means that a primary no longer exists on the record, so Network will calculate one.

    If a user sets an existing primary to FALSE, it is excluded when Network calculates a new primary.

Note: Network does not automatically recalculate primary if Veeva OpenData changes the master primary affiliation field.

How does Network calculate primary?

Network uses business logic to calculate the primary. These fields are used to match against any existing primary.

Important: Changing these fields (for example, source rank) does not trigger Network to recalculate a primary for Network Calculated primary configurations.

Primary is calculated using the following standard logic (in this order):

  • Source rank - The rank on the primary field is the same or higher than the existing primary address (rank of 1 is highest).
  • Address rank (Address objects only) - The address ordinal value that is the lowest.
  • Date and time - The address where the primary field was last updated.
  • VID - The newest (highest) address VID.

Unique Checkbox primary fields

Recalculation logic runs only if Network is permitted to move the primary. If you have selected any of the primary calculation options for the Unique Checkbox primary, you can choose to define custom logic for Network to use when determining the primary. If you do not define custom logic, the standard business logic is used.