Integration Platform Technologies: Siebel eBusiness Application Integration Volume II > About Integration Objects > Structure of Siebel Integration Objects >

User Keys


User key is a group of fields whose values must uniquely identify a Siebel business component record. During inbound integration, user keys are used to determine whether the incoming data updates an existing record or inserts a new one. The Integration Object Builder wizard automatically creates some user keys based on characteristics discussed in User Key Generation Algorithm. You should make sure that the generated user keys match your business requirements; otherwise, inactivate them or add new user keys as appropriate.

Integration component keys are built by the Integration Object Builder wizard based on values in the underlying table of the business component that the integration component is based on. Integration objects that represent Siebel business objects, and that are used in insert, update, synchronize, or execute operations, must have at least one user key defined for each integration component.

In Siebel Tools, user keys are defined as integration component key objects, with Key Type property set to User Key.

A sequence of integration component user keys is defined on each integration component definition, each of which contains a set of fields. During processing of integration component instance, EAI Siebel Adapter chooses to use the first user key in the sequence that satisfies the condition that all the fields of that user key are present in an integration component instance. The first instance of each integration component type determines the user key used by all instances of that type.

For example, consider the Account integration object instance with only Account Name and Account Integration Id field present. When EAI Siebel Adapter performs validation, it first checks the Account and Account Location field (the first user key for the Account integration component). In this example, because the Account Location field is missing, EAI Siebel Adapter moves to the second user key—Account Integration Id. The Account Integration Id field is present in the integration component instance and has a value, so EAI Siebel Adapter uses that as the user key to match the record. Now if the same instance also had Account Location field present, but set to null, then EAI Siebel Adapter would have picked the Account Name and Account Location combination as the user key. This is because Account Location is not a required field.

A new user key is picked for each integration object instance (root component instance). However, for the child component instances, the user key is picked based on the first child instance, and then used for matching of all instances of that integration component within the parent integration component instance.

For example, if a Siebel Message contains two orders, then the user key for order items is picked twice, once for each order. Each time, the user key is selected based on the first order item record and then used for all the siblings.

NOTE:  EAI Siebel Adapter uses user keys to match integration component instances with business component records. Since the match is case sensitive there is a chance that records are not matched if the case of the user key fields do not match. To avoid this, use the Force Case property on the business component field to make sure that user key fields are always stored in one case.

User Key Generation Algorithm

The Integration Object Builder wizard computes the user keys by traversing several Siebel objects, including the business object, business component, table, and link. This is because not every table user key meets the requirements to be used as the basis for integration object user keys.

To understand how the Integration Object Builder wizard determines valid integration component keys, you can simulate the process of validating the user keys.

For example, determine the table on which your business component is based. In Siebel Tools, you can look up this information yourself. Navigate to the Business Components screen and select a business component and check the Table column.

You can then navigate to the Tables screen, locate the table you want—in this example, S_CONTACT—and open the User Keys applet to see the user keys defined for that table.

For example, as shown in Figure 12, the table S_CONTACT has several user keys.

Figure 12.  User Keys for Table S_CONTACT

Click for full size image

Not every user key will necessarily be valid for a given business component. Multiple business components can map to the same underlying table; therefore, it is possible that a table's user key is not valid for a particular business component but is specific to another business component.

Each User Key Column defined for a given user key must be exposed to the business component in which you are interested. For example, Figure 13 shows three user key columns for the user key S_CONTACT_U1.

Figure 13.  User Key Columns for the S_CONTACT_U1 User Key

Click for full size image

If the columns of the user key are exposed in the business component and those columns are not foreign keys, the Integration Object Builder wizard creates an integration component key based on the table's user key. The Integration Object Builder wizard also defines one integration component key field corresponding to each of the table's user key columns. For example, in Figure 14, the user key columns are exposed in the Integration Component Fields applet for the Contact integration component.

Figure 14.  Integration Component Field List

Click for full size image

The Integration Object Builder wizard, for the preceding example, builds the integration component keys based on these table user keys. As illustrated in Figure 15, the wizard defines one integration component key field for each table user key column.

Figure 15.  Integration Component Keys for Each Table User Key Column

Click for full size image

Each valid integration component key contains fields. For example, as shown in Figure 16, for the Contact integration component, User Key 3 is made up of five fields: CSN, First Name, Last Name, Middle Name, and Personal Contact.

NOTE:  You should only modify user keys if you have a good understanding of the business component and integration logic.

Figure 16.  Contact Integration Component Key Fields

Click for full size image

When the Integration Object Builder wizard creates these integration component keys, it attempts to use the appropriate table user keys, that is, the user keys that will help uniquely identify a given record. In some cases, you may find that certain integration component keys created by the Integration Object Builder wizard are not useful for your particular needs. In that case, you can manually inactivate the keys you do not want to use by checking the Inactive flag on that particular user key in Siebel Tools. You can also inactivate user key fields within a given user key.

NOTE:  For ease of maintenance and upgrade, inactivate unnecessary generated user keys and user key fields instead of deleting them.


 Integration Platform Technologies: Siebel eBusiness Application Integration Volume II 
 Published: 18 July 2003