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.
</comment>
162 <name>external_identifier
</name>
170 <import>true
</import>
171 <headerPattern>/external\s?id/i
</headerPattern>
172 <dataPattern>/^\d{
11,}$/
</dataPattern>
173 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
177 <name>UI_external_identifier
</name>
178 <unique>true
</unique>
179 <fieldName>external_identifier
</fieldName>
183 <name>sort_name
</name>
184 <title>Sort Name
</title>
192 <export>true
</export>
193 <comment>Name used for sorting different contact types
</comment>
197 <name>index_sort_name
</name>
198 <fieldName>sort_name
</fieldName>
202 <name>display_name
</name>
203 <title>Display Name
</title>
211 <export>true
</export>
212 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
216 <name>nick_name
</name>
217 <title>Nickname
</title>
225 <import>true
</import>
226 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
227 <dataPattern>/^\w+$/
</dataPattern>
228 <comment>Nickname.
</comment>
233 <name>legal_name
</name>
241 <import>true
</import>
242 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
243 <comment>Legal Name.
</comment>
248 <name>home_URL
</name>
250 <title>Website
</title>
258 <import>true
</import>
259 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
260 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
261 <comment>optional
"home page" URL for this contact.
</comment>
266 <name>image_URL
</name>
268 <import>true
</import>
269 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
277 <name>preferred_communication_method
</name>
278 <title>Preferred Communication Method
</title>
281 <import>true
</import>
282 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
283 <dataPattern>/^\w+$/
</dataPattern>
284 <comment>What is the preferred mode of communication.
</comment>
287 <optionGroupName>preferred_communication_method
</optionGroupName>
291 <multiple>1</multiple>
293 <serialize>SEPARATOR_BOOKEND
</serialize>
296 <name>index_preferred_communication_method
</name>
297 <fieldName>preferred_communication_method
</fieldName>
301 <name>preferred_language
</name>
302 <title>Preferred Language
</title>
305 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
306 <headerPattern>/^lang/i
</headerPattern>
307 <import>true
</import>
309 <optionGroupName>languages
</optionGroupName>
310 <keyColumn>name
</keyColumn>
318 <name>preferred_mail_format
</name>
321 <default>"Both"</default>
322 <import>true
</import>
323 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
324 <comment>What is the preferred mode of sending an email.
</comment>
327 <callback>CRM_Core_SelectValues::pmf
</callback>
335 <title>Contact Hash
</title>
338 <comment>Key for validating requests related to this contact.
</comment>
341 <export>true
</export>
344 <name>index_hash
</name>
345 <fieldName>hash
</fieldName>
352 <comment>API Key for validating requests related to this contact.
</comment>
355 <or>administer CiviCRM, edit api keys
</or>
359 <name>index_api_key
</name>
360 <fieldName>api_key
</fieldName>
365 <title>Contact Source
</title>
366 <uniqueName>contact_source
</uniqueName>
374 <import>true
</import>
375 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
376 <comment>where contact come from, e.g. import, donate module insert...
</comment>
380 <name>first_name
</name>
387 <import>true
</import>
388 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
389 <dataPattern>/^\w+$/
</dataPattern>
391 <comment>First Name.
</comment>
395 <name>index_first_name
</name>
396 <fieldName>first_name
</fieldName>
400 <name>middle_name
</name>
407 <import>true
</import>
408 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
409 <dataPattern>/^\w+$/
</dataPattern>
411 <comment>Middle Name.
</comment>
415 <name>last_name
</name>
422 <import>true
</import>
423 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
424 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
425 <comment>Last Name.
</comment>
430 <name>index_last_name
</name>
431 <fieldName>last_name
</fieldName>
438 <name>prefix_id
</name>
439 <title>Individual Prefix
</title>
440 <type>int unsigned
</type>
441 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
443 <optionGroupName>individual_prefix
</optionGroupName>
448 <headerPattern>/^(prefix|title)/i
</headerPattern>
449 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
450 <import>true
</import>
454 <name>UI_prefix
</name>
455 <fieldName>prefix_id
</fieldName>
459 <name>suffix_id
</name>
460 <title>Individual Suffix
</title>
461 <type>int unsigned
</type>
463 <optionGroupName>individual_suffix
</optionGroupName>
468 <import>true
</import>
469 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
470 <headerPattern>/^suffix$/i
</headerPattern>
471 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
475 <name>UI_suffix
</name>
476 <fieldName>suffix_id
</fieldName>
480 <name>formal_title
</name>
483 <import>true
</import>
487 <headerPattern>/^title/i
</headerPattern>
488 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
492 <name>communication_style_id
</name>
493 <title>Communication Style
</title>
494 <type>int unsigned
</type>
496 <optionGroupName>communication_style
</optionGroupName>
498 <export>true
</export>
499 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
506 <name>index_communication_style_id
</name>
507 <fieldName>communication_style_id
</fieldName>
511 <name>greeting_type
</name>
514 <import>true
</import>
515 <comment>Preferred greeting format.
</comment>
520 <name>greeting_type_id
</name>
521 <title>Greeting Type
</title>
522 <type>int unsigned
</type>
523 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
528 <name>custom_greeting
</name>
531 <import>true
</import>
532 <comment>Custom greeting message.
</comment>
537 <name>email_greeting_id
</name>
538 <type>int unsigned
</type>
539 <title>Email Greeting ID
</title>
540 <export>true
</export>
541 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
544 <optionGroupName>email_greeting
</optionGroupName>
548 <name>email_greeting_custom
</name>
551 <import>true
</import>
552 <export>false
</export>
553 <comment>Custom Email Greeting.
</comment>
560 <name>email_greeting_display
</name>
561 <title>Email Greeting
</title>
564 <comment>Cache Email Greeting.
</comment>
571 <name>postal_greeting_id
</name>
572 <type>int unsigned
</type>
573 <title>Postal Greeting ID
</title>
574 <export>true
</export>
575 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
581 <optionGroupName>postal_greeting
</optionGroupName>
585 <name>postal_greeting_custom
</name>
588 <import>true
</import>
589 <export>false
</export>
590 <comment>Custom Postal greeting.
</comment>
597 <name>postal_greeting_display
</name>
598 <title>Postal Greeting
</title>
601 <comment>Cache Postal greeting.
</comment>
608 <name>addressee_id
</name>
609 <type>int unsigned
</type>
610 <title>Addressee ID
</title>
611 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
613 <export>true
</export>
615 <optionGroupName>addressee
</optionGroupName>
619 <name>addressee_custom
</name>
622 <import>true
</import>
623 <export>false
</export>
624 <comment>Custom Addressee.
</comment>
631 <name>addressee_display
</name>
632 <title>Addressee
</title>
635 <comment>Cache Addressee.
</comment>
642 <name>job_title
</name>
649 <import>true
</import>
650 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
651 <dataPattern>//
</dataPattern>
652 <comment>Job Title
</comment>
656 <name>gender_id
</name>
657 <title>Gender
</title>
658 <type>int unsigned
</type>
660 <optionGroupName>gender
</optionGroupName>
665 <headerPattern>/^gender$/i
</headerPattern>
666 <comment>FK to gender ID
</comment>
667 <import>true
</import>
671 <name>UI_gender
</name>
672 <fieldName>gender_id
</fieldName>
679 <name>birth_date
</name>
681 <import>true
</import>
682 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
683 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
684 <comment>Date of birth
</comment>
687 <type>Select Date
</type>
688 <formatType>birth
</formatType>
692 <name>is_deceased
</name>
693 <title>Deceased
</title>
694 <import>true
</import>
695 <export>true
</export>
696 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
701 <type>CheckBox
</type>
705 <name>index_is_deceased
</name>
706 <fieldName>is_deceased
</fieldName>
710 <name>deceased_date
</name>
712 <import>true
</import>
713 <export>true
</export>
714 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
715 <comment>Date of deceased
</comment>
718 <type>Select Date
</type>
719 <formatType>birth
</formatType>
723 <name>mail_to_household_id
</name>
724 <title>Mail to Household ID
</title>
725 <type>int unsigned
</type>
726 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
727 <export>true
</export>
732 <name>mail_to_household_id
</name>
733 <table>civicrm_contact
</table>
736 <onDelete>SET NULL
</onDelete>
740 <name>household_name
</name>
747 <import>true
</import>
748 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
749 <dataPattern>/^\w+$/
</dataPattern>
750 <comment>Household Name.
</comment>
755 <name>index_household_name
</name>
756 <fieldName>household_name
</fieldName>
760 <name>primary_contact_id
</name>
761 <type>int unsigned
</type>
762 <title>Household Primary Contact ID
</title>
763 <comment>Optional FK to Primary Contact for this household.
</comment>
770 <name>primary_contact_id
</name>
771 <table>civicrm_contact
</table>
774 <onDelete>SET NULL
</onDelete>
777 <name>organization_name
</name>
784 <import>true
</import>
785 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
786 <dataPattern>/^\w+$/
</dataPattern>
787 <comment>Organization Name.
</comment>
792 <name>index_organization_name
</name>
793 <fieldName>organization_name
</fieldName>
797 <name>sic_code
</name>
800 <import>true
</import>
801 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
802 <comment>Standard Industry Classification Code.
</comment>
809 <name>user_unique_id
</name>
811 <title>Unique ID (OpenID)
</title>
814 <import>true
</import>
815 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
816 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
817 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
824 <name>employer_id
</name>
825 <title>Current Employer
</title>
826 <uniqueName>current_employer_id
</uniqueName>
827 <type>int unsigned
</type>
828 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
829 <export>true
</export>
832 <type>EntityRef
</type>
836 <name>employer_id
</name>
837 <table>civicrm_contact
</table>
840 <onDelete>SET NULL
</onDelete>
843 <name>is_deleted
</name>
844 <title>Contact is in Trash
</title>
845 <uniqueName>contact_is_deleted
</uniqueName>
848 <required>true
</required>
849 <export>true
</export>
852 <type>CheckBox
</type>
856 <name>index_is_deleted
</name>
857 <fieldName>is_deleted
</fieldName>
862 <name>index_is_deleted_sort_name
</name>
863 <fieldName>is_deleted
</fieldName>
864 <fieldName>sort_name
</fieldName>
865 <fieldName>id
</fieldName>
869 <name>created_date
</name>
870 <type>timestamp
</type>
871 <comment>When was the contact was created.
</comment>
872 <required>false
</required>
873 <export>true
</export>
874 <default>NULL
</default>
878 <name>modified_date
</name>
879 <type>timestamp
</type>
880 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
881 <required>false
</required>
882 <export>true
</export>
883 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>