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>
98 <label>Do Not Email
</label>
103 <name>do_not_phone
</name>
106 <import>true
</import>
107 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
108 <dataPattern>/^\d{
1,}$/
</dataPattern>
111 <type>CheckBox
</type>
112 <label>Do Not Phone
</label>
116 <name>do_not_mail
</name>
118 <import>true
</import>
119 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
120 <dataPattern>/^\d{
1,}$/
</dataPattern>
124 <type>CheckBox
</type>
125 <label>Do Not Mail
</label>
129 <name>do_not_sms
</name>
131 <import>true
</import>
132 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
133 <dataPattern>/^\d{
1,}$/
</dataPattern>
137 <type>CheckBox
</type>
138 <label>Do Not Sms
</label>
142 <name>do_not_trade
</name>
144 <import>true
</import>
145 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
146 <dataPattern>/^\d{
1,}$/
</dataPattern>
150 <type>CheckBox
</type>
151 <label>Do Not Trade
</label>
155 <name>is_opt_out
</name>
157 <title>No Bulk Emails (User Opt Out)
</title>
159 <import>true
</import>
160 <required>true
</required>
161 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
164 <type>CheckBox
</type>
165 <label>Is Opt Out
</label>
169 <name>legal_identifier
</name>
172 <import>true
</import>
173 <headerPattern>/legal\s?id/i
</headerPattern>
174 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
175 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
179 <label>Legal Identifier
</label>
183 <name>external_identifier
</name>
189 <label>External Identifier
</label>
192 <import>true
</import>
193 <headerPattern>/external\s?id/i
</headerPattern>
194 <dataPattern>/^\d{
11,}$/
</dataPattern>
195 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
199 <name>UI_external_identifier
</name>
200 <unique>true
</unique>
201 <fieldName>external_identifier
</fieldName>
205 <name>sort_name
</name>
206 <title>Sort Name
</title>
213 <readonly>true
</readonly>
214 <export>true
</export>
215 <comment>Name used for sorting different contact types
</comment>
219 <name>index_sort_name
</name>
220 <fieldName>sort_name
</fieldName>
224 <name>display_name
</name>
225 <title>Display Name
</title>
232 <readonly>true
</readonly>
233 <export>true
</export>
234 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
238 <name>nick_name
</name>
239 <title>Nickname
</title>
247 <import>true
</import>
248 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
249 <dataPattern>/^\w+$/
</dataPattern>
250 <comment>Nickname.
</comment>
255 <name>legal_name
</name>
261 <label>Legal Name
</label>
263 <contactType>Organization
</contactType>
264 <import>true
</import>
265 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
266 <comment>Legal Name.
</comment>
271 <name>image_URL
</name>
273 <import>true
</import>
274 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
279 <label>Image URL
</label>
283 <name>preferred_communication_method
</name>
284 <title>Preferred Communication Method
</title>
287 <import>true
</import>
288 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
289 <dataPattern>/^\w+$/
</dataPattern>
290 <comment>What is the preferred mode of communication.
</comment>
293 <optionGroupName>preferred_communication_method
</optionGroupName>
297 <multiple>1</multiple>
299 <serialize>SEPARATOR_BOOKEND
</serialize>
302 <name>index_preferred_communication_method
</name>
303 <fieldName>preferred_communication_method
</fieldName>
307 <name>preferred_language
</name>
308 <title>Preferred Language
</title>
311 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
312 <headerPattern>/^lang/i
</headerPattern>
313 <import>true
</import>
315 <optionGroupName>languages
</optionGroupName>
316 <keyColumn>name
</keyColumn>
324 <name>preferred_mail_format
</name>
327 <default>"Both"</default>
328 <import>true
</import>
329 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
330 <comment>What is the preferred mode of sending an email.
</comment>
333 <callback>CRM_Core_SelectValues::pmf
</callback>
337 <label>Preferred Mail Format
</label>
342 <title>Contact Hash
</title>
345 <comment>Key for validating requests related to this contact.
</comment>
348 <export>true
</export>
349 <readonly>true
</readonly>
352 <name>index_hash
</name>
353 <fieldName>hash
</fieldName>
360 <comment>API Key for validating requests related to this contact.
</comment>
362 <label>API KEY
</label>
365 <readonly>true
</readonly>
367 <or>administer CiviCRM, edit api keys
</or>
371 <name>index_api_key
</name>
372 <fieldName>api_key
</fieldName>
377 <title>Contact Source
</title>
378 <uniqueName>contact_source
</uniqueName>
386 <import>true
</import>
387 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
388 <comment>where contact come from, e.g. import, donate module insert...
</comment>
392 <name>first_name
</name>
398 <label>First Name
</label>
400 <import>true
</import>
401 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
402 <dataPattern>/^\w+$/
</dataPattern>
404 <comment>First Name.
</comment>
406 <contactType>Individual
</contactType>
409 <name>index_first_name
</name>
410 <fieldName>first_name
</fieldName>
414 <name>middle_name
</name>
420 <label>Middle Name
</label>
422 <import>true
</import>
423 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
424 <dataPattern>/^\w+$/
</dataPattern>
426 <comment>Middle Name.
</comment>
428 <contactType>Individual
</contactType>
431 <name>last_name
</name>
437 <label>Last Name
</label>
439 <import>true
</import>
440 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
441 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
442 <comment>Last Name.
</comment>
445 <contactType>Individual
</contactType>
448 <name>index_last_name
</name>
449 <fieldName>last_name
</fieldName>
453 <name>prefix_id
</name>
454 <title>Individual Prefix
</title>
455 <type>int unsigned
</type>
456 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
458 <optionGroupName>individual_prefix
</optionGroupName>
463 <headerPattern>/^(prefix|title)/i
</headerPattern>
464 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
465 <import>true
</import>
467 <contactType>Individual
</contactType>
470 <name>UI_prefix
</name>
471 <fieldName>prefix_id
</fieldName>
475 <name>suffix_id
</name>
476 <title>Individual Suffix
</title>
477 <type>int unsigned
</type>
479 <optionGroupName>individual_suffix
</optionGroupName>
484 <import>true
</import>
485 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
486 <headerPattern>/^suffix$/i
</headerPattern>
487 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
489 <contactType>Individual
</contactType>
492 <name>UI_suffix
</name>
493 <fieldName>suffix_id
</fieldName>
497 <name>formal_title
</name>
500 <import>true
</import>
503 <label>Formal Title
</label>
505 <headerPattern>/^title/i
</headerPattern>
506 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
508 <contactType>Individual
</contactType>
511 <name>communication_style_id
</name>
512 <title>Communication Style
</title>
513 <type>int unsigned
</type>
515 <optionGroupName>communication_style
</optionGroupName>
517 <export>true
</export>
518 <import>true
</import>
519 <headerPattern>/style/i
</headerPattern>
520 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
527 <name>index_communication_style_id
</name>
528 <fieldName>communication_style_id
</fieldName>
532 <name>email_greeting_id
</name>
533 <type>int unsigned
</type>
534 <title>Email Greeting ID
</title>
535 <export>true
</export>
536 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
542 <optionGroupName>email_greeting
</optionGroupName>
546 <name>email_greeting_custom
</name>
549 <import>true
</import>
550 <export>false
</export>
551 <comment>Custom Email Greeting.
</comment>
555 <label>Email Greeting Custom
</label>
559 <name>email_greeting_display
</name>
560 <title>Email Greeting
</title>
563 <comment>Cache Email Greeting.
</comment>
564 <readonly>true
</readonly>
568 <name>postal_greeting_id
</name>
569 <type>int unsigned
</type>
570 <title>Postal Greeting ID
</title>
571 <export>true
</export>
572 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
578 <optionGroupName>postal_greeting
</optionGroupName>
582 <name>postal_greeting_custom
</name>
585 <import>true
</import>
586 <export>false
</export>
587 <comment>Custom Postal greeting.
</comment>
591 <label>Postal Greeting Custom
</label>
595 <name>postal_greeting_display
</name>
596 <title>Postal Greeting
</title>
599 <comment>Cache Postal greeting.
</comment>
600 <readonly>true
</readonly>
604 <name>addressee_id
</name>
605 <type>int unsigned
</type>
606 <title>Addressee ID
</title>
607 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
609 <export>true
</export>
614 <optionGroupName>addressee
</optionGroupName>
618 <name>addressee_custom
</name>
621 <import>true
</import>
622 <export>false
</export>
623 <comment>Custom Addressee.
</comment>
627 <label>Addressee Custom
</label>
631 <name>addressee_display
</name>
632 <title>Addressee
</title>
635 <comment>Cache Addressee.
</comment>
636 <readonly>true
</readonly>
640 <name>job_title
</name>
646 <label>Job Title
</label>
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 ID
</title>
658 <type>int unsigned
</type>
660 <optionGroupName>gender
</optionGroupName>
664 <label>Gender
</label>
666 <headerPattern>/^gender$/i
</headerPattern>
667 <comment>FK to gender ID
</comment>
668 <import>true
</import>
670 <contactType>Individual
</contactType>
673 <name>UI_gender
</name>
674 <fieldName>gender_id
</fieldName>
678 <name>birth_date
</name>
680 <import>true
</import>
681 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
682 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
683 <comment>Date of birth
</comment>
686 <type>Select Date
</type>
687 <formatType>birth
</formatType>
688 <label>Birth Date
</label>
690 <contactType>Individual
</contactType>
693 <name>is_deceased
</name>
694 <title>Deceased
</title>
695 <import>true
</import>
696 <export>true
</export>
697 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
701 <required>true
</required>
703 <type>CheckBox
</type>
704 <label>Is Deceased
</label>
706 <contactType>Individual
</contactType>
709 <name>index_is_deceased
</name>
710 <fieldName>is_deceased
</fieldName>
714 <name>deceased_date
</name>
716 <import>true
</import>
717 <export>true
</export>
718 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
719 <comment>Date of deceased
</comment>
722 <type>Select Date
</type>
723 <formatType>birth
</formatType>
724 <label>Deceased Date
</label>
726 <contactType>Individual
</contactType>
729 <name>household_name
</name>
735 <label>Household Name
</label>
737 <import>true
</import>
738 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
739 <dataPattern>/^\w+$/
</dataPattern>
740 <comment>Household Name.
</comment>
743 <contactType>Household
</contactType>
746 <name>index_household_name
</name>
747 <fieldName>household_name
</fieldName>
751 <name>primary_contact_id
</name>
752 <type>int unsigned
</type>
753 <title>Household Primary Contact ID
</title>
754 <comment>Optional FK to Primary Contact for this household.
</comment>
756 <label>Household Primary Contact
</label>
759 <contactType>Household
</contactType>
760 <readonly>true
</readonly>
763 <name>primary_contact_id
</name>
764 <table>civicrm_contact
</table>
767 <onDelete>SET NULL
</onDelete>
770 <name>organization_name
</name>
776 <label>Organization Name
</label>
778 <import>true
</import>
779 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
780 <dataPattern>/^\w+$/
</dataPattern>
781 <comment>Organization Name.
</comment>
784 <contactType>Organization
</contactType>
787 <name>index_organization_name
</name>
788 <fieldName>organization_name
</fieldName>
792 <name>sic_code
</name>
795 <import>true
</import>
796 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
797 <comment>Standard Industry Classification Code.
</comment>
801 <label>SIC Code
</label>
803 <contactType>Organization
</contactType>
806 <name>user_unique_id
</name>
808 <title>Unique ID (OpenID)
</title>
811 <import>true
</import>
812 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
813 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
814 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
821 <name>employer_id
</name>
822 <title>Current Employer ID
</title>
823 <uniqueName>current_employer_id
</uniqueName>
824 <type>int unsigned
</type>
825 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
826 <export>true
</export>
829 <type>EntityRef
</type>
830 <label>Current Employer
</label>
832 <contactType>Individual
</contactType>
835 <name>employer_id
</name>
836 <table>civicrm_contact
</table>
839 <onDelete>SET NULL
</onDelete>
842 <name>is_deleted
</name>
843 <title>Contact is in Trash
</title>
844 <uniqueName>contact_is_deleted
</uniqueName>
847 <required>true
</required>
848 <export>true
</export>
851 <type>CheckBox
</type>
855 <name>index_is_deleted_sort_name
</name>
856 <fieldName>is_deleted
</fieldName>
857 <fieldName>sort_name
</fieldName>
858 <fieldName>id
</fieldName>
862 <name>created_date
</name>
863 <type>timestamp
</type>
864 <comment>When was the contact was created.
</comment>
865 <required>false
</required>
866 <export>true
</export>
867 <default>NULL
</default>
869 <label>Created Date
</label>
874 <name>index_created_date
</name>
875 <fieldName>created_date
</fieldName>
879 <name>modified_date
</name>
880 <type>timestamp
</type>
881 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
882 <required>false
</required>
883 <export>true
</export>
884 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
886 <label>Modified Date
</label>
888 <readonly>true
</readonly>
892 <name>index_modified_date
</name>
893 <fieldName>modified_date
</fieldName>