Network Calculated primary addresses
Network Calculated is a primary type custom field configuration that you can assign to an address object to designate a "best" address. A record can only have one Network Calculated primary address. Network automatically moves the primary flag to another address if the current address is inactivated or invalidated. This ensures that a record always has an active and valid primary address defined.
This behavior might not be suited to your business processes if you have business units or compensation that is tied to a primary address. For example, a sales rep might not get compensated for sampling a doctor if Veeva OpenData inactivates an address and Network automatically recalculates and moves the primary address to another state or province in the same fiscal quarter. To manage the primary address yourself, use Unique Checkbox primary type fields.
On the Profile page, primary indicators display when a primary field is set for an address. The Primary badge and field name displays.
Process for Network Calculated primary addresses
To use this configuration to support your business processes, create the field and update your existing addresses in your Network instance.
- Create a Network Calculated primary field - Create a custom field that uses the Network Calculated configuration.
- Set an active and valid primary on existing records - Set a primary on existing addresses in your Network instance. Use the Data Updater or a source subscription to update address records.
- Edit primary addresses - Users can update the primary address field on the record profile. It can also be updated through data loading using the Data Updater or source subscription features.
- Network calculates primary - Network will calculate the primary address over time whenever an entity is merged (owner of address), existing primary status is updated to inactive, or the record state becomes Invalid/Deleted.
Create a Network Calculated primary field
To create a primary type field:
- In the Admin console, click Data Model and select the Customer Master domain.
- Click the Address object.
In the Fields section, select a field that is already a primary type or click Add Field to create a new one.
- Type a Name and Description for a new field.
- In the Type field, select Primary.
- In the Configuration list, select Network Calculated.
If you change the Configuration, a dialog displays to confirm that you want to change the behavior for this primary.
- The Enabled? checkbox is selected by default.
In the Visibility in Countries section, select any countries that this primary field will be applied to and choose the Address object.
- In the Labels section, choose the Language and the Label for the custom field. The label displays on the profile page.
- Save your changes.
The custom field will now display on record profile pages. You can use this field to set the primary on existing addresses in your Network instance.
Set an active and valid primary on existing records
After you create a primary field to support your business processes, Network will not automatically calculate the field value. The primary will be calculated over time as records undergo changes and primary calculation is triggered.
To ensure that all existing records in your Network instance have a primary right now, use the Data Updater to set the field. You can identify the records that do not have an active and valid primary using reporting.
Step 1: Run a report to identify the objects in your Network instance
The report finds objects that have the following situations:
- no primary is available on a record
- inactive or invalid objects have been set to primary
To create a report to find these objects:
- In the Network menu bar, click Reports > SQL Query Editor.
In the text box, type the SQL query below.
Replace the object references (address) with the applicable object and the primary field name,
oncology_primary__c, with the name of your primary custom field.
address_ordinal__vfield is only available on the address object. Remove this condition for non-address primary fields.
SELECT address.entity_vid__v, vid__v, address_ordinal__v, oncology_primary__c /*Displaying the Oncology Primary located on the Rank 1 Address*/ FROM address INNER JOIN ( SELECT entity_vid__v FROM address WHERE ( oncology_primary__c IS NULL OR oncology_primary__c <> 'Y' ) AND entity_vid__v NOT IN ( SELECT entity_vid__v FROM address WHERE address_status__v = 'A' AND record_state__v IN ( 'VALID', 'UNDER_REVIEW' ) AND oncology_primary__c = 'Y' ) GROUP BY entity_vid__v ) entity_with_no_primary ON address.entity_vid__v = entity_with_no_primary.entity_vid__v WHERE address_ordinal__v = 1
- Click Run.
This query extracts all of the active and valid records. The objects can be set to primary in the subscription file.
Considerations for address report results:
Values in the
address_ordinal__v field are maintained by Veeva OpenData for OpenData addresses or by the record owner for non-OpenData addresses.
- If there are multiple objects on the same entity with
address_ordinal__v = 1, both addresses will be in the report.
- If none of the addresses on the entity have
address_ordinal__v = 1, the entity won't be displayed in the report.
Step 2: Set a primary on active and valid objects
Use the Data Updater to set the objects that you want to be primary - this could be the object that has been recently updated or the object that has the highest Network Entity ID (VID). For addresses, typically the rank 1 addresses are set to primary.
- Create a .csv file that contains the fields below.
vid_v oncology_primary__c 9988776655 Y
Create a Data Updater job that includes this .csv file.
Note: For address jobs, the Verify and clean address option must not be enabled.
- Run the Data Updater job.
After the job runs, the records will be updated with a primary.
Setting a primary address on record profiles
All Network users can use the profile page to assign a primary field to an address. For example, a Field Services Manager who manages territories and compensation can edit an address to assign a primary field for specific therapeutic areas.
To assign a primary:
- Click the address summary card to expand the details.
- Find the primary field name, click the Value field, and choose Yes/True from the list.
- Click Apply to save your update and submit a data change request to local data stewards for review.
Other ways primary can be set on records
A primary can be set on an object using the following Network features:
- Change request API
- Data change requests
- Merge and unmerge
- Data Updater
- Veeva OpenData updates (subscriptions, downloads, sync)
Duplicate primaries in the Network UI
All users can edit Unique Checkbox and Network Calculated primary fields on record profiles. If the primary field is updated, a data change request is created and sent to local data stewards to accept or reject the change.
To ensure that a field is set to primary on only one object, Network changes the primary value if a field is set to Yes/True multiple times on a record.
This is the only situation where Network will move the primary on a Unique Checkbox configuration that doesn't use any of the Network calculation options.
On an HCP record, the Primary Address for Cardiology field is set to Yes/True for 6941 W Archer Ave.
A user edits the record and sets the same primary field to Yes/True for 1180 W Wilson St Ste E.
To ensure that there's only one Primary Address for Cardiology defined on the record, Network automatically toggles the field value to No/False on the 6941 W Archer Ave address.
The same behavior occurs on data change requests.
When does Network calculate primary address?
Network calculates the primary whenever new objects are added to your Network instance or specific changes are made to an object.
The following events will trigger Network to calculate the primary:
- New object is added or specific fields on an existing object are changed using source subscriptions, data change requests, or the Network API
- Merging records manually using Find Suspect Match
- Merging records in bulk through source subscriptions
- Unmerging records
- 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).
Updates to existing records
Network calculates primary when the following changes occur on an existing record:
A primary value changes - Any change to the primary value will trigger Network to calculate.
If a user sets an existing primary to False, it is excluded when Network calculates a new primary.
- The object status changes - Any change to the object status value will trigger Network to calculate; for example, when an object becomes inactive. Inactive object status includes Inactive and any custom status values in your Network instance.
The record state changes - Any change to the record state value will trigger Network to calculate; for example, a record state becomes invalid. Invalid object states include Deleted, Invalid, and any custom state values in your Network instance.
Objects with the following record states are not considered for primary calculation: MERGED_INTO, PARENT_MERGED, MERGE_INACTIVATED, MERGE_ADDED.
Changing any other fields, such as Address Line 1 or Specialty, will not trigger any of the calculation rules.
Note: Network does not automatically recalculate primary if Veeva OpenData changes the ordinal of the address ranking.
Understanding how Network calculates primary address
Network uses a set of business rules to determine what address will be set to primary for a record.
The primary address business rules might run before or after the address ordinal rules. As a result, when addresses have the same ordinal, the flow that determines which address is set as primary might be different. If the address ordinal rules run first, each address will have a unique rank, so the highest ranking address will be set as primary. If the primary address rules run first, each address will have the same rank, so Network proceeds to check the last updated time.
The following diagrams contain various scenarios and outcomes for setting a primary address.
One or more addresses are set to primary
No primary address is set