1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Contact
</base>
6 <name>civicrm_contact
</name>
7 <comment>Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.
</comment>
10 <icon>fa-address-book-o
</icon>
13 <type>int unsigned
</type>
14 <title>Contact ID
</title>
16 <headerPattern>/internal|contact?|id$/i
</headerPattern>
17 <required>true
</required>
18 <comment>Unique Contact ID
</comment>
23 <autoincrement>true
</autoincrement>
26 <name>contact_type
</name>
27 <title>Contact Type
</title>
30 <comment>Type of Contact.
</comment>
33 <table>civicrm_contact_type
</table>
34 <keyColumn>name
</keyColumn>
35 <labelColumn>label
</labelColumn>
36 <condition>parent_id IS NULL
</condition>
43 <contactType>null
</contactType>
46 <name>index_contact_type
</name>
47 <fieldName>contact_type
</fieldName>
51 <name>contact_sub_type
</name>
52 <title>Contact Subtype
</title>
57 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
58 <comment>May be used to over-ride contact view and edit templates.
</comment>
60 <table>civicrm_contact_type
</table>
61 <keyColumn>name
</keyColumn>
62 <labelColumn>label
</labelColumn>
63 <condition>parent_id IS NOT NULL
</condition>
67 <multiple>1</multiple>
69 <serialize>SEPARATOR_BOOKEND
</serialize>
73 <name>index_contact_sub_type
</name>
74 <fieldName>contact_sub_type
</fieldName>
78 <name>do_not_email
</name>
81 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
82 <dataPattern>/^\d{
1,}$/
</dataPattern>
90 <name>do_not_phone
</name>
94 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
95 <dataPattern>/^\d{
1,}$/
</dataPattern>
102 <name>do_not_mail
</name>
104 <import>true
</import>
105 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
106 <dataPattern>/^\d{
1,}$/
</dataPattern>
110 <type>CheckBox
</type>
114 <name>do_not_sms
</name>
116 <import>true
</import>
117 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
118 <dataPattern>/^\d{
1,}$/
</dataPattern>
122 <type>CheckBox
</type>
126 <name>do_not_trade
</name>
128 <import>true
</import>
129 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
130 <dataPattern>/^\d{
1,}$/
</dataPattern>
134 <type>CheckBox
</type>
138 <name>is_opt_out
</name>
140 <title>No Bulk Emails (User Opt Out)
</title>
142 <import>true
</import>
143 <required>true
</required>
144 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
147 <type>CheckBox
</type>
151 <name>legal_identifier
</name>
154 <import>true
</import>
155 <headerPattern>/legal\s?id/i
</headerPattern>
156 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
157 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
164 <name>external_identifier
</name>
172 <import>true
</import>
173 <headerPattern>/external\s?id/i
</headerPattern>
174 <dataPattern>/^\d{
11,}$/
</dataPattern>
175 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
179 <name>UI_external_identifier
</name>
180 <unique>true
</unique>
181 <fieldName>external_identifier
</fieldName>
185 <name>sort_name
</name>
186 <title>Sort Name
</title>
194 <export>true
</export>
195 <comment>Name used for sorting different contact types
</comment>
199 <name>index_sort_name
</name>
200 <fieldName>sort_name
</fieldName>
204 <name>display_name
</name>
205 <title>Display Name
</title>
213 <export>true
</export>
214 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
218 <name>nick_name
</name>
219 <title>Nickname
</title>
227 <import>true
</import>
228 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
229 <dataPattern>/^\w+$/
</dataPattern>
230 <comment>Nickname.
</comment>
235 <name>legal_name
</name>
242 <contactType>Organization
</contactType>
243 <import>true
</import>
244 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
245 <comment>Legal Name.
</comment>
250 <name>image_URL
</name>
252 <import>true
</import>
253 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
261 <name>preferred_communication_method
</name>
262 <title>Preferred Communication Method
</title>
265 <import>true
</import>
266 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
267 <dataPattern>/^\w+$/
</dataPattern>
268 <comment>What is the preferred mode of communication.
</comment>
271 <optionGroupName>preferred_communication_method
</optionGroupName>
275 <multiple>1</multiple>
277 <serialize>SEPARATOR_BOOKEND
</serialize>
280 <name>index_preferred_communication_method
</name>
281 <fieldName>preferred_communication_method
</fieldName>
285 <name>preferred_language
</name>
286 <title>Preferred Language
</title>
289 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
290 <headerPattern>/^lang/i
</headerPattern>
291 <import>true
</import>
293 <optionGroupName>languages
</optionGroupName>
294 <keyColumn>name
</keyColumn>
302 <name>preferred_mail_format
</name>
305 <default>"Both"</default>
306 <import>true
</import>
307 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
308 <comment>What is the preferred mode of sending an email.
</comment>
311 <callback>CRM_Core_SelectValues::pmf
</callback>
319 <title>Contact Hash
</title>
322 <comment>Key for validating requests related to this contact.
</comment>
325 <export>true
</export>
328 <name>index_hash
</name>
329 <fieldName>hash
</fieldName>
336 <comment>API Key for validating requests related to this contact.
</comment>
339 <or>administer CiviCRM, edit api keys
</or>
343 <name>index_api_key
</name>
344 <fieldName>api_key
</fieldName>
349 <title>Contact Source
</title>
350 <uniqueName>contact_source
</uniqueName>
358 <import>true
</import>
359 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
360 <comment>where contact come from, e.g. import, donate module insert...
</comment>
364 <name>first_name
</name>
371 <import>true
</import>
372 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
373 <dataPattern>/^\w+$/
</dataPattern>
375 <comment>First Name.
</comment>
377 <contactType>Individual
</contactType>
380 <name>index_first_name
</name>
381 <fieldName>first_name
</fieldName>
385 <name>middle_name
</name>
392 <import>true
</import>
393 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
394 <dataPattern>/^\w+$/
</dataPattern>
396 <comment>Middle Name.
</comment>
398 <contactType>Individual
</contactType>
401 <name>last_name
</name>
408 <import>true
</import>
409 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
410 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
411 <comment>Last Name.
</comment>
414 <contactType>Individual
</contactType>
417 <name>index_last_name
</name>
418 <fieldName>last_name
</fieldName>
422 <name>prefix_id
</name>
423 <title>Individual Prefix
</title>
424 <type>int unsigned
</type>
425 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
427 <optionGroupName>individual_prefix
</optionGroupName>
432 <headerPattern>/^(prefix|title)/i
</headerPattern>
433 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
434 <import>true
</import>
436 <contactType>Individual
</contactType>
439 <name>UI_prefix
</name>
440 <fieldName>prefix_id
</fieldName>
444 <name>suffix_id
</name>
445 <title>Individual Suffix
</title>
446 <type>int unsigned
</type>
448 <optionGroupName>individual_suffix
</optionGroupName>
453 <import>true
</import>
454 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
455 <headerPattern>/^suffix$/i
</headerPattern>
456 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
458 <contactType>Individual
</contactType>
461 <name>UI_suffix
</name>
462 <fieldName>suffix_id
</fieldName>
466 <name>formal_title
</name>
469 <import>true
</import>
473 <headerPattern>/^title/i
</headerPattern>
474 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
476 <contactType>Individual
</contactType>
479 <name>communication_style_id
</name>
480 <title>Communication Style
</title>
481 <type>int unsigned
</type>
483 <optionGroupName>communication_style
</optionGroupName>
485 <export>true
</export>
486 <import>true
</import>
487 <headerPattern>/style/i
</headerPattern>
488 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
495 <name>index_communication_style_id
</name>
496 <fieldName>communication_style_id
</fieldName>
500 <name>email_greeting_id
</name>
501 <type>int unsigned
</type>
502 <title>Email Greeting ID
</title>
503 <export>true
</export>
504 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
510 <optionGroupName>email_greeting
</optionGroupName>
514 <name>email_greeting_custom
</name>
517 <import>true
</import>
518 <export>false
</export>
519 <comment>Custom Email Greeting.
</comment>
526 <name>email_greeting_display
</name>
527 <title>Email Greeting
</title>
530 <comment>Cache Email Greeting.
</comment>
534 <name>postal_greeting_id
</name>
535 <type>int unsigned
</type>
536 <title>Postal Greeting ID
</title>
537 <export>true
</export>
538 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
544 <optionGroupName>postal_greeting
</optionGroupName>
548 <name>postal_greeting_custom
</name>
551 <import>true
</import>
552 <export>false
</export>
553 <comment>Custom Postal greeting.
</comment>
560 <name>postal_greeting_display
</name>
561 <title>Postal Greeting
</title>
564 <comment>Cache Postal greeting.
</comment>
568 <name>addressee_id
</name>
569 <type>int unsigned
</type>
570 <title>Addressee ID
</title>
571 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
573 <export>true
</export>
578 <optionGroupName>addressee
</optionGroupName>
582 <name>addressee_custom
</name>
585 <import>true
</import>
586 <export>false
</export>
587 <comment>Custom Addressee.
</comment>
594 <name>addressee_display
</name>
595 <title>Addressee
</title>
598 <comment>Cache Addressee.
</comment>
602 <name>job_title
</name>
609 <import>true
</import>
610 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
611 <dataPattern>//
</dataPattern>
612 <comment>Job Title
</comment>
614 <contactType>Individual
</contactType>
617 <name>gender_id
</name>
618 <title>Gender ID
</title>
619 <type>int unsigned
</type>
621 <optionGroupName>gender
</optionGroupName>
625 <label>Gender
</label>
627 <headerPattern>/^gender$/i
</headerPattern>
628 <comment>FK to gender ID
</comment>
629 <import>true
</import>
631 <contactType>Individual
</contactType>
634 <name>UI_gender
</name>
635 <fieldName>gender_id
</fieldName>
639 <name>birth_date
</name>
641 <import>true
</import>
642 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
643 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
644 <comment>Date of birth
</comment>
647 <type>Select Date
</type>
648 <formatType>birth
</formatType>
650 <contactType>Individual
</contactType>
653 <name>is_deceased
</name>
654 <title>Deceased
</title>
655 <import>true
</import>
656 <export>true
</export>
657 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
661 <required>true
</required>
663 <type>CheckBox
</type>
665 <contactType>Individual
</contactType>
668 <name>index_is_deceased
</name>
669 <fieldName>is_deceased
</fieldName>
673 <name>deceased_date
</name>
675 <import>true
</import>
676 <export>true
</export>
677 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
678 <comment>Date of deceased
</comment>
681 <type>Select Date
</type>
682 <formatType>birth
</formatType>
684 <contactType>Individual
</contactType>
687 <name>household_name
</name>
694 <import>true
</import>
695 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
696 <dataPattern>/^\w+$/
</dataPattern>
697 <comment>Household Name.
</comment>
700 <contactType>Household
</contactType>
703 <name>index_household_name
</name>
704 <fieldName>household_name
</fieldName>
708 <name>primary_contact_id
</name>
709 <type>int unsigned
</type>
710 <title>Household Primary Contact ID
</title>
711 <comment>Optional FK to Primary Contact for this household.
</comment>
713 <contactType>Household
</contactType>
716 <name>primary_contact_id
</name>
717 <table>civicrm_contact
</table>
720 <onDelete>SET NULL
</onDelete>
723 <name>organization_name
</name>
730 <import>true
</import>
731 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
732 <dataPattern>/^\w+$/
</dataPattern>
733 <comment>Organization Name.
</comment>
736 <contactType>Organization
</contactType>
739 <name>index_organization_name
</name>
740 <fieldName>organization_name
</fieldName>
744 <name>sic_code
</name>
747 <import>true
</import>
748 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
749 <comment>Standard Industry Classification Code.
</comment>
754 <contactType>Organization
</contactType>
757 <name>user_unique_id
</name>
759 <title>Unique ID (OpenID)
</title>
762 <import>true
</import>
763 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
764 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
765 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
772 <name>employer_id
</name>
773 <title>Current Employer ID
</title>
774 <uniqueName>current_employer_id
</uniqueName>
775 <type>int unsigned
</type>
776 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
777 <export>true
</export>
780 <type>EntityRef
</type>
781 <label>Current Employer
</label>
783 <contactType>Individual
</contactType>
786 <name>employer_id
</name>
787 <table>civicrm_contact
</table>
790 <onDelete>SET NULL
</onDelete>
793 <name>is_deleted
</name>
794 <title>Contact is in Trash
</title>
795 <uniqueName>contact_is_deleted
</uniqueName>
798 <required>true
</required>
799 <export>true
</export>
802 <type>CheckBox
</type>
804 <permission>access deleted contacts
</permission>
807 <name>index_is_deleted_sort_name
</name>
808 <fieldName>is_deleted
</fieldName>
809 <fieldName>sort_name
</fieldName>
810 <fieldName>id
</fieldName>
814 <name>created_date
</name>
815 <type>timestamp
</type>
816 <comment>When was the contact was created.
</comment>
817 <required>false
</required>
818 <export>true
</export>
819 <default>NULL
</default>
823 <name>index_created_date
</name>
824 <fieldName>created_date
</fieldName>
828 <name>modified_date
</name>
829 <type>timestamp
</type>
830 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
831 <required>false
</required>
832 <export>true
</export>
833 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
837 <name>index_modified_date
</name>
838 <fieldName>modified_date
</fieldName>