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>
10 <icon>fa-address-book-o
</icon>
13 <type>int unsigned
</type>
14 <title>Contact ID
</title>
16 <headerPattern>/internal|contact?|id$/i
</headerPattern>
17 <required>true
</required>
18 <comment>Unique Contact ID
</comment>
23 <autoincrement>true
</autoincrement>
26 <name>contact_type
</name>
27 <title>Contact Type
</title>
30 <comment>Type of Contact.
</comment>
33 <table>civicrm_contact_type
</table>
34 <keyColumn>name
</keyColumn>
35 <labelColumn>label
</labelColumn>
36 <condition>parent_id IS NULL
</condition>
43 <contactType>null
</contactType>
46 <name>index_contact_type
</name>
47 <fieldName>contact_type
</fieldName>
51 <name>contact_sub_type
</name>
52 <title>Contact Subtype
</title>
57 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
58 <comment>May be used to over-ride contact view and edit templates.
</comment>
60 <table>civicrm_contact_type
</table>
61 <keyColumn>name
</keyColumn>
62 <labelColumn>label
</labelColumn>
63 <condition>parent_id IS NOT NULL
</condition>
67 <multiple>1</multiple>
69 <serialize>SEPARATOR_BOOKEND
</serialize>
73 <name>index_contact_sub_type
</name>
74 <fieldName>contact_sub_type
</fieldName>
78 <name>do_not_email
</name>
81 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
82 <dataPattern>/^\d{
1,}$/
</dataPattern>
90 <name>do_not_phone
</name>
94 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
95 <dataPattern>/^\d{
1,}$/
</dataPattern>
102 <name>do_not_mail
</name>
104 <import>true
</import>
105 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
106 <dataPattern>/^\d{
1,}$/
</dataPattern>
110 <type>CheckBox
</type>
114 <name>do_not_sms
</name>
116 <import>true
</import>
117 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
118 <dataPattern>/^\d{
1,}$/
</dataPattern>
122 <type>CheckBox
</type>
126 <name>do_not_trade
</name>
128 <import>true
</import>
129 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
130 <dataPattern>/^\d{
1,}$/
</dataPattern>
134 <type>CheckBox
</type>
138 <name>is_opt_out
</name>
140 <title>No Bulk Emails (User Opt Out)
</title>
142 <import>true
</import>
143 <required>true
</required>
144 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
147 <type>CheckBox
</type>
151 <name>legal_identifier
</name>
154 <import>true
</import>
155 <headerPattern>/legal\s?id/i
</headerPattern>
156 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
157 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
164 <name>external_identifier
</name>
172 <import>true
</import>
173 <headerPattern>/external\s?id/i
</headerPattern>
174 <dataPattern>/^\d{
11,}$/
</dataPattern>
175 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
179 <name>UI_external_identifier
</name>
180 <unique>true
</unique>
181 <fieldName>external_identifier
</fieldName>
185 <name>sort_name
</name>
186 <title>Sort Name
</title>
194 <export>true
</export>
195 <comment>Name used for sorting different contact types
</comment>
199 <name>index_sort_name
</name>
200 <fieldName>sort_name
</fieldName>
204 <name>display_name
</name>
205 <title>Display Name
</title>
213 <export>true
</export>
214 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
218 <name>nick_name
</name>
219 <title>Nickname
</title>
227 <import>true
</import>
228 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
229 <dataPattern>/^\w+$/
</dataPattern>
230 <comment>Nickname.
</comment>
235 <name>legal_name
</name>
242 <contactType>Organization
</contactType>
243 <import>true
</import>
244 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
245 <comment>Legal Name.
</comment>
250 <name>home_URL
</name>
252 <title>Website
</title>
255 <import>true
</import>
256 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
257 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
258 <comment>optional
"home page" URL for this contact.
</comment>
263 <name>image_URL
</name>
265 <import>true
</import>
266 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
274 <name>preferred_communication_method
</name>
275 <title>Preferred Communication Method
</title>
278 <import>true
</import>
279 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
280 <dataPattern>/^\w+$/
</dataPattern>
281 <comment>What is the preferred mode of communication.
</comment>
284 <optionGroupName>preferred_communication_method
</optionGroupName>
288 <multiple>1</multiple>
290 <serialize>SEPARATOR_BOOKEND
</serialize>
293 <name>index_preferred_communication_method
</name>
294 <fieldName>preferred_communication_method
</fieldName>
298 <name>preferred_language
</name>
299 <title>Preferred Language
</title>
302 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
303 <headerPattern>/^lang/i
</headerPattern>
304 <import>true
</import>
306 <optionGroupName>languages
</optionGroupName>
307 <keyColumn>name
</keyColumn>
315 <name>preferred_mail_format
</name>
318 <default>"Both"</default>
319 <import>true
</import>
320 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
321 <comment>What is the preferred mode of sending an email.
</comment>
324 <callback>CRM_Core_SelectValues::pmf
</callback>
332 <title>Contact Hash
</title>
335 <comment>Key for validating requests related to this contact.
</comment>
338 <export>true
</export>
341 <name>index_hash
</name>
342 <fieldName>hash
</fieldName>
349 <comment>API Key for validating requests related to this contact.
</comment>
352 <or>administer CiviCRM, edit api keys
</or>
356 <name>index_api_key
</name>
357 <fieldName>api_key
</fieldName>
362 <title>Contact Source
</title>
363 <uniqueName>contact_source
</uniqueName>
371 <import>true
</import>
372 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
373 <comment>where contact come from, e.g. import, donate module insert...
</comment>
377 <name>first_name
</name>
384 <import>true
</import>
385 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
386 <dataPattern>/^\w+$/
</dataPattern>
388 <comment>First Name.
</comment>
390 <contactType>Individual
</contactType>
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>
411 <contactType>Individual
</contactType>
414 <name>last_name
</name>
421 <import>true
</import>
422 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
423 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
424 <comment>Last Name.
</comment>
427 <contactType>Individual
</contactType>
430 <name>index_last_name
</name>
431 <fieldName>last_name
</fieldName>
435 <name>prefix_id
</name>
436 <title>Individual Prefix
</title>
437 <type>int unsigned
</type>
438 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
440 <optionGroupName>individual_prefix
</optionGroupName>
445 <headerPattern>/^(prefix|title)/i
</headerPattern>
446 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
447 <import>true
</import>
449 <contactType>Individual
</contactType>
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>
471 <contactType>Individual
</contactType>
474 <name>UI_suffix
</name>
475 <fieldName>suffix_id
</fieldName>
479 <name>formal_title
</name>
482 <import>true
</import>
486 <headerPattern>/^title/i
</headerPattern>
487 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
489 <contactType>Individual
</contactType>
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>
549 <optionGroupName>email_greeting
</optionGroupName>
553 <name>email_greeting_custom
</name>
556 <import>true
</import>
557 <export>false
</export>
558 <comment>Custom Email Greeting.
</comment>
565 <name>email_greeting_display
</name>
566 <title>Email Greeting
</title>
569 <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>
607 <name>addressee_id
</name>
608 <type>int unsigned
</type>
609 <title>Addressee ID
</title>
610 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
612 <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>
641 <name>job_title
</name>
648 <import>true
</import>
649 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
650 <dataPattern>//
</dataPattern>
651 <comment>Job Title
</comment>
653 <contactType>Individual
</contactType>
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>
669 <contactType>Individual
</contactType>
672 <name>UI_gender
</name>
673 <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>
688 <contactType>Individual
</contactType>
691 <name>is_deceased
</name>
692 <title>Deceased
</title>
693 <import>true
</import>
694 <export>true
</export>
695 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
699 <required>true
</required>
701 <type>CheckBox
</type>
703 <contactType>Individual
</contactType>
706 <name>index_is_deceased
</name>
707 <fieldName>is_deceased
</fieldName>
711 <name>deceased_date
</name>
713 <import>true
</import>
714 <export>true
</export>
715 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
716 <comment>Date of deceased
</comment>
719 <type>Select Date
</type>
720 <formatType>birth
</formatType>
722 <contactType>Individual
</contactType>
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>
755 <contactType>Household
</contactType>
758 <name>index_household_name
</name>
759 <fieldName>household_name
</fieldName>
763 <name>primary_contact_id
</name>
764 <type>int unsigned
</type>
765 <title>Household Primary Contact ID
</title>
766 <comment>Optional FK to Primary Contact for this household.
</comment>
768 <contactType>Household
</contactType>
771 <name>primary_contact_id
</name>
772 <table>civicrm_contact
</table>
775 <onDelete>SET NULL
</onDelete>
778 <name>organization_name
</name>
785 <import>true
</import>
786 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
787 <dataPattern>/^\w+$/
</dataPattern>
788 <comment>Organization Name.
</comment>
791 <contactType>Organization
</contactType>
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>
809 <contactType>Organization
</contactType>
812 <name>user_unique_id
</name>
814 <title>Unique ID (OpenID)
</title>
817 <import>true
</import>
818 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
819 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
820 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
827 <name>employer_id
</name>
828 <title>Current Employer
</title>
829 <uniqueName>current_employer_id
</uniqueName>
830 <type>int unsigned
</type>
831 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
832 <export>true
</export>
835 <type>EntityRef
</type>
837 <contactType>Individual
</contactType>
840 <name>employer_id
</name>
841 <table>civicrm_contact
</table>
844 <onDelete>SET NULL
</onDelete>
847 <name>is_deleted
</name>
848 <title>Contact is in Trash
</title>
849 <uniqueName>contact_is_deleted
</uniqueName>
852 <required>true
</required>
853 <export>true
</export>
856 <type>CheckBox
</type>
858 <permission>access deleted contacts
</permission>
861 <name>index_is_deleted
</name>
862 <fieldName>is_deleted
</fieldName>
867 <name>index_is_deleted_sort_name
</name>
868 <fieldName>is_deleted
</fieldName>
869 <fieldName>sort_name
</fieldName>
870 <fieldName>id
</fieldName>
874 <name>created_date
</name>
875 <type>timestamp
</type>
876 <comment>When was the contact was created.
</comment>
877 <required>false
</required>
878 <export>true
</export>
879 <default>NULL
</default>
883 <name>index_created_date
</name>
884 <fieldName>created_date
</fieldName>
888 <name>modified_date
</name>
889 <type>timestamp
</type>
890 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
891 <required>false
</required>
892 <export>true
</export>
893 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
897 <name>index_modified_date
</name>
898 <fieldName>modified_date
</fieldName>