|
|
Contact
The Contact entity
It is important to note that retrieving a Contact with a detail level of 65,635 will potentially return a large amount of data. See the documentation for putObject for information specific to creating and updating a Contact.
Attributes
NOTE: The special ACCESS key which contains an array of acl entities was added as of r430.
- ACCESS - This key contains an array of the acl entities applied to an object. These key was added as of r430 (2007-06-25)
- ADDRESSES - This key contains an array of the address entities associated with the Contact.
- COMPANYVALUES - This key contains an array of the the companyValue entities associated with the Contact.
- ENTERPRISES - This key contains an array assignment entities for each of the Enterprise objects to which the Contact has been assigned.
- FLAGS - This key is a read-only array of strings which provides meta-data about the object.
- WRITE - The requesting user has sufficient privileges to modify the object.
- READONLY - The requesting user has no rights to modify the object.
- FAVORITE - The object has been marked as a favorite by the user.
- SELF - The user is the owner of the object.
- PRIVATE - The private flag of the object has been set.
- LOGS - This key contains an array of logEntry entities.
- OBJECTLINKS - This key contains an array of the objectLink entities in which the Contact is either a target or source.
- PHONES - This key contains an array of the telephone entities associated with the Contact.
- PROJECTS - This key contains an array of the assignment entities which reference the Project entities to which the Contact has been assigned.
- PROPERTIES - The objectProperty entities attached to the Contact.
- isAccount - This attribute has a value of '1' if the contact has a corresponding account, and '0' if there is no corresponding account.
- This attribute is read-only and will be ignored for putObject operations.
Example
{'FLAGS': ['WRITE', 'FAVORITE'],
'_ACCESS': [{'entityName': 'acl',
'info': '',
'operations': 'r',
'parentObjectId': 10100,
'targetEntityName': 'Team',
'targetObjectId': 77210},
{'entityName': 'acl',
'info': '',
'operations': 'wr',
'parentObjectId': 10100,
'targetEntityName': 'Contact',
'targetObjectId': 10100},
{'entityName': 'acl',
'info': '',
'operations': 'rw',
'parentObjectId': 10100,
'targetEntityName': 'Team',
'targetObjectId': 955240},
{'entityName': 'acl',
'info': '',
'operations': 'r',
'parentObjectId': 10100,
'targetEntityName': 'Team',
'targetObjectId': 10003},
{'entityName': 'acl',
'info': '',
'operations': 'rw',
'parentObjectId': 10100,
'targetEntityName': 'Team',
'targetObjectId': 11530}],
'_ADDRESSES': [{'city': 'Grand Rapids',
'companyObjectId': 10100,
'country': 'USA',
'entityName': 'address',
'name1': 'Morrison Industrial Equipment',
'name2': 'CIS/IT Dept.',
'name3': '',
'objectId': 10150,
'state': 'MI',
'street': '1825 Monroe Ave NW',
'type': 'location',
'zip': '49505'},
{'city': 'Grand Rapids',
'companyObjectId': 10100,
'country': 'USA',
'entityName': 'address',
'name1': 'Adam Tauno Williams',
'name2': '',
'name3': '',
'objectId': 10130,
'state': 'MI',
'street': '***********',
'type': 'private',
'zip': '***********'},
{'city': 'Grand Rapids',
'companyObjectId': 10100,
'country': 'USA',
'entityName': 'address',
'name1': 'Morrison Industrial Equipment',
'name2': 'CIS/IT Dept.',
'name3': 'ATTN: Adam Tauno Williams',
'objectId': 10140,
'state': 'MI',
'street': '***********',
'type': 'mailing',
'zip': '***********'}],
'_COMPANYVALUES': [{'attribute': 'receive_mail',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Willing To Recieve Mail',
'objectId': 4937930,
'type': 2,
'uid': '',
'value': 'YES'},
{'attribute': 'receive_fax',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Willing To Recieve FAX',
'objectId': 4937920,
'type': 2,
'uid': '',
'value': 'YES'},
{'attribute': 'job_title',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 469110,
'type': 1,
'uid': '',
'value': 'System and Network Administrator'},
{'attribute': 'other_title1',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 3947280,
'type': 1,
'uid': '',
'value': ''},
{'attribute': 'other_title2',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 3947290,
'type': 1,
'uid': '',
'value': ''},
{'attribute': 'headboy',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Key Contact',
'objectId': 3947250,
'type': 1,
'uid': '',
'value': 'no'},
{'attribute': 'salesperson',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Salesperson',
'objectId': 3962570,
'type': 9,
'uid': '',
'value': ['']},
{'attribute': 'email1',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 10120,
'type': 3,
'uid': '',
'value': 'adam@morrison-ind.com'},
{'attribute': 'email2',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 469090,
'type': 3,
'uid': '',
'value': '***********'},
{'attribute': 'callfrequency',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Call Frequency, days',
'objectId': 9459640,
'type': 1,
'uid': '',
'value': 'unknown'},
{'attribute': 'territory',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Territory',
'objectId': 3962580,
'type': 1,
'uid': '',
'value': ''},
{'attribute': 'email3',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': '',
'objectId': 469100,
'type': 3,
'uid': '',
'value': '***********'},
{'attribute': 'receive_email',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': 'Willing To Recieve E-Mails',
'objectId': 4937940,
'type': 2,
'uid': '',
'value': 'YES'},
{'attribute': 'division',
'companyObjectId': 10100,
'entityName': 'companyValue',
'label': ' Division',
'objectId': 9459650,
'type': 1,
'uid': '',
'value': ''}],
'_ENTERPRISES': [],
'_MEMBERSHIP': [],
'_PHONES': [{'companyObjectId': 10100,
'entityName': 'telephone',
'info': '',
'number': '',
'objectId': 10170,
'realNumber': '',
'type': '02_tel',
'url': ''},
{'companyObjectId': 10100,
'entityName': 'telephone',
'info': '',
'number': '',
'objectId': 10210,
'realNumber': '9999999999',
'type': '15_fax_private',
'url': ''},
{'companyObjectId': 10100,
'entityName': 'telephone',
'info': 'Cell Phone',
'number': '***********',
'objectId': 10180,
'realNumber': '***********',
'type': '03_tel_funk',
'url': ''},
{'companyObjectId': 10100,
'entityName': 'telephone',
'info': 'Fax Phone',
'number': '***********',
'objectId': 10200,
'realNumber': '***********',
'type': '10_fax',
'url': ''},
{'companyObjectId': 10100,
'entityName': 'telephone',
'info': 'Home',
'number': '6164568931',
'objectId': 10190,
'realNumber': '6164568931',
'type': '05_tel_private',
'url': ''},
{'companyObjectId': 10100,
'entityName': 'telephone',
'info': 'Main Phone',
'number': '***********',
'objectId': 10160,
'realNumber': '***********',
'type': '01_tel',
'url': ''}],
'_PROJECTS': [{'entityName': 'assignment',
'objectId': 11400,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 11360},
{'entityName': 'assignment',
'objectId': 43610,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 42150},
{'entityName': 'assignment',
'objectId': 194590,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 194550},
{'entityName': 'assignment',
'objectId': 4149010,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 4148970},
{'entityName': 'assignment',
'objectId': 760180,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 760130},
{'entityName': 'assignment',
'objectId': 386530,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 386500},
{'entityName': 'assignment',
'objectId': 7993060,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 7993030},
{'entityName': 'assignment',
'objectId': 840050,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 839880},
{'entityName': 'assignment',
'objectId': 8164010,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 8163970},
{'entityName': 'assignment',
'objectId': 8164700,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 8164660},
{'entityName': 'assignment',
'objectId': 949080,
'sourceEntityName': 'Contact',
'sourceObjectId': 10100,
'targetEntityName': 'Project',
'targetObjectId': 16820}],
'_PROPERTIES': [],
'assistantName': '',
'associatedCategories': "''",
'associatedCompany': 'Morrison Industries',
'associatedContacts': '',
'birthDate': <DateTime '19721206T05:00:00' at 819cecc>,
'comment': '',
'degree': 'UNIX System Administration',
'department': '',
'description': 'Adam Tauno Williams',
'displayName': '',
'entityName': 'Contact',
'fileAs': 'Williams, Adam',
'firstName': 'Adam',
'gender': 'male',
'imAddress': 'adam@m********',
'isAccount': 1,
'isPrivate': 0,
'keywords': ' ',
'lastName': 'Williams',
'login': 'adam',
'managersName': '',
'middleName': '',
'objectId': 10100,
'occupation': '',
'office': '',
'ownerObjectId': 10000,
'salutation': '03_dear_mr',
'sensitivity': '',
'url': '',
'version': 785}
Sign in to add a comment

when a contact is retrieved with no birthdate set, the retrieved xml-rpc data type for the (empty) birtdate is 'string'. When the birthdate is set the data type is 'dateTime.iso8601'. Not sure if this will affect other people, or it's just because the xml-rpc tools I'm using are more restrictive when it comes to data type.
To search for a Contact that is an account use code like:
#!/usr/bin/env python import xmlrpclib server = xmlrpclib.Server('http://adam:fred123@localhost/zidestore/so/adam/') criteria1 = { } criteria1['key'] = 'login' criteria1['value'] = 'adam' criteria1['expression'] = 'EQUALS' criteria2 = { } criteria2['conjunction'] = 'AND' criteria2['key'] = 'isAccount' criteria2['value'] = 1 criteria2['expression'] = 'EQUALS' query = [ criteria1, criteria2 ] flags = { 'limit' : 50, 'revolve' : 'NO' } result = server.zogi.searchForObjects('Contact', query, 65535, flags) for contact in result: print "ObjectId#%d (%s) login=%s lastName=%s isAccount=%d" % ( contact['objectId'], contact['entityName'], contact['login'], contact['lastName'], contact['isAccount'])