Client Relationship Data Loading

This section describes the loading data into the RULESDBO.CLIENT_RELATIONSHIPS and RULESDBO.CLIENT_REATIONSHIP_DETAIL DB tables.  

Information discussed includes the following:

The loading into the specified table occurs from all elements in EagleML/referenceTransaction/client/clientRelationship node.

Every client relationship can be 'Client to client' or 'Client to entity'.

Depending on the relationship, one of elements - EagleML/referenseTransaction/client/clientRelationships/relClientId or EagleML/referenseTransaction/client/clientRelationships/entity should be present in EagleML message.

  • For 'Client to client' relationship the element EagleML/referenseTransaction/client/clientRelationships/relClientId should be present in EagleML message. This element contains the value of relationship client id. Also for 'Client to client' relationship the element EagleML/referenseTransaction/client/clientRelationships/entity should be null.
  • For 'Client to entity' relationship the element EagleML/referenseTransaction/client/clientRelationships/entity should be present in EagleML message. This element contains the value of relationship entity id. Also for 'Client to entity' relationship the element EagleML/referenseTransaction/client/clientRelationships/relClientId should be null.

Also the Contact Id (Relationship Client Id) or Entity Id should be specified in incoming message or calculated (for Entity Id). If both of them are null, the stream execution will be completed with error 'Contact Id or Entity Id should be specified in incoming EagleML message'.

Client Relationship Switch

The element EagleML/referenceTransaction/client/clientSwitch determines in which of the  tables the data will be loaded.

The element EagleML/referenceTransaction/clientclientRelationships/clientRelationshipsSwitch can take one of following values:

  • <clientRelationshipsSwitch>CR</clientRelationshipsSwitch> - data will be loaded only into the RULESDBO.CLIENT_RELATIONSHIPS table
  • <clientRelationshipsSwitch>CRD</clientRelationshipsSwitch> - data will be loaded into the RULEDBO.CLIENT_RELATIONSHIPS and RULESDBO.CLIENT_RELATIONSHIP_DETAIL tables

Relationship Type Element

The valid values of database field RULESDBO.CLIENT_RELATIONSHIPS.RELATIONSHIP_TYPE (mapped from the element of incoming file EagleML/referenseTransaction/client/clientRelationships/relationshipType):

  • 'Entity Owner'
  • 'Contract'
  • 'Partner'
  • 'Partition'
  • 'PARENT'
  • 'Investor Role'

