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>
44 <name>index_contact_type
</name>
45 <fieldName>contact_type
</fieldName>
49 <name>contact_sub_type
</name>
50 <title>Contact Subtype
</title>
55 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
56 <comment>May be used to over-ride contact view and edit templates.
</comment>
58 <table>civicrm_contact_type
</table>
59 <keyColumn>name
</keyColumn>
60 <labelColumn>label
</labelColumn>
61 <condition>parent_id IS NOT NULL
</condition>
65 <multiple>1</multiple>
67 <serialize>SEPARATOR_BOOKEND
</serialize>
71 <name>index_contact_sub_type
</name>
72 <fieldName>contact_sub_type
</fieldName>
76 <name>do_not_email
</name>
79 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
80 <dataPattern>/^\d{
1,}$/
</dataPattern>
88 <name>do_not_phone
</name>
92 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
93 <dataPattern>/^\d{
1,}$/
</dataPattern>
100 <name>do_not_mail
</name>
102 <import>true
</import>
103 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
104 <dataPattern>/^\d{
1,}$/
</dataPattern>
108 <type>CheckBox
</type>
112 <name>do_not_sms
</name>
114 <import>true
</import>
115 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
116 <dataPattern>/^\d{
1,}$/
</dataPattern>
120 <type>CheckBox
</type>
124 <name>do_not_trade
</name>
126 <import>true
</import>
127 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
128 <dataPattern>/^\d{
1,}$/
</dataPattern>
132 <type>CheckBox
</type>
136 <name>is_opt_out
</name>
138 <title>No Bulk Emails (User Opt Out)
</title>
140 <import>true
</import>
141 <required>true
</required>
142 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
145 <type>CheckBox
</type>
149 <name>legal_identifier
</name>
152 <import>true
</import>
153 <headerPattern>/legal\s?id/i
</headerPattern>
154 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
155 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
162 <name>external_identifier
</name>
170 <import>true
</import>
171 <headerPattern>/external\s?id/i
</headerPattern>
172 <dataPattern>/^\d{
11,}$/
</dataPattern>
173 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
177 <name>UI_external_identifier
</name>
178 <unique>true
</unique>
179 <fieldName>external_identifier
</fieldName>
183 <name>sort_name
</name>
184 <title>Sort Name
</title>
192 <export>true
</export>
193 <comment>Name used for sorting different contact types
</comment>
197 <name>index_sort_name
</name>
198 <fieldName>sort_name
</fieldName>
202 <name>display_name
</name>
203 <title>Display Name
</title>
211 <export>true
</export>
212 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
216 <name>nick_name
</name>
217 <title>Nickname
</title>
225 <import>true
</import>
226 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
227 <dataPattern>/^\w+$/
</dataPattern>
228 <comment>Nickname.
</comment>
233 <name>legal_name
</name>
241 <import>true
</import>
242 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
243 <comment>Legal Name.
</comment>
248 <name>home_URL
</name>
250 <title>Website
</title>
253 <import>true
</import>
254 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
255 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
256 <comment>optional
"home page" URL for this contact.
</comment>
261 <name>image_URL
</name>
263 <import>true
</import>
264 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
272 <name>preferred_communication_method
</name>
273 <title>Preferred Communication Method
</title>
276 <import>true
</import>
277 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
278 <dataPattern>/^\w+$/
</dataPattern>
279 <comment>What is the preferred mode of communication.
</comment>
282 <optionGroupName>preferred_communication_method
</optionGroupName>
286 <multiple>1</multiple>
288 <serialize>SEPARATOR_BOOKEND
</serialize>
291 <name>index_preferred_communication_method
</name>
292 <fieldName>preferred_communication_method
</fieldName>
296 <name>preferred_language
</name>
297 <title>Preferred Language
</title>
300 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
301 <headerPattern>/^lang/i
</headerPattern>
302 <import>true
</import>
304 <optionGroupName>languages
</optionGroupName>
305 <keyColumn>name
</keyColumn>
313 <name>preferred_mail_format
</name>
316 <default>"Both"</default>
317 <import>true
</import>
318 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
319 <comment>What is the preferred mode of sending an email.
</comment>
322 <callback>CRM_Core_SelectValues::pmf
</callback>
330 <title>Contact Hash
</title>
333 <comment>Key for validating requests related to this contact.
</comment>
336 <export>true
</export>
339 <name>index_hash
</name>
340 <fieldName>hash
</fieldName>
347 <comment>API Key for validating requests related to this contact.
</comment>
350 <or>administer CiviCRM, edit api keys
</or>
354 <name>index_api_key
</name>
355 <fieldName>api_key
</fieldName>
360 <title>Contact Source
</title>
361 <uniqueName>contact_source
</uniqueName>
369 <import>true
</import>
370 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
371 <comment>where contact come from, e.g. import, donate module insert...
</comment>
375 <name>first_name
</name>
382 <import>true
</import>
383 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
384 <dataPattern>/^\w+$/
</dataPattern>
386 <comment>First Name.
</comment>
390 <name>index_first_name
</name>
391 <fieldName>first_name
</fieldName>
395 <name>middle_name
</name>
402 <import>true
</import>
403 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
404 <dataPattern>/^\w+$/
</dataPattern>
406 <comment>Middle Name.
</comment>
410 <name>last_name
</name>
417 <import>true
</import>
418 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
419 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
420 <comment>Last Name.
</comment>
425 <name>index_last_name
</name>
426 <fieldName>last_name
</fieldName>
430 <name>prefix_id
</name>
431 <title>Individual Prefix
</title>
432 <type>int unsigned
</type>
433 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
435 <optionGroupName>individual_prefix
</optionGroupName>
440 <headerPattern>/^(prefix|title)/i
</headerPattern>
441 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
442 <import>true
</import>
446 <name>UI_prefix
</name>
447 <fieldName>prefix_id
</fieldName>
451 <name>suffix_id
</name>
452 <title>Individual Suffix
</title>
453 <type>int unsigned
</type>
455 <optionGroupName>individual_suffix
</optionGroupName>
460 <import>true
</import>
461 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
462 <headerPattern>/^suffix$/i
</headerPattern>
463 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
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>
484 <name>communication_style_id
</name>
485 <title>Communication Style
</title>
486 <type>int unsigned
</type>
488 <optionGroupName>communication_style
</optionGroupName>
490 <export>true
</export>
491 <import>true
</import>
492 <headerPattern>/style/i
</headerPattern>
493 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
500 <name>index_communication_style_id
</name>
501 <fieldName>communication_style_id
</fieldName>
505 <name>greeting_type
</name>
508 <import>true
</import>
509 <comment>Preferred greeting format.
</comment>
514 <name>greeting_type_id
</name>
515 <title>Greeting Type
</title>
516 <type>int unsigned
</type>
517 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
522 <name>custom_greeting
</name>
525 <import>true
</import>
526 <comment>Custom greeting message.
</comment>
531 <name>email_greeting_id
</name>
532 <type>int unsigned
</type>
533 <title>Email Greeting ID
</title>
534 <export>true
</export>
535 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
541 <optionGroupName>email_greeting
</optionGroupName>
545 <name>email_greeting_custom
</name>
548 <import>true
</import>
549 <export>false
</export>
550 <comment>Custom Email Greeting.
</comment>
557 <name>email_greeting_display
</name>
558 <title>Email Greeting
</title>
561 <comment>Cache Email Greeting.
</comment>
565 <name>postal_greeting_id
</name>
566 <type>int unsigned
</type>
567 <title>Postal Greeting ID
</title>
568 <export>true
</export>
569 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
575 <optionGroupName>postal_greeting
</optionGroupName>
579 <name>postal_greeting_custom
</name>
582 <import>true
</import>
583 <export>false
</export>
584 <comment>Custom Postal greeting.
</comment>
591 <name>postal_greeting_display
</name>
592 <title>Postal Greeting
</title>
595 <comment>Cache Postal greeting.
</comment>
599 <name>addressee_id
</name>
600 <type>int unsigned
</type>
601 <title>Addressee ID
</title>
602 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
604 <export>true
</export>
609 <optionGroupName>addressee
</optionGroupName>
613 <name>addressee_custom
</name>
616 <import>true
</import>
617 <export>false
</export>
618 <comment>Custom Addressee.
</comment>
625 <name>addressee_display
</name>
626 <title>Addressee
</title>
629 <comment>Cache Addressee.
</comment>
633 <name>job_title
</name>
640 <import>true
</import>
641 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
642 <dataPattern>//
</dataPattern>
643 <comment>Job Title
</comment>
647 <name>gender_id
</name>
648 <title>Gender
</title>
649 <type>int unsigned
</type>
651 <optionGroupName>gender
</optionGroupName>
656 <headerPattern>/^gender$/i
</headerPattern>
657 <comment>FK to gender ID
</comment>
658 <import>true
</import>
662 <name>UI_gender
</name>
663 <fieldName>gender_id
</fieldName>
667 <name>birth_date
</name>
669 <import>true
</import>
670 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
671 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
672 <comment>Date of birth
</comment>
675 <type>Select Date
</type>
676 <formatType>birth
</formatType>
680 <name>is_deceased
</name>
681 <title>Deceased
</title>
682 <import>true
</import>
683 <export>true
</export>
684 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
689 <type>CheckBox
</type>
693 <name>index_is_deceased
</name>
694 <fieldName>is_deceased
</fieldName>
698 <name>deceased_date
</name>
700 <import>true
</import>
701 <export>true
</export>
702 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
703 <comment>Date of deceased
</comment>
706 <type>Select Date
</type>
707 <formatType>birth
</formatType>
711 <name>mail_to_household_id
</name>
712 <title>Mail to Household ID
</title>
713 <type>int unsigned
</type>
714 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
715 <export>true
</export>
720 <name>mail_to_household_id
</name>
721 <table>civicrm_contact
</table>
724 <onDelete>SET NULL
</onDelete>
728 <name>household_name
</name>
735 <import>true
</import>
736 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
737 <dataPattern>/^\w+$/
</dataPattern>
738 <comment>Household Name.
</comment>
743 <name>index_household_name
</name>
744 <fieldName>household_name
</fieldName>
748 <name>primary_contact_id
</name>
749 <type>int unsigned
</type>
750 <title>Household Primary Contact ID
</title>
751 <comment>Optional FK to Primary Contact for this household.
</comment>
755 <name>primary_contact_id
</name>
756 <table>civicrm_contact
</table>
759 <onDelete>SET NULL
</onDelete>
762 <name>organization_name
</name>
769 <import>true
</import>
770 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
771 <dataPattern>/^\w+$/
</dataPattern>
772 <comment>Organization Name.
</comment>
777 <name>index_organization_name
</name>
778 <fieldName>organization_name
</fieldName>
782 <name>sic_code
</name>
785 <import>true
</import>
786 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
787 <comment>Standard Industry Classification Code.
</comment>
794 <name>user_unique_id
</name>
796 <title>Unique ID (OpenID)
</title>
799 <import>true
</import>
800 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
801 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
802 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
809 <name>employer_id
</name>
810 <title>Current Employer
</title>
811 <uniqueName>current_employer_id
</uniqueName>
812 <type>int unsigned
</type>
813 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
814 <export>true
</export>
817 <type>EntityRef
</type>
821 <name>employer_id
</name>
822 <table>civicrm_contact
</table>
825 <onDelete>SET NULL
</onDelete>
828 <name>is_deleted
</name>
829 <title>Contact is in Trash
</title>
830 <uniqueName>contact_is_deleted
</uniqueName>
833 <required>true
</required>
834 <export>true
</export>
837 <type>CheckBox
</type>
841 <name>index_is_deleted
</name>
842 <fieldName>is_deleted
</fieldName>
847 <name>index_is_deleted_sort_name
</name>
848 <fieldName>is_deleted
</fieldName>
849 <fieldName>sort_name
</fieldName>
850 <fieldName>id
</fieldName>
854 <name>created_date
</name>
855 <type>timestamp
</type>
856 <comment>When was the contact was created.
</comment>
857 <required>false
</required>
858 <export>true
</export>
859 <default>NULL
</default>
863 <name>index_created_date
</name>
864 <fieldName>created_date
</fieldName>
868 <name>modified_date
</name>
869 <type>timestamp
</type>
870 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
871 <required>false
</required>
872 <export>true
</export>
873 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
877 <name>index_modified_date
</name>
878 <fieldName>modified_date
</fieldName>