Adding custom data model objects


The Network data model represents all of the objects, fields, and relationships in your Network instance.

Add objects

The following types of objects can be created in your Sandbox instance:

When a data domain is created, it is empty until you add a main object. When custom objects are created, they are populated with a set of standard Veeva fields and a custom key object.

Data model fields

Custom objects can contain both Veeva standard fields and custom fields.

Standard fields

Custom objects are created with a set of standard Veeva fields that are available in all countries. The properties of Veeva standard fields cannot be changed. Standard fields include Network entity ID, primary country, and metadata like Created Date, Record State, and so on. Other Veeva fields cannot be added to custom objects.

The default fields that are added are slightly different for each custom object. For example, custom sub-objects contain two fields to refer to the main object (entity_id__v and entity_type__v) and relationship objects have four fields to refer to the main objects in the relationship (entity_id__v , entity_type__v , related_entity_id__v, and related_entity_type__v.

To view the set of fields for each object, see the Fields section on each object's configuration page.

Custom fields

Administrators and data managers can add custom fields to objects to store unique data on records. For example, an administrator might create the following custom fields for a STUDY custom object:

  • start_date__c
  • study_id__c
  • results_first_submitted__c
  • enrollment__c
  • phase__c

After a custom field is added to an object, it cannot be removed; it can be disabled though.

Note: When a new data model is created for a country, the country is not automatically added to custom fields. If your custom object is supported in that country, ensure that the country is added to custom fields (provisioned or added). See Adding new data model countries to fields.

Custom keys

Custom objects are created with a custom key by default. The custom key stores external source keys. Custom keys for custom objects include the same attributes as all other standard custom keys:

  • Source - The name of the contributing source system.
  • Item type - The object type.
  • Value - The ID of the record from the contributing system

Custom keys are used to match records when you load custom object data through a source subscription.

Custom object example

To help explain the process of creating and managing custom objects, we'll use a custom object for clinical trials called STUDY as an example.

Verteo, the customer, wants to track HCP participation in clinical trials, as well as the HCOs where the trials took place. The STUDY custom object has a many-to-many relationship to Veeva entities and uses a custom sub-object. Because this data model has a specific theme, a new data domain called Clinical Trial Master is created.

The STUDY custom object is associated with the following objects in this Network instance:

  • CLINICAL TRIAL MASTER - A custom domain created for this specific area of knowledge. The STUDY object is directly associated to this domain.
  • STUDYFACILITY - A custom relationship object that links the STUDY and HCO main objects. Users must have access to the STUDY and HCO objects to be able to view the STUDYFACILITY relationship on the record profiles.
  • HCO - A Veeva object - The HCO owns the relationship (STUDYFACILITY) to the STUDY custom object.
  • STUDYINVESTIGATOR - A custom relationship object that links the STUDY and HCP main objects. Users must have access to the STUDY and HCP objects to be able to view the STUDYFACILITY relationship on the record profiles.
  • HCP - A Veeva object - The HCP owns the relationship (STUDYINVESTIGATOR) to the STUDY custom object.
  • CONDITION - A custom sub-object. A clinical trial can be used to track more than one condition (disease state), so this custom sub-object will be used to store a set of conditions for each clinical trial.

Note: There is no relationship between the STUDY custom object and Veeva's license and address sub-objects. Sub-objects are automatically added to the data domain when the main object (in this example, the HCP or HCO) is added.