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>
12 <type>int unsigned
</type>
13 <title>Contact ID
</title>
15 <headerPattern>/internal|contact?|id$/i
</headerPattern>
16 <required>true
</required>
17 <comment>Unique Contact ID
</comment>
22 <autoincrement>true
</autoincrement>
25 <name>contact_type
</name>
26 <title>Contact Type
</title>
29 <comment>Type of Contact.
</comment>
32 <table>civicrm_contact_type
</table>
33 <keyColumn>name
</keyColumn>
34 <labelColumn>label
</labelColumn>
35 <condition>parent_id IS NULL
</condition>
44 <name>index_contact_type
</name>
45 <fieldName>contact_type
</fieldName>
49 <name>contact_sub_type
</name>
50 <title>Contact Subtype
</title>
55 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
56 <comment>May be used to over-ride contact view and edit templates.
</comment>
58 <table>civicrm_contact_type
</table>
59 <keyColumn>name
</keyColumn>
60 <labelColumn>label
</labelColumn>
61 <condition>parent_id IS NOT NULL
</condition>
65 <multiple>1</multiple>
67 <serialize>SEPARATOR_BOOKEND
</serialize>
71 <name>index_contact_sub_type
</name>
72 <fieldName>contact_sub_type
</fieldName>
76 <name>do_not_email
</name>
79 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
80 <dataPattern>/^\d{
1,}$/
</dataPattern>
88 <name>do_not_phone
</name>
92 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
93 <dataPattern>/^\d{
1,}$/
</dataPattern>
100 <name>do_not_mail
</name>
102 <import>true
</import>
103 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
104 <dataPattern>/^\d{
1,}$/
</dataPattern>
108 <type>CheckBox
</type>
112 <name>do_not_sms
</name>
114 <import>true
</import>
115 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
116 <dataPattern>/^\d{
1,}$/
</dataPattern>
120 <type>CheckBox
</type>
124 <name>do_not_trade
</name>
126 <import>true
</import>
127 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
128 <dataPattern>/^\d{
1,}$/
</dataPattern>
132 <type>CheckBox
</type>
136 <name>is_opt_out
</name>
138 <title>No Bulk Emails (User Opt Out)
</title>
140 <import>true
</import>
141 <required>true
</required>
142 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
145 <type>CheckBox
</type>
149 <name>legal_identifier
</name>
152 <import>true
</import>
153 <headerPattern>/legal\s?id/i
</headerPattern>
154 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
155 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
163 <name>external_identifier
</name>
171 <import>true
</import>
172 <headerPattern>/external\s?id/i
</headerPattern>
173 <dataPattern>/^\d{
11,}$/
</dataPattern>
174 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
178 <name>UI_external_identifier
</name>
179 <unique>true
</unique>
180 <fieldName>external_identifier
</fieldName>
184 <name>sort_name
</name>
185 <title>Sort Name
</title>
193 <export>true
</export>
194 <comment>Name used for sorting different contact types
</comment>
198 <name>index_sort_name
</name>
199 <fieldName>sort_name
</fieldName>
203 <name>display_name
</name>
204 <title>Display Name
</title>
212 <export>true
</export>
213 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
217 <name>nick_name
</name>
218 <title>Nickname
</title>
226 <import>true
</import>
227 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
228 <dataPattern>/^\w+$/
</dataPattern>
229 <comment>Nickname.
</comment>
234 <name>legal_name
</name>
242 <import>true
</import>
243 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
244 <comment>Legal Name.
</comment>
249 <name>home_URL
</name>
251 <title>Website
</title>
259 <import>true
</import>
260 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
261 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
262 <comment>optional
"home page" URL for this contact.
</comment>
267 <name>image_URL
</name>
269 <import>true
</import>
270 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
278 <name>preferred_communication_method
</name>
279 <title>Preferred Communication Method
</title>
282 <import>true
</import>
283 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
284 <dataPattern>/^\w+$/
</dataPattern>
285 <comment>What is the preferred mode of communication.
</comment>
288 <optionGroupName>preferred_communication_method
</optionGroupName>
292 <multiple>1</multiple>
294 <serialize>SEPARATOR_BOOKEND
</serialize>
297 <name>index_preferred_communication_method
</name>
298 <fieldName>preferred_communication_method
</fieldName>
302 <name>preferred_language
</name>
303 <title>Preferred Language
</title>
306 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
307 <headerPattern>/^lang/i
</headerPattern>
308 <import>true
</import>
310 <optionGroupName>languages
</optionGroupName>
311 <keyColumn>name
</keyColumn>
319 <name>preferred_mail_format
</name>
322 <default>"Both"</default>
323 <import>true
</import>
324 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
325 <comment>What is the preferred mode of sending an email.
</comment>
328 <callback>CRM_Core_SelectValues::pmf
</callback>
336 <title>Contact Hash
</title>
339 <comment>Key for validating requests related to this contact.
</comment>
342 <export>true
</export>
345 <name>index_hash
</name>
346 <fieldName>hash
</fieldName>
353 <comment>API Key for validating requests related to this contact.
</comment>
357 <name>index_api_key
</name>
358 <fieldName>api_key
</fieldName>
363 <title>Contact Source
</title>
364 <uniqueName>contact_source
</uniqueName>
372 <import>true
</import>
373 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
374 <comment>where contact come from, e.g. import, donate module insert...
</comment>
378 <name>first_name
</name>
385 <import>true
</import>
386 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
387 <dataPattern>/^\w+$/
</dataPattern>
389 <comment>First Name.
</comment>
393 <name>index_first_name
</name>
394 <fieldName>first_name
</fieldName>
398 <name>middle_name
</name>
405 <import>true
</import>
406 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
407 <dataPattern>/^\w+$/
</dataPattern>
409 <comment>Middle Name.
</comment>
413 <name>last_name
</name>
420 <import>true
</import>
421 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
422 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
423 <comment>Last Name.
</comment>
428 <name>index_last_name
</name>
429 <fieldName>last_name
</fieldName>
436 <name>prefix_id
</name>
437 <title>Individual Prefix
</title>
438 <type>int unsigned
</type>
439 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
441 <optionGroupName>individual_prefix
</optionGroupName>
446 <headerPattern>/^(prefix|title)/i
</headerPattern>
447 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
448 <import>true
</import>
452 <name>UI_prefix
</name>
453 <fieldName>prefix_id
</fieldName>
457 <name>suffix_id
</name>
458 <title>Individual Suffix
</title>
459 <type>int unsigned
</type>
461 <optionGroupName>individual_suffix
</optionGroupName>
466 <import>true
</import>
467 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
468 <headerPattern>/^suffix$/i
</headerPattern>
469 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
473 <name>UI_suffix
</name>
474 <fieldName>suffix_id
</fieldName>
478 <name>formal_title
</name>
481 <import>true
</import>
485 <headerPattern>/^title/i
</headerPattern>
486 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
490 <name>communication_style_id
</name>
491 <title>Communication Style
</title>
492 <type>int unsigned
</type>
494 <optionGroupName>communication_style
</optionGroupName>
496 <export>true
</export>
497 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
504 <name>index_communication_style_id
</name>
505 <fieldName>communication_style_id
</fieldName>
509 <name>greeting_type
</name>
512 <import>true
</import>
513 <comment>Preferred greeting format.
</comment>
518 <name>greeting_type_id
</name>
519 <title>Greeting Type
</title>
520 <type>int unsigned
</type>
521 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
526 <name>custom_greeting
</name>
529 <import>true
</import>
530 <comment>Custom greeting message.
</comment>
535 <name>email_greeting_id
</name>
536 <type>int unsigned
</type>
537 <title>Email Greeting ID
</title>
538 <export>true
</export>
539 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
542 <optionGroupName>email_greeting
</optionGroupName>
546 <name>email_greeting_custom
</name>
549 <import>true
</import>
550 <export>false
</export>
551 <comment>Custom Email Greeting.
</comment>
558 <name>email_greeting_display
</name>
559 <title>Email Greeting
</title>
562 <comment>Cache Email Greeting.
</comment>
569 <name>postal_greeting_id
</name>
570 <type>int unsigned
</type>
571 <title>Postal Greeting ID
</title>
572 <export>true
</export>
573 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
579 <optionGroupName>postal_greeting
</optionGroupName>
583 <name>postal_greeting_custom
</name>
586 <import>true
</import>
587 <export>false
</export>
588 <comment>Custom Postal greeting.
</comment>
595 <name>postal_greeting_display
</name>
596 <title>Postal Greeting
</title>
599 <comment>Cache Postal greeting.
</comment>
606 <name>addressee_id
</name>
607 <type>int unsigned
</type>
608 <title>Addressee ID
</title>
609 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
611 <export>true
</export>
613 <optionGroupName>addressee
</optionGroupName>
617 <name>addressee_custom
</name>
620 <import>true
</import>
621 <export>false
</export>
622 <comment>Custom Addressee.
</comment>
629 <name>addressee_display
</name>
630 <title>Addressee
</title>
633 <comment>Cache Addressee.
</comment>
640 <name>job_title
</name>
647 <import>true
</import>
648 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
649 <dataPattern>//
</dataPattern>
650 <comment>Job Title
</comment>
654 <name>gender_id
</name>
655 <title>Gender
</title>
656 <type>int unsigned
</type>
658 <optionGroupName>gender
</optionGroupName>
663 <headerPattern>/^gender$/i
</headerPattern>
664 <comment>FK to gender ID
</comment>
665 <import>true
</import>
669 <name>UI_gender
</name>
670 <fieldName>gender_id
</fieldName>
677 <name>birth_date
</name>
679 <import>true
</import>
680 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
681 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
682 <comment>Date of birth
</comment>
685 <type>Select Date
</type>
686 <formatType>birth
</formatType>
690 <name>is_deceased
</name>
691 <title>Deceased
</title>
692 <import>true
</import>
693 <export>true
</export>
694 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
699 <type>CheckBox
</type>
703 <name>index_is_deceased
</name>
704 <fieldName>is_deceased
</fieldName>
708 <name>deceased_date
</name>
710 <import>true
</import>
711 <export>true
</export>
712 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
713 <comment>Date of deceased
</comment>
716 <type>Select Date
</type>
717 <formatType>birth
</formatType>
721 <name>mail_to_household_id
</name>
722 <title>Mail to Household ID
</title>
723 <type>int unsigned
</type>
724 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
725 <export>true
</export>
730 <name>mail_to_household_id
</name>
731 <table>civicrm_contact
</table>
734 <onDelete>SET NULL
</onDelete>
738 <name>household_name
</name>
745 <import>true
</import>
746 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
747 <dataPattern>/^\w+$/
</dataPattern>
748 <comment>Household Name.
</comment>
753 <name>index_household_name
</name>
754 <fieldName>household_name
</fieldName>
758 <name>primary_contact_id
</name>
759 <type>int unsigned
</type>
760 <title>Household Primary Contact ID
</title>
761 <comment>Optional FK to Primary Contact for this household.
</comment>
768 <name>primary_contact_id
</name>
769 <table>civicrm_contact
</table>
772 <onDelete>SET NULL
</onDelete>
775 <name>organization_name
</name>
782 <import>true
</import>
783 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
784 <dataPattern>/^\w+$/
</dataPattern>
785 <comment>Organization Name.
</comment>
790 <name>index_organization_name
</name>
791 <fieldName>organization_name
</fieldName>
795 <name>sic_code
</name>
798 <import>true
</import>
799 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
800 <comment>Standard Industry Classification Code.
</comment>
807 <name>user_unique_id
</name>
809 <title>Unique ID (OpenID)
</title>
812 <import>true
</import>
813 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
814 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
815 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
822 <name>employer_id
</name>
823 <title>Current Employer
</title>
824 <uniqueName>current_employer_id
</uniqueName>
825 <type>int unsigned
</type>
826 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
827 <export>true
</export>
830 <type>EntityRef
</type>
834 <name>employer_id
</name>
835 <table>civicrm_contact
</table>
838 <onDelete>SET NULL
</onDelete>
841 <name>is_deleted
</name>
842 <title>Contact is in Trash
</title>
843 <uniqueName>contact_is_deleted
</uniqueName>
846 <required>true
</required>
847 <export>true
</export>
850 <type>CheckBox
</type>
854 <name>index_is_deleted
</name>
855 <fieldName>is_deleted
</fieldName>
860 <name>index_is_deleted_sort_name
</name>
861 <fieldName>is_deleted
</fieldName>
862 <fieldName>sort_name
</fieldName>
863 <fieldName>id
</fieldName>
867 <name>created_date
</name>
868 <type>timestamp
</type>
869 <comment>When was the contact was created.
</comment>
870 <required>false
</required>
871 <export>true
</export>
872 <default>NULL
</default>
876 <name>modified_date
</name>
877 <type>timestamp
</type>
878 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
879 <required>false
</required>
880 <export>true
</export>
881 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>