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>Internal 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>
64 <type>Multi-Select
</type>
69 <name>index_contact_sub_type
</name>
70 <fieldName>contact_sub_type
</fieldName>
72 <type>Multi-Select
</type>
77 <name>do_not_email
</name>
80 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
81 <dataPattern>/^\d{
1,}$/
</dataPattern>
89 <name>do_not_phone
</name>
93 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
94 <dataPattern>/^\d{
1,}$/
</dataPattern>
101 <name>do_not_mail
</name>
103 <import>true
</import>
104 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
105 <dataPattern>/^\d{
1,}$/
</dataPattern>
109 <type>CheckBox
</type>
113 <name>do_not_sms
</name>
115 <import>true
</import>
116 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
117 <dataPattern>/^\d{
1,}$/
</dataPattern>
121 <type>CheckBox
</type>
125 <name>do_not_trade
</name>
127 <import>true
</import>
128 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
129 <dataPattern>/^\d{
1,}$/
</dataPattern>
133 <type>CheckBox
</type>
137 <name>is_opt_out
</name>
139 <title>No Bulk Emails (User Opt Out)
</title>
141 <import>true
</import>
142 <required>true
</required>
143 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
146 <type>CheckBox
</type>
150 <name>legal_identifier
</name>
153 <import>true
</import>
154 <headerPattern>/legal\s?id/i
</headerPattern>
155 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
156 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
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>
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>
260 <import>true
</import>
261 <headerPattern>/^(home\sURL)|URL|web|site/i
</headerPattern>
262 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
263 <comment>optional
"home page" URL for this contact.
</comment>
268 <name>image_URL
</name>
271 <import>true
</import>
272 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
279 <name>preferred_communication_method
</name>
280 <title>Preferred Communication Method
</title>
283 <import>true
</import>
284 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
285 <dataPattern>/^\w+$/
</dataPattern>
286 <comment>What is the preferred mode of communication.
</comment>
289 <optionGroupName>preferred_communication_method
</optionGroupName>
296 <name>index_preferred_communication_method
</name>
297 <fieldName>preferred_communication_method
</fieldName>
301 <name>preferred_language
</name>
302 <title>Preferred Language
</title>
305 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
306 <headerPattern>/^lang/i
</headerPattern>
307 <import>true
</import>
309 <optionGroupName>languages
</optionGroupName>
310 <keyColumn>name
</keyColumn>
318 <name>preferred_mail_format
</name>
321 <default>"Both"</default>
322 <import>true
</import>
323 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
324 <comment>What is the preferred mode of sending an email.
</comment>
327 <callback>CRM_Core_SelectValues::pmf
</callback>
335 <title>Contact Hash
</title>
338 <comment>Key for validating requests related to this contact.
</comment>
341 <export>true
</export>
344 <name>index_hash
</name>
345 <fieldName>hash
</fieldName>
352 <comment>API Key for validating requests related to this contact.
</comment>
356 <name>index_api_key
</name>
357 <fieldName>api_key
</fieldName>
362 <title>Source of Contact Data
</title>
363 <uniqueName>contact_source
</uniqueName>
371 <import>true
</import>
372 <headerPattern>/(S(ource\s)?o(f\s)?C(ontact\s)?Data)$/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>
392 <name>index_first_name
</name>
393 <fieldName>first_name
</fieldName>
397 <name>middle_name
</name>
404 <import>true
</import>
405 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
406 <dataPattern>/^\w+$/
</dataPattern>
408 <comment>Middle Name.
</comment>
412 <name>last_name
</name>
419 <import>true
</import>
420 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
421 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
422 <comment>Last Name.
</comment>
427 <name>index_last_name
</name>
428 <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>
451 <name>UI_prefix
</name>
452 <fieldName>prefix_id
</fieldName>
456 <name>suffix_id
</name>
457 <title>Individual Suffix
</title>
458 <type>int unsigned
</type>
460 <optionGroupName>individual_suffix
</optionGroupName>
465 <import>true
</import>
466 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
467 <headerPattern>/^suffix$/i
</headerPattern>
468 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
472 <name>UI_suffix
</name>
473 <fieldName>suffix_id
</fieldName>
477 <name>formal_title
</name>
480 <import>true
</import>
481 <headerPattern>/^title/i
</headerPattern>
482 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
486 <name>communication_style_id
</name>
487 <title>Communication Style
</title>
488 <type>int unsigned
</type>
490 <optionGroupName>communication_style
</optionGroupName>
492 <export>true
</export>
493 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
497 <name>index_communication_style_id
</name>
498 <fieldName>communication_style_id
</fieldName>
502 <name>greeting_type
</name>
505 <import>true
</import>
506 <comment>Preferred greeting format.
</comment>
511 <name>greeting_type_id
</name>
512 <title>Greeting Type
</title>
513 <type>int unsigned
</type>
514 <comment>FK to civicrm_option_value.id, that has to be valid, registered Greeting type.
</comment>
519 <name>custom_greeting
</name>
522 <import>true
</import>
523 <comment>Custom greeting message.
</comment>
528 <name>email_greeting_id
</name>
529 <type>int unsigned
</type>
530 <title>Email Greeting ID
</title>
531 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
</comment>
535 <name>email_greeting_custom
</name>
538 <import>true
</import>
539 <export>false
</export>
540 <comment>Custom Email Greeting.
</comment>
547 <name>email_greeting_display
</name>
548 <title>Email Greeting
</title>
551 <comment>Cache Email Greeting.
</comment>
558 <name>postal_greeting_id
</name>
559 <type>int unsigned
</type>
560 <title>Postal Greeting ID
</title>
561 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
568 <name>postal_greeting_custom
</name>
571 <import>true
</import>
572 <export>false
</export>
573 <comment>Custom Postal greeting.
</comment>
580 <name>postal_greeting_display
</name>
581 <title>Postal Greeting
</title>
584 <comment>Cache Postal greeting.
</comment>
591 <name>addressee_id
</name>
592 <type>int unsigned
</type>
593 <title>Addressee ID
</title>
594 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
598 <name>addressee_custom
</name>
601 <import>true
</import>
602 <export>false
</export>
603 <comment>Custom Addressee.
</comment>
610 <name>addressee_display
</name>
611 <title>Addressee
</title>
614 <comment>Cache Addressee.
</comment>
621 <name>job_title
</name>
628 <import>true
</import>
629 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
630 <dataPattern>//
</dataPattern>
631 <comment>Job Title
</comment>
635 <name>gender_id
</name>
636 <title>Gender
</title>
637 <type>int unsigned
</type>
639 <optionGroupName>gender
</optionGroupName>
644 <headerPattern>/^gender$/i
</headerPattern>
645 <comment>FK to gender ID
</comment>
646 <import>true
</import>
650 <name>UI_gender
</name>
651 <fieldName>gender_id
</fieldName>
658 <name>birth_date
</name>
660 <import>true
</import>
661 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
662 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
663 <comment>Date of birth
</comment>
666 <type>Select Date
</type>
670 <name>is_deceased
</name>
671 <title>Is Deceased
</title>
672 <import>true
</import>
673 <export>true
</export>
674 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
679 <type>CheckBox
</type>
683 <name>deceased_date
</name>
685 <import>true
</import>
686 <export>true
</export>
687 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
688 <comment>Date of deceased
</comment>
691 <type>Select Date
</type>
695 <name>mail_to_household_id
</name>
696 <title>Mail to Household ID
</title>
697 <type>int unsigned
</type>
698 <comment>OPTIONAL FK to civicrm_contact_household record. If NOT NULL, direct mail communications to household rather than individual location.
</comment>
699 <export>true
</export>
704 <name>mail_to_household_id
</name>
705 <table>civicrm_contact
</table>
708 <onDelete>SET NULL
</onDelete>
712 <name>household_name
</name>
719 <import>true
</import>
720 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
721 <dataPattern>/^\w+$/
</dataPattern>
722 <comment>Household Name.
</comment>
727 <name>index_household_name
</name>
728 <fieldName>household_name
</fieldName>
732 <name>primary_contact_id
</name>
733 <type>int unsigned
</type>
734 <title>Household Primary Contact ID
</title>
735 <comment>Optional FK to Primary Contact for this household.
</comment>
742 <name>primary_contact_id
</name>
743 <table>civicrm_contact
</table>
746 <onDelete>SET NULL
</onDelete>
749 <name>organization_name
</name>
756 <import>true
</import>
757 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
758 <dataPattern>/^\w+$/
</dataPattern>
759 <comment>Organization Name.
</comment>
764 <name>index_organization_name
</name>
765 <fieldName>organization_name
</fieldName>
769 <name>sic_code
</name>
772 <import>true
</import>
773 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
774 <comment>Standard Industry Classification Code.
</comment>
781 <name>user_unique_id
</name>
783 <title>Unique ID (OpenID)
</title>
786 <import>true
</import>
787 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
788 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
789 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
796 <name>employer_id
</name>
797 <title>Current Employer ID
</title>
798 <uniqueName>current_employer_id
</uniqueName>
799 <type>int unsigned
</type>
800 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
801 <export>true
</export>
804 <type>Autocomplete-Select
</type>
808 <name>employer_id
</name>
809 <table>civicrm_contact
</table>
812 <onDelete>SET NULL
</onDelete>
815 <name>is_deleted
</name>
816 <title>Contact is in Trash
</title>
817 <uniqueName>contact_is_deleted
</uniqueName>
820 <required>true
</required>
821 <export>true
</export>
824 <type>CheckBox
</type>
828 <name>index_is_deleted
</name>
829 <fieldName>is_deleted
</fieldName>
834 <name>index_is_deleted_sort_name
</name>
835 <fieldName>is_deleted
</fieldName>
836 <fieldName>sort_name
</fieldName>
837 <fieldName>id
</fieldName>
841 <name>created_date
</name>
842 <type>timestamp
</type>
843 <comment>When was the contact was created.
</comment>
844 <required>false
</required>
845 <export>true
</export>
846 <default>NULL
</default>
850 <name>modified_date
</name>
851 <type>timestamp
</type>
852 <comment>When was the contact (or closely related entity) was created or modified or deleted.
</comment>
853 <required>false
</required>
854 <export>true
</export>
855 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>