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 <import>true
</import>
500 <headerPattern>/style/i
</headerPattern>
501 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
508 <name>index_communication_style_id
</name>
509 <fieldName>communication_style_id
</fieldName>
513 <name>greeting_type
</name>
516 <import>true
</import>
517 <comment>Preferred greeting format.
</comment>
522 <name>greeting_type_id
</name>
523 <title>Greeting Type
</title>
524 <type>int unsigned
</type>
525 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
530 <name>custom_greeting
</name>
533 <import>true
</import>
534 <comment>Custom greeting message.
</comment>
539 <name>email_greeting_id
</name>
540 <type>int unsigned
</type>
541 <title>Email Greeting ID
</title>
542 <export>true
</export>
543 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
546 <optionGroupName>email_greeting
</optionGroupName>
550 <name>email_greeting_custom
</name>
553 <import>true
</import>
554 <export>false
</export>
555 <comment>Custom Email Greeting.
</comment>
562 <name>email_greeting_display
</name>
563 <title>Email Greeting
</title>
566 <comment>Cache Email Greeting.
</comment>
573 <name>postal_greeting_id
</name>
574 <type>int unsigned
</type>
575 <title>Postal Greeting ID
</title>
576 <export>true
</export>
577 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
583 <optionGroupName>postal_greeting
</optionGroupName>
587 <name>postal_greeting_custom
</name>
590 <import>true
</import>
591 <export>false
</export>
592 <comment>Custom Postal greeting.
</comment>
599 <name>postal_greeting_display
</name>
600 <title>Postal Greeting
</title>
603 <comment>Cache Postal greeting.
</comment>
610 <name>addressee_id
</name>
611 <type>int unsigned
</type>
612 <title>Addressee ID
</title>
613 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
615 <export>true
</export>
617 <optionGroupName>addressee
</optionGroupName>
621 <name>addressee_custom
</name>
624 <import>true
</import>
625 <export>false
</export>
626 <comment>Custom Addressee.
</comment>
633 <name>addressee_display
</name>
634 <title>Addressee
</title>
637 <comment>Cache Addressee.
</comment>
644 <name>job_title
</name>
651 <import>true
</import>
652 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
653 <dataPattern>//
</dataPattern>
654 <comment>Job Title
</comment>
658 <name>gender_id
</name>
659 <title>Gender
</title>
660 <type>int unsigned
</type>
662 <optionGroupName>gender
</optionGroupName>
667 <headerPattern>/^gender$/i
</headerPattern>
668 <comment>FK to gender ID
</comment>
669 <import>true
</import>
673 <name>UI_gender
</name>
674 <fieldName>gender_id
</fieldName>
681 <name>birth_date
</name>
683 <import>true
</import>
684 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
685 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
686 <comment>Date of birth
</comment>
689 <type>Select Date
</type>
690 <formatType>birth
</formatType>
694 <name>is_deceased
</name>
695 <title>Deceased
</title>
696 <import>true
</import>
697 <export>true
</export>
698 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
703 <type>CheckBox
</type>
707 <name>index_is_deceased
</name>
708 <fieldName>is_deceased
</fieldName>
712 <name>deceased_date
</name>
714 <import>true
</import>
715 <export>true
</export>
716 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
717 <comment>Date of deceased
</comment>
720 <type>Select Date
</type>
721 <formatType>birth
</formatType>
725 <name>mail_to_household_id
</name>
726 <title>Mail to Household ID
</title>
727 <type>int unsigned
</type>
728 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
729 <export>true
</export>
734 <name>mail_to_household_id
</name>
735 <table>civicrm_contact
</table>
738 <onDelete>SET NULL
</onDelete>
742 <name>household_name
</name>
749 <import>true
</import>
750 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
751 <dataPattern>/^\w+$/
</dataPattern>
752 <comment>Household Name.
</comment>
757 <name>index_household_name
</name>
758 <fieldName>household_name
</fieldName>
762 <name>primary_contact_id
</name>
763 <type>int unsigned
</type>
764 <title>Household Primary Contact ID
</title>
765 <comment>Optional FK to Primary Contact for this household.
</comment>
772 <name>primary_contact_id
</name>
773 <table>civicrm_contact
</table>
776 <onDelete>SET NULL
</onDelete>
779 <name>organization_name
</name>
786 <import>true
</import>
787 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
788 <dataPattern>/^\w+$/
</dataPattern>
789 <comment>Organization Name.
</comment>
794 <name>index_organization_name
</name>
795 <fieldName>organization_name
</fieldName>
799 <name>sic_code
</name>
802 <import>true
</import>
803 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
804 <comment>Standard Industry Classification Code.
</comment>
811 <name>user_unique_id
</name>
813 <title>Unique ID (OpenID)
</title>
816 <import>true
</import>
817 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
818 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
819 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
826 <name>employer_id
</name>
827 <title>Current Employer
</title>
828 <uniqueName>current_employer_id
</uniqueName>
829 <type>int unsigned
</type>
830 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
831 <export>true
</export>
834 <type>EntityRef
</type>
838 <name>employer_id
</name>
839 <table>civicrm_contact
</table>
842 <onDelete>SET NULL
</onDelete>
845 <name>is_deleted
</name>
846 <title>Contact is in Trash
</title>
847 <uniqueName>contact_is_deleted
</uniqueName>
850 <required>true
</required>
851 <export>true
</export>
854 <type>CheckBox
</type>
858 <name>index_is_deleted
</name>
859 <fieldName>is_deleted
</fieldName>
864 <name>index_is_deleted_sort_name
</name>
865 <fieldName>is_deleted
</fieldName>
866 <fieldName>sort_name
</fieldName>
867 <fieldName>id
</fieldName>
871 <name>created_date
</name>
872 <type>timestamp
</type>
873 <comment>When was the contact was created.
</comment>
874 <required>false
</required>
875 <export>true
</export>
876 <default>NULL
</default>
880 <name>index_created_date
</name>
881 <fieldName>created_date
</fieldName>
885 <name>modified_date
</name>
886 <type>timestamp
</type>
887 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
888 <required>false
</required>
889 <export>true
</export>
890 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
894 <name>index_modified_date
</name>
895 <fieldName>modified_date
</fieldName>