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>
12 <add>civicrm/contact/add?reset=
1&ct=[contact_type]
</add>
13 <view>civicrm/contact/view?reset=
1&cid=[id]
</view>
14 <update>civicrm/contact/add?reset=
1&action=update
&cid=[id]
</update>
15 <delete>civicrm/contact/view/delete?reset=
1&delete=
1&cid=[id]
</delete>
19 <type>int unsigned
</type>
20 <title>Contact ID
</title>
22 <headerPattern>/internal|contact?|id$/i
</headerPattern>
23 <required>true
</required>
24 <comment>Unique Contact ID
</comment>
29 <autoincrement>true
</autoincrement>
32 <name>contact_type
</name>
33 <title>Contact Type
</title>
36 <comment>Type of Contact.
</comment>
39 <table>civicrm_contact_type
</table>
40 <keyColumn>name
</keyColumn>
41 <labelColumn>label
</labelColumn>
42 <condition>parent_id IS NULL
</condition>
49 <contactType>null
</contactType>
52 <name>index_contact_type
</name>
53 <fieldName>contact_type
</fieldName>
57 <name>contact_sub_type
</name>
58 <title>Contact Subtype
</title>
63 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
64 <comment>May be used to over-ride contact view and edit templates.
</comment>
66 <table>civicrm_contact_type
</table>
67 <keyColumn>name
</keyColumn>
68 <labelColumn>label
</labelColumn>
69 <condition>parent_id IS NOT NULL
</condition>
73 <multiple>1</multiple>
75 <serialize>SEPARATOR_BOOKEND
</serialize>
79 <name>index_contact_sub_type
</name>
80 <fieldName>contact_sub_type
</fieldName>
84 <name>do_not_email
</name>
87 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
88 <dataPattern>/^\d{
1,}$/
</dataPattern>
96 <name>do_not_phone
</name>
100 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
101 <dataPattern>/^\d{
1,}$/
</dataPattern>
104 <type>CheckBox
</type>
108 <name>do_not_mail
</name>
110 <import>true
</import>
111 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
112 <dataPattern>/^\d{
1,}$/
</dataPattern>
116 <type>CheckBox
</type>
120 <name>do_not_sms
</name>
122 <import>true
</import>
123 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
124 <dataPattern>/^\d{
1,}$/
</dataPattern>
128 <type>CheckBox
</type>
132 <name>do_not_trade
</name>
134 <import>true
</import>
135 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
136 <dataPattern>/^\d{
1,}$/
</dataPattern>
140 <type>CheckBox
</type>
144 <name>is_opt_out
</name>
146 <title>No Bulk Emails (User Opt Out)
</title>
148 <import>true
</import>
149 <required>true
</required>
150 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
153 <type>CheckBox
</type>
157 <name>legal_identifier
</name>
160 <import>true
</import>
161 <headerPattern>/legal\s?id/i
</headerPattern>
162 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
163 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
170 <name>external_identifier
</name>
178 <import>true
</import>
179 <headerPattern>/external\s?id/i
</headerPattern>
180 <dataPattern>/^\d{
11,}$/
</dataPattern>
181 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
185 <name>UI_external_identifier
</name>
186 <unique>true
</unique>
187 <fieldName>external_identifier
</fieldName>
191 <name>sort_name
</name>
192 <title>Sort Name
</title>
200 <export>true
</export>
201 <comment>Name used for sorting different contact types
</comment>
205 <name>index_sort_name
</name>
206 <fieldName>sort_name
</fieldName>
210 <name>display_name
</name>
211 <title>Display Name
</title>
219 <export>true
</export>
220 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
224 <name>nick_name
</name>
225 <title>Nickname
</title>
233 <import>true
</import>
234 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
235 <dataPattern>/^\w+$/
</dataPattern>
236 <comment>Nickname.
</comment>
241 <name>legal_name
</name>
248 <contactType>Organization
</contactType>
249 <import>true
</import>
250 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
251 <comment>Legal Name.
</comment>
256 <name>image_URL
</name>
258 <import>true
</import>
259 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
267 <name>preferred_communication_method
</name>
268 <title>Preferred Communication Method
</title>
271 <import>true
</import>
272 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
273 <dataPattern>/^\w+$/
</dataPattern>
274 <comment>What is the preferred mode of communication.
</comment>
277 <optionGroupName>preferred_communication_method
</optionGroupName>
281 <multiple>1</multiple>
283 <serialize>SEPARATOR_BOOKEND
</serialize>
286 <name>index_preferred_communication_method
</name>
287 <fieldName>preferred_communication_method
</fieldName>
291 <name>preferred_language
</name>
292 <title>Preferred Language
</title>
295 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
296 <headerPattern>/^lang/i
</headerPattern>
297 <import>true
</import>
299 <optionGroupName>languages
</optionGroupName>
300 <keyColumn>name
</keyColumn>
308 <name>preferred_mail_format
</name>
311 <default>"Both"</default>
312 <import>true
</import>
313 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
314 <comment>What is the preferred mode of sending an email.
</comment>
317 <callback>CRM_Core_SelectValues::pmf
</callback>
325 <title>Contact Hash
</title>
328 <comment>Key for validating requests related to this contact.
</comment>
331 <export>true
</export>
334 <name>index_hash
</name>
335 <fieldName>hash
</fieldName>
342 <comment>API Key for validating requests related to this contact.
</comment>
345 <or>administer CiviCRM, edit api keys
</or>
349 <name>index_api_key
</name>
350 <fieldName>api_key
</fieldName>
355 <title>Contact Source
</title>
356 <uniqueName>contact_source
</uniqueName>
364 <import>true
</import>
365 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
366 <comment>where contact come from, e.g. import, donate module insert...
</comment>
370 <name>first_name
</name>
377 <import>true
</import>
378 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
379 <dataPattern>/^\w+$/
</dataPattern>
381 <comment>First Name.
</comment>
383 <contactType>Individual
</contactType>
386 <name>index_first_name
</name>
387 <fieldName>first_name
</fieldName>
391 <name>middle_name
</name>
398 <import>true
</import>
399 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
400 <dataPattern>/^\w+$/
</dataPattern>
402 <comment>Middle Name.
</comment>
404 <contactType>Individual
</contactType>
407 <name>last_name
</name>
414 <import>true
</import>
415 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
416 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
417 <comment>Last Name.
</comment>
420 <contactType>Individual
</contactType>
423 <name>index_last_name
</name>
424 <fieldName>last_name
</fieldName>
428 <name>prefix_id
</name>
429 <title>Individual Prefix
</title>
430 <type>int unsigned
</type>
431 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
433 <optionGroupName>individual_prefix
</optionGroupName>
438 <headerPattern>/^(prefix|title)/i
</headerPattern>
439 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
440 <import>true
</import>
442 <contactType>Individual
</contactType>
445 <name>UI_prefix
</name>
446 <fieldName>prefix_id
</fieldName>
450 <name>suffix_id
</name>
451 <title>Individual Suffix
</title>
452 <type>int unsigned
</type>
454 <optionGroupName>individual_suffix
</optionGroupName>
459 <import>true
</import>
460 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
461 <headerPattern>/^suffix$/i
</headerPattern>
462 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
464 <contactType>Individual
</contactType>
467 <name>UI_suffix
</name>
468 <fieldName>suffix_id
</fieldName>
472 <name>formal_title
</name>
475 <import>true
</import>
479 <headerPattern>/^title/i
</headerPattern>
480 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
482 <contactType>Individual
</contactType>
485 <name>communication_style_id
</name>
486 <title>Communication Style
</title>
487 <type>int unsigned
</type>
489 <optionGroupName>communication_style
</optionGroupName>
491 <export>true
</export>
492 <import>true
</import>
493 <headerPattern>/style/i
</headerPattern>
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>email_greeting_id
</name>
507 <type>int unsigned
</type>
508 <title>Email Greeting ID
</title>
509 <export>true
</export>
510 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
516 <optionGroupName>email_greeting
</optionGroupName>
520 <name>email_greeting_custom
</name>
523 <import>true
</import>
524 <export>false
</export>
525 <comment>Custom Email Greeting.
</comment>
532 <name>email_greeting_display
</name>
533 <title>Email Greeting
</title>
536 <comment>Cache Email Greeting.
</comment>
540 <name>postal_greeting_id
</name>
541 <type>int unsigned
</type>
542 <title>Postal Greeting ID
</title>
543 <export>true
</export>
544 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
550 <optionGroupName>postal_greeting
</optionGroupName>
554 <name>postal_greeting_custom
</name>
557 <import>true
</import>
558 <export>false
</export>
559 <comment>Custom Postal greeting.
</comment>
566 <name>postal_greeting_display
</name>
567 <title>Postal Greeting
</title>
570 <comment>Cache Postal greeting.
</comment>
574 <name>addressee_id
</name>
575 <type>int unsigned
</type>
576 <title>Addressee ID
</title>
577 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
579 <export>true
</export>
584 <optionGroupName>addressee
</optionGroupName>
588 <name>addressee_custom
</name>
591 <import>true
</import>
592 <export>false
</export>
593 <comment>Custom Addressee.
</comment>
600 <name>addressee_display
</name>
601 <title>Addressee
</title>
604 <comment>Cache Addressee.
</comment>
608 <name>job_title
</name>
615 <import>true
</import>
616 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
617 <dataPattern>//
</dataPattern>
618 <comment>Job Title
</comment>
620 <contactType>Individual
</contactType>
623 <name>gender_id
</name>
624 <title>Gender ID
</title>
625 <type>int unsigned
</type>
627 <optionGroupName>gender
</optionGroupName>
631 <label>Gender
</label>
633 <headerPattern>/^gender$/i
</headerPattern>
634 <comment>FK to gender ID
</comment>
635 <import>true
</import>
637 <contactType>Individual
</contactType>
640 <name>UI_gender
</name>
641 <fieldName>gender_id
</fieldName>
645 <name>birth_date
</name>
647 <import>true
</import>
648 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
649 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
650 <comment>Date of birth
</comment>
653 <type>Select Date
</type>
654 <formatType>birth
</formatType>
656 <contactType>Individual
</contactType>
659 <name>is_deceased
</name>
660 <title>Deceased
</title>
661 <import>true
</import>
662 <export>true
</export>
663 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
667 <required>true
</required>
669 <type>CheckBox
</type>
671 <contactType>Individual
</contactType>
674 <name>index_is_deceased
</name>
675 <fieldName>is_deceased
</fieldName>
679 <name>deceased_date
</name>
681 <import>true
</import>
682 <export>true
</export>
683 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
684 <comment>Date of deceased
</comment>
687 <type>Select Date
</type>
688 <formatType>birth
</formatType>
690 <contactType>Individual
</contactType>
693 <name>household_name
</name>
700 <import>true
</import>
701 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
702 <dataPattern>/^\w+$/
</dataPattern>
703 <comment>Household Name.
</comment>
706 <contactType>Household
</contactType>
709 <name>index_household_name
</name>
710 <fieldName>household_name
</fieldName>
714 <name>primary_contact_id
</name>
715 <type>int unsigned
</type>
716 <title>Household Primary Contact ID
</title>
717 <comment>Optional FK to Primary Contact for this household.
</comment>
719 <contactType>Household
</contactType>
722 <name>primary_contact_id
</name>
723 <table>civicrm_contact
</table>
726 <onDelete>SET NULL
</onDelete>
729 <name>organization_name
</name>
736 <import>true
</import>
737 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
738 <dataPattern>/^\w+$/
</dataPattern>
739 <comment>Organization Name.
</comment>
742 <contactType>Organization
</contactType>
745 <name>index_organization_name
</name>
746 <fieldName>organization_name
</fieldName>
750 <name>sic_code
</name>
753 <import>true
</import>
754 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
755 <comment>Standard Industry Classification Code.
</comment>
760 <contactType>Organization
</contactType>
763 <name>user_unique_id
</name>
765 <title>Unique ID (OpenID)
</title>
768 <import>true
</import>
769 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
770 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
771 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
778 <name>employer_id
</name>
779 <title>Current Employer ID
</title>
780 <uniqueName>current_employer_id
</uniqueName>
781 <type>int unsigned
</type>
782 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
783 <export>true
</export>
786 <type>EntityRef
</type>
787 <label>Current Employer
</label>
789 <contactType>Individual
</contactType>
792 <name>employer_id
</name>
793 <table>civicrm_contact
</table>
796 <onDelete>SET NULL
</onDelete>
799 <name>is_deleted
</name>
800 <title>Contact is in Trash
</title>
801 <uniqueName>contact_is_deleted
</uniqueName>
804 <required>true
</required>
805 <export>true
</export>
808 <type>CheckBox
</type>
810 <permission>access deleted contacts
</permission>
813 <name>index_is_deleted_sort_name
</name>
814 <fieldName>is_deleted
</fieldName>
815 <fieldName>sort_name
</fieldName>
816 <fieldName>id
</fieldName>
820 <name>created_date
</name>
821 <type>timestamp
</type>
822 <comment>When was the contact was created.
</comment>
823 <required>false
</required>
824 <export>true
</export>
825 <default>NULL
</default>
829 <name>index_created_date
</name>
830 <fieldName>created_date
</fieldName>
834 <name>modified_date
</name>
835 <type>timestamp
</type>
836 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
837 <required>false
</required>
838 <export>true
</export>
839 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
843 <name>index_modified_date
</name>
844 <fieldName>modified_date
</fieldName>