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>
8 <description>Individuals, organizations, households, etc.
</description>
11 <icon>fa-address-book-o
</icon>
12 <labelField>display_name
</labelField>
14 <add>civicrm/contact/add?reset=
1&ct=[contact_type]
</add>
15 <view>civicrm/contact/view?reset=
1&cid=[id]
</view>
16 <update>civicrm/contact/add?reset=
1&action=update
&cid=[id]
</update>
17 <delete>civicrm/contact/view/delete?reset=
1&delete=
1&cid=[id]
</delete>
21 <type>int unsigned
</type>
22 <title>Contact ID
</title>
24 <headerPattern>/internal|contact?|id$/i
</headerPattern>
25 <required>true
</required>
26 <comment>Unique Contact ID
</comment>
34 <autoincrement>true
</autoincrement>
37 <name>contact_type
</name>
38 <title>Contact Type
</title>
41 <comment>Type of Contact.
</comment>
44 <table>civicrm_contact_type
</table>
45 <keyColumn>name
</keyColumn>
46 <labelColumn>label
</labelColumn>
47 <condition>parent_id IS NULL
</condition>
52 <readonly>true
</readonly>
55 <contactType>null
</contactType>
58 <name>index_contact_type
</name>
59 <fieldName>contact_type
</fieldName>
63 <name>contact_sub_type
</name>
64 <title>Contact Subtype
</title>
69 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
70 <comment>May be used to over-ride contact view and edit templates.
</comment>
72 <table>civicrm_contact_type
</table>
73 <keyColumn>name
</keyColumn>
74 <labelColumn>label
</labelColumn>
75 <condition>parent_id IS NOT NULL
</condition>
79 <multiple>1</multiple>
81 <serialize>SEPARATOR_BOOKEND
</serialize>
85 <name>index_contact_sub_type
</name>
86 <fieldName>contact_sub_type
</fieldName>
90 <name>do_not_email
</name>
93 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
94 <dataPattern>/^\d{
1,}$/
</dataPattern>
96 <required>true
</required>
99 <label>Do Not Email
</label>
104 <name>do_not_phone
</name>
107 <required>true
</required>
108 <import>true
</import>
109 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
110 <dataPattern>/^\d{
1,}$/
</dataPattern>
113 <type>CheckBox
</type>
114 <label>Do Not Phone
</label>
118 <name>do_not_mail
</name>
120 <import>true
</import>
121 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
122 <dataPattern>/^\d{
1,}$/
</dataPattern>
124 <required>true
</required>
127 <type>CheckBox
</type>
128 <label>Do Not Mail
</label>
132 <name>do_not_sms
</name>
134 <import>true
</import>
135 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
136 <dataPattern>/^\d{
1,}$/
</dataPattern>
138 <required>true
</required>
141 <type>CheckBox
</type>
142 <label>Do Not Sms
</label>
146 <name>do_not_trade
</name>
148 <import>true
</import>
149 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
150 <dataPattern>/^\d{
1,}$/
</dataPattern>
152 <required>true
</required>
155 <type>CheckBox
</type>
156 <label>Do Not Trade
</label>
160 <name>is_opt_out
</name>
162 <title>No Bulk Emails (User Opt Out)
</title>
164 <required>true
</required>
165 <import>true
</import>
166 <required>true
</required>
167 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
170 <type>CheckBox
</type>
171 <label>Is Opt Out
</label>
175 <name>legal_identifier
</name>
178 <import>true
</import>
179 <headerPattern>/legal\s?id/i
</headerPattern>
180 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
181 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
185 <label>Legal Identifier
</label>
189 <name>external_identifier
</name>
195 <label>External Identifier
</label>
198 <import>true
</import>
199 <headerPattern>/external\s?id/i
</headerPattern>
200 <dataPattern>/^\d{
11,}$/
</dataPattern>
201 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
205 <name>UI_external_identifier
</name>
206 <unique>true
</unique>
207 <fieldName>external_identifier
</fieldName>
211 <name>sort_name
</name>
212 <title>Sort Name
</title>
219 <readonly>true
</readonly>
220 <export>true
</export>
221 <comment>Name used for sorting different contact types
</comment>
225 <name>index_sort_name
</name>
226 <fieldName>sort_name
</fieldName>
230 <name>display_name
</name>
231 <title>Display Name
</title>
238 <readonly>true
</readonly>
239 <export>true
</export>
240 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
244 <name>nick_name
</name>
245 <title>Nickname
</title>
253 <import>true
</import>
254 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
255 <dataPattern>/^\w+$/
</dataPattern>
256 <comment>Nickname.
</comment>
261 <name>legal_name
</name>
267 <label>Legal Name
</label>
269 <contactType>Organization
</contactType>
270 <import>true
</import>
271 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
272 <comment>Legal Name.
</comment>
277 <name>image_URL
</name>
279 <import>true
</import>
280 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
285 <label>Image URL
</label>
289 <name>preferred_communication_method
</name>
290 <title>Preferred Communication Method
</title>
293 <import>true
</import>
294 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
295 <dataPattern>/^\w+$/
</dataPattern>
296 <comment>What is the preferred mode of communication.
</comment>
299 <optionGroupName>preferred_communication_method
</optionGroupName>
303 <multiple>1</multiple>
305 <serialize>SEPARATOR_BOOKEND
</serialize>
308 <name>index_preferred_communication_method
</name>
309 <fieldName>preferred_communication_method
</fieldName>
313 <name>preferred_language
</name>
314 <title>Preferred Language
</title>
317 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
318 <headerPattern>/^lang/i
</headerPattern>
319 <import>true
</import>
321 <optionGroupName>languages
</optionGroupName>
322 <keyColumn>name
</keyColumn>
330 <name>preferred_mail_format
</name>
333 <default>"Both"</default>
334 <import>true
</import>
335 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
336 <comment>What is the preferred mode of sending an email.
</comment>
339 <callback>CRM_Core_SelectValues::pmf
</callback>
343 <label>Preferred Mail Format
</label>
348 <title>Contact Hash
</title>
351 <comment>Key for validating requests related to this contact.
</comment>
354 <export>true
</export>
355 <readonly>true
</readonly>
358 <name>index_hash
</name>
359 <fieldName>hash
</fieldName>
366 <comment>API Key for validating requests related to this contact.
</comment>
368 <label>API KEY
</label>
371 <readonly>true
</readonly>
373 <or>administer CiviCRM, edit api keys
</or>
377 <name>index_api_key
</name>
378 <fieldName>api_key
</fieldName>
383 <title>Contact Source
</title>
384 <uniqueName>contact_source
</uniqueName>
392 <import>true
</import>
393 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
394 <comment>where contact come from, e.g. import, donate module insert...
</comment>
398 <name>first_name
</name>
404 <label>First Name
</label>
406 <import>true
</import>
407 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
408 <dataPattern>/^\w+$/
</dataPattern>
410 <comment>First Name.
</comment>
412 <contactType>Individual
</contactType>
415 <name>index_first_name
</name>
416 <fieldName>first_name
</fieldName>
420 <name>middle_name
</name>
426 <label>Middle Name
</label>
428 <import>true
</import>
429 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
430 <dataPattern>/^\w+$/
</dataPattern>
432 <comment>Middle Name.
</comment>
434 <contactType>Individual
</contactType>
437 <name>last_name
</name>
443 <label>Last Name
</label>
445 <import>true
</import>
446 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
447 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
448 <comment>Last Name.
</comment>
451 <contactType>Individual
</contactType>
454 <name>index_last_name
</name>
455 <fieldName>last_name
</fieldName>
459 <name>prefix_id
</name>
460 <title>Individual Prefix
</title>
461 <type>int unsigned
</type>
462 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
464 <optionGroupName>individual_prefix
</optionGroupName>
469 <headerPattern>/^(prefix|title)/i
</headerPattern>
470 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
471 <import>true
</import>
473 <contactType>Individual
</contactType>
476 <name>UI_prefix
</name>
477 <fieldName>prefix_id
</fieldName>
481 <name>suffix_id
</name>
482 <title>Individual Suffix
</title>
483 <type>int unsigned
</type>
485 <optionGroupName>individual_suffix
</optionGroupName>
490 <import>true
</import>
491 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
492 <headerPattern>/^suffix$/i
</headerPattern>
493 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
495 <contactType>Individual
</contactType>
498 <name>UI_suffix
</name>
499 <fieldName>suffix_id
</fieldName>
503 <name>formal_title
</name>
506 <import>true
</import>
509 <label>Formal Title
</label>
511 <headerPattern>/^title/i
</headerPattern>
512 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
514 <contactType>Individual
</contactType>
517 <name>communication_style_id
</name>
518 <title>Communication Style
</title>
519 <type>int unsigned
</type>
521 <optionGroupName>communication_style
</optionGroupName>
523 <export>true
</export>
524 <import>true
</import>
525 <headerPattern>/style/i
</headerPattern>
526 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
533 <name>index_communication_style_id
</name>
534 <fieldName>communication_style_id
</fieldName>
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>
561 <label>Email Greeting Custom
</label>
565 <name>email_greeting_display
</name>
566 <title>Email Greeting
</title>
569 <comment>Cache Email Greeting.
</comment>
570 <readonly>true
</readonly>
574 <name>postal_greeting_id
</name>
575 <type>int unsigned
</type>
576 <title>Postal Greeting ID
</title>
577 <export>true
</export>
578 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
584 <optionGroupName>postal_greeting
</optionGroupName>
588 <name>postal_greeting_custom
</name>
591 <import>true
</import>
592 <export>false
</export>
593 <comment>Custom Postal greeting.
</comment>
597 <label>Postal Greeting Custom
</label>
601 <name>postal_greeting_display
</name>
602 <title>Postal Greeting
</title>
605 <comment>Cache Postal greeting.
</comment>
606 <readonly>true
</readonly>
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>
620 <optionGroupName>addressee
</optionGroupName>
624 <name>addressee_custom
</name>
627 <import>true
</import>
628 <export>false
</export>
629 <comment>Custom Addressee.
</comment>
633 <label>Addressee Custom
</label>
637 <name>addressee_display
</name>
638 <title>Addressee
</title>
641 <comment>Cache Addressee.
</comment>
642 <readonly>true
</readonly>
646 <name>job_title
</name>
652 <label>Job Title
</label>
654 <import>true
</import>
655 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
656 <dataPattern>//
</dataPattern>
657 <comment>Job Title
</comment>
659 <contactType>Individual
</contactType>
662 <name>gender_id
</name>
663 <title>Gender ID
</title>
664 <type>int unsigned
</type>
666 <optionGroupName>gender
</optionGroupName>
670 <label>Gender
</label>
672 <headerPattern>/^gender$/i
</headerPattern>
673 <comment>FK to gender ID
</comment>
674 <import>true
</import>
676 <contactType>Individual
</contactType>
679 <name>UI_gender
</name>
680 <fieldName>gender_id
</fieldName>
684 <name>birth_date
</name>
686 <import>true
</import>
687 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
688 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
689 <comment>Date of birth
</comment>
692 <type>Select Date
</type>
693 <formatType>birth
</formatType>
694 <label>Birth Date
</label>
696 <contactType>Individual
</contactType>
699 <name>is_deceased
</name>
700 <title>Deceased
</title>
701 <import>true
</import>
702 <export>true
</export>
703 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
707 <required>true
</required>
709 <type>CheckBox
</type>
710 <label>Is Deceased
</label>
712 <contactType>Individual
</contactType>
715 <name>index_is_deceased
</name>
716 <fieldName>is_deceased
</fieldName>
720 <name>deceased_date
</name>
722 <import>true
</import>
723 <export>true
</export>
724 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
725 <comment>Date of deceased
</comment>
728 <type>Select Date
</type>
729 <formatType>birth
</formatType>
730 <label>Deceased Date
</label>
732 <contactType>Individual
</contactType>
735 <name>household_name
</name>
741 <label>Household Name
</label>
743 <import>true
</import>
744 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
745 <dataPattern>/^\w+$/
</dataPattern>
746 <comment>Household Name.
</comment>
749 <contactType>Household
</contactType>
752 <name>index_household_name
</name>
753 <fieldName>household_name
</fieldName>
757 <name>primary_contact_id
</name>
758 <type>int unsigned
</type>
759 <title>Household Primary Contact ID
</title>
760 <comment>Optional FK to Primary Contact for this household.
</comment>
762 <label>Household Primary Contact
</label>
765 <contactType>Household
</contactType>
766 <readonly>true
</readonly>
769 <name>primary_contact_id
</name>
770 <table>civicrm_contact
</table>
773 <onDelete>SET NULL
</onDelete>
776 <name>organization_name
</name>
782 <label>Organization Name
</label>
784 <import>true
</import>
785 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
786 <dataPattern>/^\w+$/
</dataPattern>
787 <comment>Organization Name.
</comment>
790 <contactType>Organization
</contactType>
793 <name>index_organization_name
</name>
794 <fieldName>organization_name
</fieldName>
798 <name>sic_code
</name>
801 <import>true
</import>
802 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
803 <comment>Standard Industry Classification Code.
</comment>
807 <label>SIC Code
</label>
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 ID
</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>
836 <label>Current Employer
</label>
838 <contactType>Individual
</contactType>
841 <name>employer_id
</name>
842 <table>civicrm_contact
</table>
845 <onDelete>SET NULL
</onDelete>
848 <name>is_deleted
</name>
849 <title>Contact is in Trash
</title>
850 <uniqueName>contact_is_deleted
</uniqueName>
853 <required>true
</required>
854 <export>true
</export>
857 <type>CheckBox
</type>
861 <name>index_is_deleted_sort_name
</name>
862 <fieldName>is_deleted
</fieldName>
863 <fieldName>sort_name
</fieldName>
864 <fieldName>id
</fieldName>
868 <name>created_date
</name>
869 <type>timestamp
</type>
870 <comment>When was the contact was created.
</comment>
871 <required>false
</required>
872 <export>true
</export>
873 <default>NULL
</default>
875 <label>Created Date
</label>
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>
892 <label>Modified Date
</label>
894 <readonly>true
</readonly>
898 <name>index_modified_date
</name>
899 <fieldName>modified_date
</fieldName>