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>
42 <contactType>null
</contactType>
45 <name>index_contact_type
</name>
46 <fieldName>contact_type
</fieldName>
50 <name>contact_sub_type
</name>
51 <title>Contact Subtype
</title>
56 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
57 <comment>May be used to over-ride contact view and edit templates.
</comment>
59 <table>civicrm_contact_type
</table>
60 <keyColumn>name
</keyColumn>
61 <labelColumn>label
</labelColumn>
62 <condition>parent_id IS NOT NULL
</condition>
66 <multiple>1</multiple>
68 <serialize>SEPARATOR_BOOKEND
</serialize>
72 <name>index_contact_sub_type
</name>
73 <fieldName>contact_sub_type
</fieldName>
77 <name>do_not_email
</name>
80 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
81 <dataPattern>/^\d{
1,}$/
</dataPattern>
89 <name>do_not_phone
</name>
93 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
94 <dataPattern>/^\d{
1,}$/
</dataPattern>
101 <name>do_not_mail
</name>
103 <import>true
</import>
104 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
105 <dataPattern>/^\d{
1,}$/
</dataPattern>
109 <type>CheckBox
</type>
113 <name>do_not_sms
</name>
115 <import>true
</import>
116 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
117 <dataPattern>/^\d{
1,}$/
</dataPattern>
121 <type>CheckBox
</type>
125 <name>do_not_trade
</name>
127 <import>true
</import>
128 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
129 <dataPattern>/^\d{
1,}$/
</dataPattern>
133 <type>CheckBox
</type>
137 <name>is_opt_out
</name>
139 <title>No Bulk Emails (User Opt Out)
</title>
141 <import>true
</import>
142 <required>true
</required>
143 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
146 <type>CheckBox
</type>
150 <name>legal_identifier
</name>
153 <import>true
</import>
154 <headerPattern>/legal\s?id/i
</headerPattern>
155 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
156 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
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>
241 <contactType>Organization
</contactType>
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>
254 <import>true
</import>
255 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
256 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
257 <comment>optional
"home page" URL for this contact.
</comment>
262 <name>image_URL
</name>
264 <import>true
</import>
265 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
273 <name>preferred_communication_method
</name>
274 <title>Preferred Communication Method
</title>
277 <import>true
</import>
278 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
279 <dataPattern>/^\w+$/
</dataPattern>
280 <comment>What is the preferred mode of communication.
</comment>
283 <optionGroupName>preferred_communication_method
</optionGroupName>
287 <multiple>1</multiple>
289 <serialize>SEPARATOR_BOOKEND
</serialize>
292 <name>index_preferred_communication_method
</name>
293 <fieldName>preferred_communication_method
</fieldName>
297 <name>preferred_language
</name>
298 <title>Preferred Language
</title>
301 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
302 <headerPattern>/^lang/i
</headerPattern>
303 <import>true
</import>
305 <optionGroupName>languages
</optionGroupName>
306 <keyColumn>name
</keyColumn>
314 <name>preferred_mail_format
</name>
317 <default>"Both"</default>
318 <import>true
</import>
319 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
320 <comment>What is the preferred mode of sending an email.
</comment>
323 <callback>CRM_Core_SelectValues::pmf
</callback>
331 <title>Contact Hash
</title>
334 <comment>Key for validating requests related to this contact.
</comment>
337 <export>true
</export>
340 <name>index_hash
</name>
341 <fieldName>hash
</fieldName>
348 <comment>API Key for validating requests related to this contact.
</comment>
351 <or>administer CiviCRM, edit api keys
</or>
355 <name>index_api_key
</name>
356 <fieldName>api_key
</fieldName>
361 <title>Contact Source
</title>
362 <uniqueName>contact_source
</uniqueName>
370 <import>true
</import>
371 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
372 <comment>where contact come from, e.g. import, donate module insert...
</comment>
376 <name>first_name
</name>
383 <import>true
</import>
384 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
385 <dataPattern>/^\w+$/
</dataPattern>
387 <comment>First Name.
</comment>
389 <contactType>Individual
</contactType>
392 <name>index_first_name
</name>
393 <fieldName>first_name
</fieldName>
397 <name>middle_name
</name>
404 <import>true
</import>
405 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
406 <dataPattern>/^\w+$/
</dataPattern>
408 <comment>Middle Name.
</comment>
410 <contactType>Individual
</contactType>
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>
426 <contactType>Individual
</contactType>
429 <name>index_last_name
</name>
430 <fieldName>last_name
</fieldName>
434 <name>prefix_id
</name>
435 <title>Individual Prefix
</title>
436 <type>int unsigned
</type>
437 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
439 <optionGroupName>individual_prefix
</optionGroupName>
444 <headerPattern>/^(prefix|title)/i
</headerPattern>
445 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
446 <import>true
</import>
448 <contactType>Individual
</contactType>
451 <name>UI_prefix
</name>
452 <fieldName>prefix_id
</fieldName>
456 <name>suffix_id
</name>
457 <title>Individual Suffix
</title>
458 <type>int unsigned
</type>
460 <optionGroupName>individual_suffix
</optionGroupName>
465 <import>true
</import>
466 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
467 <headerPattern>/^suffix$/i
</headerPattern>
468 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
470 <contactType>Individual
</contactType>
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>
488 <contactType>Individual
</contactType>
491 <name>communication_style_id
</name>
492 <title>Communication Style
</title>
493 <type>int unsigned
</type>
495 <optionGroupName>communication_style
</optionGroupName>
497 <export>true
</export>
498 <import>true
</import>
499 <headerPattern>/style/i
</headerPattern>
500 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
507 <name>index_communication_style_id
</name>
508 <fieldName>communication_style_id
</fieldName>
512 <name>greeting_type
</name>
515 <import>true
</import>
516 <comment>Preferred greeting format.
</comment>
521 <name>greeting_type_id
</name>
522 <title>Greeting Type
</title>
523 <type>int unsigned
</type>
524 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
529 <name>custom_greeting
</name>
532 <import>true
</import>
533 <comment>Custom greeting message.
</comment>
538 <name>email_greeting_id
</name>
539 <type>int unsigned
</type>
540 <title>Email Greeting ID
</title>
541 <export>true
</export>
542 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
548 <optionGroupName>email_greeting
</optionGroupName>
552 <name>email_greeting_custom
</name>
555 <import>true
</import>
556 <export>false
</export>
557 <comment>Custom Email Greeting.
</comment>
564 <name>email_greeting_display
</name>
565 <title>Email Greeting
</title>
568 <comment>Cache Email Greeting.
</comment>
572 <name>postal_greeting_id
</name>
573 <type>int unsigned
</type>
574 <title>Postal Greeting ID
</title>
575 <export>true
</export>
576 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
582 <optionGroupName>postal_greeting
</optionGroupName>
586 <name>postal_greeting_custom
</name>
589 <import>true
</import>
590 <export>false
</export>
591 <comment>Custom Postal greeting.
</comment>
598 <name>postal_greeting_display
</name>
599 <title>Postal Greeting
</title>
602 <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>
616 <optionGroupName>addressee
</optionGroupName>
620 <name>addressee_custom
</name>
623 <import>true
</import>
624 <export>false
</export>
625 <comment>Custom Addressee.
</comment>
632 <name>addressee_display
</name>
633 <title>Addressee
</title>
636 <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>
652 <contactType>Individual
</contactType>
655 <name>gender_id
</name>
656 <title>Gender
</title>
657 <type>int unsigned
</type>
659 <optionGroupName>gender
</optionGroupName>
664 <headerPattern>/^gender$/i
</headerPattern>
665 <comment>FK to gender ID
</comment>
666 <import>true
</import>
668 <contactType>Individual
</contactType>
671 <name>UI_gender
</name>
672 <fieldName>gender_id
</fieldName>
676 <name>birth_date
</name>
678 <import>true
</import>
679 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
680 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
681 <comment>Date of birth
</comment>
684 <type>Select Date
</type>
685 <formatType>birth
</formatType>
687 <contactType>Individual
</contactType>
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>
701 <contactType>Individual
</contactType>
704 <name>index_is_deceased
</name>
705 <fieldName>is_deceased
</fieldName>
709 <name>deceased_date
</name>
711 <import>true
</import>
712 <export>true
</export>
713 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
714 <comment>Date of deceased
</comment>
717 <type>Select Date
</type>
718 <formatType>birth
</formatType>
720 <contactType>Individual
</contactType>
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>
753 <contactType>Household
</contactType>
756 <name>index_household_name
</name>
757 <fieldName>household_name
</fieldName>
761 <name>primary_contact_id
</name>
762 <type>int unsigned
</type>
763 <title>Household Primary Contact ID
</title>
764 <comment>Optional FK to Primary Contact for this household.
</comment>
766 <contactType>Household
</contactType>
769 <name>primary_contact_id
</name>
770 <table>civicrm_contact
</table>
773 <onDelete>SET NULL
</onDelete>
776 <name>organization_name
</name>
783 <import>true
</import>
784 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
785 <dataPattern>/^\w+$/
</dataPattern>
786 <comment>Organization Name.
</comment>
789 <contactType>Organization
</contactType>
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>
807 <contactType>Organization
</contactType>
810 <name>user_unique_id
</name>
812 <title>Unique ID (OpenID)
</title>
815 <import>true
</import>
816 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
817 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
818 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
825 <name>employer_id
</name>
826 <title>Current Employer
</title>
827 <uniqueName>current_employer_id
</uniqueName>
828 <type>int unsigned
</type>
829 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
830 <export>true
</export>
833 <type>EntityRef
</type>
835 <contactType>Individual
</contactType>
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>