The valid values of Relationship Start and End Dates (optional elements EagleML/referenseTransaction/client/clientRelationships/crStartDate and EagleML/referenseTransaction/client/clientRelationships/crEndDate:

The time period 'Start Date – End Date' must include the current (today's) date.

Contact Id (Relationship Client Id) Element (Only for Client to Client Relationship)

If the relationship is 'Client to client', the Contact Id should be contained in the EagleML element EagleML/referenseTransaction/client/clientRelationships/relClientId.

Added into the rule lookup defines the INSTANCE in the RULESDBO.CLIENT table by the value of relClientId element (mapped into RULESDBO.CLIENT.CLIENT_ID field). This instance calculated by lookup is loaded into the RULESDBO.CLIENT_RELATIONSHIPS.CONTACT_INST database field.

If the returned by lookup value of Contact Instance is null, the stream execution will be completed with error 'Contact Instance was not found in DB table RULESDBO.CLIENT. The Contact Id {name} is incorrect'.

Entity, P Entity Elements (only for Client to Entity Relationship)

In the element EagleML/referenceTransaction/client/clientRelationships/entity the sub-element entityId can be mapped directly into the RULESDBO.CLIENT_RELATIONSHIPS.ENTITY_ID database field:
<entity><entityId>ENTITY_ID</entityId></entity>

If the specified Entity Id does not exist in DB table RULESDBO.ENTITY, the stream execution will be completed with error 'Entity Id was not found in DB table RULESDBO.ENTITY. The Entity Id {name} is incorrect'.

Similarly, for element EagleML/referenceTransaction/client/clientRelationships/pEntity the sub-element entityId will be mapped into the RULESDBO.CLIENT_RELATIONSHIPS.P_ENTITY_ID database field:
<pentity><entityId>ENTITY_ID</entityId></pentity>

The values of fields RULESDBO.CLIENT_RELATIONSHIPS.ENTITY_ID and RULESDBO.CLIENT_RELATIONSHIPS.P_ENTITY_ID can be defined by Entity identifiers. For ENTITY_ID fields:

<entity>
<entityXrefs>
<entityXref>
<xrefAccountId>Id1</xrefAccountId>
<xrefAccountIdType>Type1</xrefAccountIdType>
<xrefClassCode>Class1</xrefClassCode>
</entityXref>
</entityXrefs>
<entityResolutionOption>MATCH_ALL</entityResolutionOption>
<entityBattingOrder>Type1</entityBattingOrder>
</entity>


For P_ENTITY_ID fields:

<pEntity> 
<entityXrefs>
<entityXref>
<xrefAccountId>Id2</xrefAccountId>
<xrefAccountIdType>Type2</xrefAccountIdType>
</entityXref>
</entityXrefs>
<entityResolutionOption>MATCH_ALL</entityResolutionOption>
<entityBattingOrder>Type2</entityBattingOrder>
</pEntity>


The elements into the <entityXref> node are mapped to the database table RULESDBO.ENTITY_XREFERENCE.

  • <xrefAccountId> – to the RULESDBO.ENTITY_XREFERENCE.XREF_ACCOUNT_ID;
  • <xrefAccountIdType> – to the RULESDBO.ENTITY_XREFERENCE.XREF_ACCOUNT_ID_TYPE;
  • <xrefClassCode> – to the RULESDBO.ENTITY_XREFERENCE.CLASS_CODE (optional element);
  • <entityBattingOrder> – element must contains the order of identifiers (types of identifiers).

The field RULESDBO.ENTITY_XREFERENCE.ENTITY_ID is defined by fields XREF_ACCOUNT_ID, XREF_ACCOUNT_ID_TYPE, CLASS_CODE, then the value from ENTITY_ID field loading to the RULESDBO.CLIENT_RELATIONSHIPS.ENTITY_ID field.

If the returned by Entity Xref lookup value of Entity Id is null, the stream execution will be completed with error: 'Entity Id was not found in DB table RULESDBO.ENTITY_XREFERENCE. The following XREF identifiers are incorrect: {list of identifiers}'.

For definition the value of RULESDBO.CLIENT_RELATIONSHIPS.P_ENTITY_ID applied the similarly logic.

Insert/Update Modes

For loading (INSERT mode) the new row into the database tables RULESDBO.CLIENT_RELATIONSHIPS, RULESDBO.CLIENT_RELATIONSHIP_DETAIL the set of values below should be unique and should not be present in the database table.

For updating (UPDATE mode) the existing row in the database tables RULESDBO.CLIENT_RELATIONSHIPS, RULESDBO.CLIENT_RELATIONSHIP_DETAIL the set of values below should be should be unchained in the database table.

The set of values (client relationship section of EagleML message, RULESDBO.CLIENT_ADDRESS database table):

  • EagleML/referenceTransaction/client/clientId - The value of client instance is calculated by client instance and mapped into RULESDBO.CLIENT_RELATIONSHIPS.CLIENT_INST database field
  • EagleML/referenceTransaction/client/clientRelationship/crInstance - This is an optional value. If it is not present, the value of element crInstance is calculated or generated and mapped into RULESDBO.CLIENT_RELATIONSHIPS. INSTANCE and RULESDBO.CLIENT_RELATIONSHIP_DETAIL.INSTANCE database fields)
  • EagleML/referenceTransaction/client/clientRelationship/relationshipType - mapped into RULESDBO.CLIENT_RELATIONSHIPS.RELATIONSHIP_TYPE database field
  • EagleML/referenceTransaction/client/effectiveDate - mapped into RULESDBO.CLIENT_RELATIONSHIPS.EFFECTIVE_DATE and RULESDBO.CLIENT_RELATIONSHIP_DETAIL.EFFECTIVE_DATE database fields
  • EagleML/referenseTransaction/client/clientRelationships/relClientId - the value of relationship client instance is calculated by the value of element relClientId and mapped into RULESDBO.CLIENT_RELATIONSHIPS.CONTACT_INST) database field
  • EagleML/referenceTransaction/client/clientRelationship/entity - mapped into RULESDBO.CLIENT_RELATIONSHIPS.ENTITY_ID database field

Examples

The following examples are available:

An which contains Client section and 1 Relationship section and an example which contains Client section and 2 Relationship sections.