Triggers for primary calculation

AD
DM

Network calculates the primary whenever new objects are added to your Network instance or specific changes are made to an object.

This applies to the following primary field configurations:

  • Network Calculated
  • 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 address.

    • 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 specific changes are made to the object fields listed above. 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 (listed below) 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.

  • Specific fields (listed below) on an existing object 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 the following fields change on an existing primary object.

  • Network Calculated - The change to the field automatically triggers primary calculation.

  • Unique Checkbox - The configuration option must be set to trigger Network to recalculate using the Network Calculated behavior.

Field Details Network Calculated Unique Checkbox
<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

Network recalculates primary if the following option is set:

The status of the primary is INACTIVE.

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.

Network recalculates primary if the following option is set:

The record state of the primary is INVALID or DELETED

<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.

Network recalculates primary if the following option is set:

The record DOES NOT HAVE a primary

Changing other fields on the object will not trigger any of the calculation rules.

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.

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.
  • Veeva ID - The newest (highest) address entity ID.

Unique Checkbox primary fields

Recalculation logic runs only if Network is permitted to move the primary. If you have selected any of the Network 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.