Retrieving contacts and their relationships
If you want to integrate ContactManager with an application other than a Guidewire core application, you can write custom web services to do so. For example, to retrieve properties from contact records, you can write a custom web service (SOAP API) that extracts the subset of entity contact information that you want. Using an AddressBookUID, the API could extract properties from an ABContact record and return it from ContactManager to the SOAP client.
For typical cases, return only certain properties or subobjects, such as the properties needed to display or edit the record. Design your integration point accordingly to return only the necessary data, which reduces bandwidth and server resources.
In some cases, you might want to create new entities or classes to encapsulate your custom data.
If you are retrieving contact records, you can optionally retrieve related contacts, as you can do with ClaimCenter. Related contacts are referred to generally in ClaimCenter and ContactManager as relationships. For example, to retrieve a contact’s parent or guardian or employer contact information, specify one of these types of relationships. Finally, design web services for each integration point to return that information if it exists.
To use relationship retrieval, you must understand the difference between source and target relationships. These terms are ways of using the relationship identification codes for relationships such as parent/guardian and employer, but also specify the directionality of the relationship.
Relationship codes in Gosu are defined in the ContactRel typelist in Guidewire
Studio™. For example, this Gosu enumeration includes relationship code
TC_employer as a reference to the employer typecode in the
typelist. Suppose you want the record for someone named John Smith. If you want to
return John Smith’s employers, specify TC_employer as a target
relationship. If you want to return John Smith’s employees, specify
TC_employer as a source relationship.
A target
relationship describes the relationship if the ContactRel typecode description
fits it into the sentence with the following structure:
“I want to retrieve a contact and the ______ of the contact, if any is found.”
For example, for the employee relationship
(employer), the sentence
would be:
“I want to retrieve a contact and the employer of the contact, if any is found.”
If you want your request to specify the opposite of that relationship, such as employee instead of employer, specify the relationship as a source relationship.
While retrieving a contact record, you might want both directions of relationships. For example, you might want to simultaneously retrieve all employees of a company and the company’s primary contact. Use the ContactBidiRel.EMPLOYER source relationship and the ContactBidiRel.PRIMARYCONTACT target relationship.
