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>
70 <name>index_contact_sub_type
</name>
71 <fieldName>contact_sub_type
</fieldName>
75 <name>do_not_email
</name>
78 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
79 <dataPattern>/^\d{
1,}$/
</dataPattern>
87 <name>do_not_phone
</name>
91 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
92 <dataPattern>/^\d{
1,}$/
</dataPattern>
99 <name>do_not_mail
</name>
101 <import>true
</import>
102 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
103 <dataPattern>/^\d{
1,}$/
</dataPattern>
107 <type>CheckBox
</type>
111 <name>do_not_sms
</name>
113 <import>true
</import>
114 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
115 <dataPattern>/^\d{
1,}$/
</dataPattern>
119 <type>CheckBox
</type>
123 <name>do_not_trade
</name>
125 <import>true
</import>
126 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
127 <dataPattern>/^\d{
1,}$/
</dataPattern>
131 <type>CheckBox
</type>
135 <name>is_opt_out
</name>
137 <title>No Bulk Emails (User Opt Out)
</title>
139 <import>true
</import>
140 <required>true
</required>
141 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
144 <type>CheckBox
</type>
148 <name>legal_identifier
</name>
151 <import>true
</import>
152 <headerPattern>/legal\s?id/i
</headerPattern>
153 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
154 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
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>
294 <name>index_preferred_communication_method
</name>
295 <fieldName>preferred_communication_method
</fieldName>
299 <name>preferred_language
</name>
300 <title>Preferred Language
</title>
303 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
304 <headerPattern>/^lang/i
</headerPattern>
305 <import>true
</import>
307 <optionGroupName>languages
</optionGroupName>
308 <keyColumn>name
</keyColumn>
316 <name>preferred_mail_format
</name>
319 <default>"Both"</default>
320 <import>true
</import>
321 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
322 <comment>What is the preferred mode of sending an email.
</comment>
325 <callback>CRM_Core_SelectValues::pmf
</callback>
333 <title>Contact Hash
</title>
336 <comment>Key for validating requests related to this contact.
</comment>
339 <export>true
</export>
342 <name>index_hash
</name>
343 <fieldName>hash
</fieldName>
350 <comment>API Key for validating requests related to this contact.
</comment>
354 <name>index_api_key
</name>
355 <fieldName>api_key
</fieldName>
360 <title>Contact Source
</title>
361 <uniqueName>contact_source
</uniqueName>
369 <import>true
</import>
370 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
371 <comment>where contact come from, e.g. import, donate module insert...
</comment>
375 <name>first_name
</name>
382 <import>true
</import>
383 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
384 <dataPattern>/^\w+$/
</dataPattern>
386 <comment>First Name.
</comment>
390 <name>index_first_name
</name>
391 <fieldName>first_name
</fieldName>
395 <name>middle_name
</name>
402 <import>true
</import>
403 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
404 <dataPattern>/^\w+$/
</dataPattern>
406 <comment>Middle Name.
</comment>
410 <name>last_name
</name>
417 <import>true
</import>
418 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
419 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
420 <comment>Last Name.
</comment>
425 <name>index_last_name
</name>
426 <fieldName>last_name
</fieldName>
433 <name>prefix_id
</name>
434 <title>Individual Prefix
</title>
435 <type>int unsigned
</type>
436 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
438 <optionGroupName>individual_prefix
</optionGroupName>
443 <headerPattern>/^(prefix|title)/i
</headerPattern>
444 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
445 <import>true
</import>
449 <name>UI_prefix
</name>
450 <fieldName>prefix_id
</fieldName>
454 <name>suffix_id
</name>
455 <title>Individual Suffix
</title>
456 <type>int unsigned
</type>
458 <optionGroupName>individual_suffix
</optionGroupName>
463 <import>true
</import>
464 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
465 <headerPattern>/^suffix$/i
</headerPattern>
466 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
470 <name>UI_suffix
</name>
471 <fieldName>suffix_id
</fieldName>
475 <name>formal_title
</name>
478 <import>true
</import>
482 <headerPattern>/^title/i
</headerPattern>
483 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
487 <name>communication_style_id
</name>
488 <title>Communication Style
</title>
489 <type>int unsigned
</type>
491 <optionGroupName>communication_style
</optionGroupName>
493 <export>true
</export>
494 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
501 <name>index_communication_style_id
</name>
502 <fieldName>communication_style_id
</fieldName>
506 <name>greeting_type
</name>
509 <import>true
</import>
510 <comment>Preferred greeting format.
</comment>
515 <name>greeting_type_id
</name>
516 <title>Greeting Type
</title>
517 <type>int unsigned
</type>
518 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
523 <name>custom_greeting
</name>
526 <import>true
</import>
527 <comment>Custom greeting message.
</comment>
532 <name>email_greeting_id
</name>
533 <type>int unsigned
</type>
534 <title>Email Greeting ID
</title>
535 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
538 <optionGroupName>email_greeting
</optionGroupName>
542 <name>email_greeting_custom
</name>
545 <import>true
</import>
546 <export>false
</export>
547 <comment>Custom Email Greeting.
</comment>
554 <name>email_greeting_display
</name>
555 <title>Email Greeting
</title>
558 <comment>Cache Email Greeting.
</comment>
565 <name>postal_greeting_id
</name>
566 <type>int unsigned
</type>
567 <title>Postal Greeting ID
</title>
568 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
574 <optionGroupName>postal_greeting
</optionGroupName>
578 <name>postal_greeting_custom
</name>
581 <import>true
</import>
582 <export>false
</export>
583 <comment>Custom Postal greeting.
</comment>
590 <name>postal_greeting_display
</name>
591 <title>Postal Greeting
</title>
594 <comment>Cache Postal greeting.
</comment>
601 <name>addressee_id
</name>
602 <type>int unsigned
</type>
603 <title>Addressee ID
</title>
604 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
607 <optionGroupName>addressee
</optionGroupName>
611 <name>addressee_custom
</name>
614 <import>true
</import>
615 <export>false
</export>
616 <comment>Custom Addressee.
</comment>
623 <name>addressee_display
</name>
624 <title>Addressee
</title>
627 <comment>Cache Addressee.
</comment>
634 <name>job_title
</name>
641 <import>true
</import>
642 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
643 <dataPattern>//
</dataPattern>
644 <comment>Job Title
</comment>
648 <name>gender_id
</name>
649 <title>Gender
</title>
650 <type>int unsigned
</type>
652 <optionGroupName>gender
</optionGroupName>
657 <headerPattern>/^gender$/i
</headerPattern>
658 <comment>FK to gender ID
</comment>
659 <import>true
</import>
663 <name>UI_gender
</name>
664 <fieldName>gender_id
</fieldName>
671 <name>birth_date
</name>
673 <import>true
</import>
674 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
675 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
676 <comment>Date of birth
</comment>
679 <type>Select Date
</type>
680 <formatType>birth
</formatType>
684 <name>is_deceased
</name>
685 <title>Deceased
</title>
686 <import>true
</import>
687 <export>true
</export>
688 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
693 <type>CheckBox
</type>
697 <name>index_is_deceased
</name>
698 <fieldName>is_deceased
</fieldName>
702 <name>deceased_date
</name>
704 <import>true
</import>
705 <export>true
</export>
706 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
707 <comment>Date of deceased
</comment>
710 <type>Select Date
</type>
711 <formatType>birth
</formatType>
715 <name>mail_to_household_id
</name>
716 <title>Mail to Household ID
</title>
717 <type>int unsigned
</type>
718 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
719 <export>true
</export>
724 <name>mail_to_household_id
</name>
725 <table>civicrm_contact
</table>
728 <onDelete>SET NULL
</onDelete>
732 <name>household_name
</name>
739 <import>true
</import>
740 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
741 <dataPattern>/^\w+$/
</dataPattern>
742 <comment>Household Name.
</comment>
747 <name>index_household_name
</name>
748 <fieldName>household_name
</fieldName>
752 <name>primary_contact_id
</name>
753 <type>int unsigned
</type>
754 <title>Household Primary Contact ID
</title>
755 <comment>Optional FK to Primary Contact for this household.
</comment>
762 <name>primary_contact_id
</name>
763 <table>civicrm_contact
</table>
766 <onDelete>SET NULL
</onDelete>
769 <name>organization_name
</name>
776 <import>true
</import>
777 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
778 <dataPattern>/^\w+$/
</dataPattern>
779 <comment>Organization Name.
</comment>
784 <name>index_organization_name
</name>
785 <fieldName>organization_name
</fieldName>
789 <name>sic_code
</name>
792 <import>true
</import>
793 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
794 <comment>Standard Industry Classification Code.
</comment>
801 <name>user_unique_id
</name>
803 <title>Unique ID (OpenID)
</title>
806 <import>true
</import>
807 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
808 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
809 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
816 <name>employer_id
</name>
817 <title>Current Employer
</title>
818 <uniqueName>current_employer_id
</uniqueName>
819 <type>int unsigned
</type>
820 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
821 <export>true
</export>
824 <type>EntityRef
</type>
828 <name>employer_id
</name>
829 <table>civicrm_contact
</table>
832 <onDelete>SET NULL
</onDelete>
835 <name>is_deleted
</name>
836 <title>Contact is in Trash
</title>
837 <uniqueName>contact_is_deleted
</uniqueName>
840 <required>true
</required>
841 <export>true
</export>
844 <type>CheckBox
</type>
848 <name>index_is_deleted
</name>
849 <fieldName>is_deleted
</fieldName>
854 <name>index_is_deleted_sort_name
</name>
855 <fieldName>is_deleted
</fieldName>
856 <fieldName>sort_name
</fieldName>
857 <fieldName>id
</fieldName>
861 <name>created_date
</name>
862 <type>timestamp
</type>
863 <comment>When was the contact was created.
</comment>
864 <required>false
</required>
865 <export>true
</export>
866 <default>NULL
</default>
870 <name>modified_date
</name>
871 <type>timestamp
</type>
872 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
873 <required>false
</required>
874 <export>true
</export>
875 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>