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>
11 <labelField>display_name
</labelField>
13 <add>civicrm/contact/add?reset=
1&ct=[contact_type]
</add>
14 <view>civicrm/contact/view?reset=
1&cid=[id]
</view>
15 <update>civicrm/contact/add?reset=
1&action=update
&cid=[id]
</update>
16 <delete>civicrm/contact/view/delete?reset=
1&delete=
1&cid=[id]
</delete>
20 <type>int unsigned
</type>
21 <title>Contact ID
</title>
23 <headerPattern>/internal|contact?|id$/i
</headerPattern>
24 <required>true
</required>
25 <comment>Unique Contact ID
</comment>
33 <autoincrement>true
</autoincrement>
36 <name>contact_type
</name>
37 <title>Contact Type
</title>
40 <comment>Type of Contact.
</comment>
43 <table>civicrm_contact_type
</table>
44 <keyColumn>name
</keyColumn>
45 <labelColumn>label
</labelColumn>
46 <condition>parent_id IS NULL
</condition>
51 <readonly>true
</readonly>
54 <contactType>null
</contactType>
57 <name>index_contact_type
</name>
58 <fieldName>contact_type
</fieldName>
62 <name>contact_sub_type
</name>
63 <title>Contact Subtype
</title>
68 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i
</headerPattern>
69 <comment>May be used to over-ride contact view and edit templates.
</comment>
71 <table>civicrm_contact_type
</table>
72 <keyColumn>name
</keyColumn>
73 <labelColumn>label
</labelColumn>
74 <condition>parent_id IS NOT NULL
</condition>
78 <multiple>1</multiple>
80 <serialize>SEPARATOR_BOOKEND
</serialize>
84 <name>index_contact_sub_type
</name>
85 <fieldName>contact_sub_type
</fieldName>
89 <name>do_not_email
</name>
92 <headerPattern>/d(o )?(not )?(email)/i
</headerPattern>
93 <dataPattern>/^\d{
1,}$/
</dataPattern>
97 <label>Do Not Email
</label>
102 <name>do_not_phone
</name>
105 <import>true
</import>
106 <headerPattern>/d(o )?(not )?(call|phone)/i
</headerPattern>
107 <dataPattern>/^\d{
1,}$/
</dataPattern>
110 <type>CheckBox
</type>
111 <label>Do Not Phone
</label>
115 <name>do_not_mail
</name>
117 <import>true
</import>
118 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i
</headerPattern>
119 <dataPattern>/^\d{
1,}$/
</dataPattern>
123 <type>CheckBox
</type>
124 <label>Do Not Mail
</label>
128 <name>do_not_sms
</name>
130 <import>true
</import>
131 <headerPattern>/d(o )?(not )?(sms)/i
</headerPattern>
132 <dataPattern>/^\d{
1,}$/
</dataPattern>
136 <type>CheckBox
</type>
137 <label>Do Not Sms
</label>
141 <name>do_not_trade
</name>
143 <import>true
</import>
144 <headerPattern>/d(o )?(not )?(trade)/i
</headerPattern>
145 <dataPattern>/^\d{
1,}$/
</dataPattern>
149 <type>CheckBox
</type>
150 <label>Do Not Trade
</label>
154 <name>is_opt_out
</name>
156 <title>No Bulk Emails (User Opt Out)
</title>
158 <import>true
</import>
159 <required>true
</required>
160 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?
</comment>
163 <type>CheckBox
</type>
164 <label>Is Opt Out
</label>
168 <name>legal_identifier
</name>
171 <import>true
</import>
172 <headerPattern>/legal\s?id/i
</headerPattern>
173 <dataPattern>/\w+?\d{
5,}/
</dataPattern>
174 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
</comment>
178 <label>Legal Identifier
</label>
182 <name>external_identifier
</name>
188 <label>External Identifier
</label>
191 <import>true
</import>
192 <headerPattern>/external\s?id/i
</headerPattern>
193 <dataPattern>/^\d{
11,}$/
</dataPattern>
194 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
</comment>
198 <name>UI_external_identifier
</name>
199 <unique>true
</unique>
200 <fieldName>external_identifier
</fieldName>
204 <name>sort_name
</name>
205 <title>Sort Name
</title>
212 <readonly>true
</readonly>
213 <export>true
</export>
214 <comment>Name used for sorting different contact types
</comment>
218 <name>index_sort_name
</name>
219 <fieldName>sort_name
</fieldName>
223 <name>display_name
</name>
224 <title>Display Name
</title>
231 <readonly>true
</readonly>
232 <export>true
</export>
233 <comment>Formatted name representing preferred format for display/print/other output.
</comment>
237 <name>nick_name
</name>
238 <title>Nickname
</title>
246 <import>true
</import>
247 <headerPattern>/n(ick\s)name|nick$/i
</headerPattern>
248 <dataPattern>/^\w+$/
</dataPattern>
249 <comment>Nickname.
</comment>
254 <name>legal_name
</name>
260 <label>Legal Name
</label>
262 <contactType>Organization
</contactType>
263 <import>true
</import>
264 <headerPattern>/^legal|(l(egal\s)?name)$/i
</headerPattern>
265 <comment>Legal Name.
</comment>
270 <name>image_URL
</name>
272 <import>true
</import>
273 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.
</comment>
278 <label>Image URL
</label>
282 <name>preferred_communication_method
</name>
283 <title>Preferred Communication Method
</title>
286 <import>true
</import>
287 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i
</headerPattern>
288 <dataPattern>/^\w+$/
</dataPattern>
289 <comment>What is the preferred mode of communication.
</comment>
292 <optionGroupName>preferred_communication_method
</optionGroupName>
296 <multiple>1</multiple>
298 <serialize>SEPARATOR_BOOKEND
</serialize>
301 <name>index_preferred_communication_method
</name>
302 <fieldName>preferred_communication_method
</fieldName>
306 <name>preferred_language
</name>
307 <title>Preferred Language
</title>
310 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.
</comment>
311 <headerPattern>/^lang/i
</headerPattern>
312 <import>true
</import>
314 <optionGroupName>languages
</optionGroupName>
315 <keyColumn>name
</keyColumn>
323 <name>preferred_mail_format
</name>
326 <default>"Both"</default>
327 <import>true
</import>
328 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i
</headerPattern>
329 <comment>What is the preferred mode of sending an email.
</comment>
332 <callback>CRM_Core_SelectValues::pmf
</callback>
336 <label>Preferred Mail Format
</label>
341 <title>Contact Hash
</title>
344 <comment>Key for validating requests related to this contact.
</comment>
347 <export>true
</export>
348 <readonly>true
</readonly>
351 <name>index_hash
</name>
352 <fieldName>hash
</fieldName>
359 <comment>API Key for validating requests related to this contact.
</comment>
361 <label>API KEY
</label>
364 <readonly>true
</readonly>
366 <or>administer CiviCRM, edit api keys
</or>
370 <name>index_api_key
</name>
371 <fieldName>api_key
</fieldName>
376 <title>Contact Source
</title>
377 <uniqueName>contact_source
</uniqueName>
385 <import>true
</import>
386 <headerPattern>/(C(ontact\s)?Source)$/i
</headerPattern>
387 <comment>where contact come from, e.g. import, donate module insert...
</comment>
391 <name>first_name
</name>
397 <label>First Name
</label>
399 <import>true
</import>
400 <headerPattern>/^first|(f(irst\s)?name)$/i
</headerPattern>
401 <dataPattern>/^\w+$/
</dataPattern>
403 <comment>First Name.
</comment>
405 <contactType>Individual
</contactType>
408 <name>index_first_name
</name>
409 <fieldName>first_name
</fieldName>
413 <name>middle_name
</name>
419 <label>Middle Name
</label>
421 <import>true
</import>
422 <headerPattern>/^middle|(m(iddle\s)?name)$/i
</headerPattern>
423 <dataPattern>/^\w+$/
</dataPattern>
425 <comment>Middle Name.
</comment>
427 <contactType>Individual
</contactType>
430 <name>last_name
</name>
436 <label>Last Name
</label>
438 <import>true
</import>
439 <headerPattern>/^last|(l(ast\s)?name)$/i
</headerPattern>
440 <dataPattern>/^\w+(\s\w+)?+$/
</dataPattern>
441 <comment>Last Name.
</comment>
444 <contactType>Individual
</contactType>
447 <name>index_last_name
</name>
448 <fieldName>last_name
</fieldName>
452 <name>prefix_id
</name>
453 <title>Individual Prefix
</title>
454 <type>int unsigned
</type>
455 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID
</comment>
457 <optionGroupName>individual_prefix
</optionGroupName>
462 <headerPattern>/^(prefix|title)/i
</headerPattern>
463 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i
</dataPattern>
464 <import>true
</import>
466 <contactType>Individual
</contactType>
469 <name>UI_prefix
</name>
470 <fieldName>prefix_id
</fieldName>
474 <name>suffix_id
</name>
475 <title>Individual Suffix
</title>
476 <type>int unsigned
</type>
478 <optionGroupName>individual_suffix
</optionGroupName>
483 <import>true
</import>
484 <comment>Suffix for name (Jr, Sr...). FK to suffix ID
</comment>
485 <headerPattern>/^suffix$/i
</headerPattern>
486 <dataPattern>/^(sr|jr)\.?|i{
2,}$/
</dataPattern>
488 <contactType>Individual
</contactType>
491 <name>UI_suffix
</name>
492 <fieldName>suffix_id
</fieldName>
496 <name>formal_title
</name>
499 <import>true
</import>
502 <label>Formal Title
</label>
504 <headerPattern>/^title/i
</headerPattern>
505 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
</comment>
507 <contactType>Individual
</contactType>
510 <name>communication_style_id
</name>
511 <title>Communication Style
</title>
512 <type>int unsigned
</type>
514 <optionGroupName>communication_style
</optionGroupName>
516 <export>true
</export>
517 <import>true
</import>
518 <headerPattern>/style/i
</headerPattern>
519 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
</comment>
526 <name>index_communication_style_id
</name>
527 <fieldName>communication_style_id
</fieldName>
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>
554 <label>Email Greeting Custom
</label>
558 <name>email_greeting_display
</name>
559 <title>Email Greeting
</title>
562 <comment>Cache Email Greeting.
</comment>
563 <readonly>true
</readonly>
567 <name>postal_greeting_id
</name>
568 <type>int unsigned
</type>
569 <title>Postal Greeting ID
</title>
570 <export>true
</export>
571 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
</comment>
577 <optionGroupName>postal_greeting
</optionGroupName>
581 <name>postal_greeting_custom
</name>
584 <import>true
</import>
585 <export>false
</export>
586 <comment>Custom Postal greeting.
</comment>
590 <label>Postal Greeting Custom
</label>
594 <name>postal_greeting_display
</name>
595 <title>Postal Greeting
</title>
598 <comment>Cache Postal greeting.
</comment>
599 <readonly>true
</readonly>
603 <name>addressee_id
</name>
604 <type>int unsigned
</type>
605 <title>Addressee ID
</title>
606 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.
</comment>
608 <export>true
</export>
613 <optionGroupName>addressee
</optionGroupName>
617 <name>addressee_custom
</name>
620 <import>true
</import>
621 <export>false
</export>
622 <comment>Custom Addressee.
</comment>
626 <label>Addressee Custom
</label>
630 <name>addressee_display
</name>
631 <title>Addressee
</title>
634 <comment>Cache Addressee.
</comment>
635 <readonly>true
</readonly>
639 <name>job_title
</name>
645 <label>Job Title
</label>
647 <import>true
</import>
648 <headerPattern>/^job|(j(ob\s)?title)$/i
</headerPattern>
649 <dataPattern>//
</dataPattern>
650 <comment>Job Title
</comment>
652 <contactType>Individual
</contactType>
655 <name>gender_id
</name>
656 <title>Gender ID
</title>
657 <type>int unsigned
</type>
659 <optionGroupName>gender
</optionGroupName>
663 <label>Gender
</label>
665 <headerPattern>/^gender$/i
</headerPattern>
666 <comment>FK to gender ID
</comment>
667 <import>true
</import>
669 <contactType>Individual
</contactType>
672 <name>UI_gender
</name>
673 <fieldName>gender_id
</fieldName>
677 <name>birth_date
</name>
679 <import>true
</import>
680 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i
</headerPattern>
681 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
682 <comment>Date of birth
</comment>
685 <type>Select Date
</type>
686 <formatType>birth
</formatType>
687 <label>Birth Date
</label>
689 <contactType>Individual
</contactType>
692 <name>is_deceased
</name>
693 <title>Deceased
</title>
694 <import>true
</import>
695 <export>true
</export>
696 <headerPattern>/i(s\s)?d(eceased)$/i
</headerPattern>
700 <required>true
</required>
702 <type>CheckBox
</type>
703 <label>Is Deceased
</label>
705 <contactType>Individual
</contactType>
708 <name>index_is_deceased
</name>
709 <fieldName>is_deceased
</fieldName>
713 <name>deceased_date
</name>
715 <import>true
</import>
716 <export>true
</export>
717 <headerPattern>/^deceased|(d(eceased\s)?date)$/i
</headerPattern>
718 <comment>Date of deceased
</comment>
721 <type>Select Date
</type>
722 <formatType>birth
</formatType>
723 <label>Deceased Date
</label>
725 <contactType>Individual
</contactType>
728 <name>household_name
</name>
734 <label>Household Name
</label>
736 <import>true
</import>
737 <headerPattern>/^household|(h(ousehold\s)?name)$/i
</headerPattern>
738 <dataPattern>/^\w+$/
</dataPattern>
739 <comment>Household Name.
</comment>
742 <contactType>Household
</contactType>
745 <name>index_household_name
</name>
746 <fieldName>household_name
</fieldName>
750 <name>primary_contact_id
</name>
751 <type>int unsigned
</type>
752 <title>Household Primary Contact ID
</title>
753 <comment>Optional FK to Primary Contact for this household.
</comment>
755 <label>Household Primary Contact
</label>
758 <contactType>Household
</contactType>
759 <readonly>true
</readonly>
762 <name>primary_contact_id
</name>
763 <table>civicrm_contact
</table>
766 <onDelete>SET NULL
</onDelete>
769 <name>organization_name
</name>
775 <label>Organization Name
</label>
777 <import>true
</import>
778 <headerPattern>/^organization|(o(rganization\s)?name)$/i
</headerPattern>
779 <dataPattern>/^\w+$/
</dataPattern>
780 <comment>Organization Name.
</comment>
783 <contactType>Organization
</contactType>
786 <name>index_organization_name
</name>
787 <fieldName>organization_name
</fieldName>
791 <name>sic_code
</name>
794 <import>true
</import>
795 <headerPattern>/^sic|(s(ic\s)?code)$/i
</headerPattern>
796 <comment>Standard Industry Classification Code.
</comment>
800 <label>SIC Code
</label>
802 <contactType>Organization
</contactType>
805 <name>user_unique_id
</name>
807 <title>Unique ID (OpenID)
</title>
810 <import>true
</import>
811 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i
</headerPattern>
812 <dataPattern>/^[\w\/\:\.]+$/
</dataPattern>
813 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
</comment>
820 <name>employer_id
</name>
821 <title>Current Employer ID
</title>
822 <uniqueName>current_employer_id
</uniqueName>
823 <type>int unsigned
</type>
824 <comment>OPTIONAL FK to civicrm_contact record.
</comment>
825 <export>true
</export>
828 <type>EntityRef
</type>
829 <label>Current Employer
</label>
831 <contactType>Individual
</contactType>
834 <name>employer_id
</name>
835 <table>civicrm_contact
</table>
838 <onDelete>SET NULL
</onDelete>
841 <name>is_deleted
</name>
842 <title>Contact is in Trash
</title>
843 <uniqueName>contact_is_deleted
</uniqueName>
846 <required>true
</required>
847 <export>true
</export>
850 <type>CheckBox
</type>
852 <permission>access deleted contacts
</permission>
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>