Example of Synchronize Method on Deleted Unmatched Children
This first example demonstrates deleting unmatched children when using the Synchronize method.
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>ENU</LanguageCode>
<Location>Test</Location>
<Name>ABC Corp</Name>
<ListOfAccount_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "Y">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>ATown</City>
<Country>USA</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>123 Main St</StreetAddress>
</Account_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "N">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>BTown</City>
<Country>USA</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>456 Oak St</StreetAddress>
</Account_BusinessAddress>
</ListOfAccount_BusinessAddress>
<ListOfContact>
<Contact>
<ActiveStatus>Y</ActiveStatus>
<FirstName>User1</FirstName>
<LastName>User1</LastName>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
<Contact>
<ActiveStatus>Y</ActiveStatus>
<FirstName>User2</FirstName>
<LastName>User2</LastName>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
</ListOfContact>
<ListOfAccount_Organization>
<Account_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationId>0-R9NH</OrganizationId>
<OrganizationIntegrationId/>
</Account_Organization>
</ListOfAccount_Organization>
</Account>
</ListOfAccount>
</SiebelMessage>
Then the following XML (integration object instance) is submitted with Synchronize:
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<Competitor>Y</Competitor>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>CHS</LanguageCode>
<Location>test</Location>
<Name>ABC Corp</Name>
<ListOfContact>
<Contact>
<ActiveStatus>N</ActiveStatus>
<FirstName>User1</FirstName>
<LastName>User1</LastName>
<MiddleName></MiddleName>
<Organization>Default Organization</Organization>
</Contact>
<Contact>
<FirstName>User3</FirstName>
<LastName>User3</LastName>
<MiddleName></MiddleName>
<Organization>Default Organization</Organization>
</Contact>
</ListOfContact>
</Account>
</ListOfAccount>
</SiebelMessage>
The following is the result you will receive. Because the contact information is included in the integration object instance, User2 in the database is deleted because it was an unmatched node. User1 is updated because it is a matched node. User3 is inserted because it is a new node. Because Business Address was not included in the integration object instance, it is left in the business object.
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>CHS</LanguageCode>
<Location>Test</Location>
<Name>ABC Corp</Name>
<ListOfAccount_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "Y">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>ATown</City>
<Country>USA</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>123 Main St</StreetAddress>
</Account_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "N">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>BTown</City>
<Country>USA</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>456 Oak St</StreetAddress>
</Account_BusinessAddress>
</ListOfAccount_BusinessAddress>
<ListOfContact>
<Contact>
<ActiveStatus>N</ActiveStatus>
<FirstName>User1</FirstName>
<LastName>User1</LastName>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
<Contact>
<ActiveStatus>N</ActiveStatus>
<FirstName>User3</FirstName>
<LastName>User3</LastName>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
</ListOfContact>
</Account>
</ListOfAccount>
</SiebelMessage>
The following table is a high level representation of the previous example.
Record in Database | Integration Object Instance | Record After Synchronize |
---|---|---|
Account: ABC Corp
|
Account: ABC Corp
|
Account: ABC Corp
|
This second example demonstrates how all records with an empty container are deleted when using the Synchronize method.
If you start with this business component data:
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>ENU</LanguageCode>
<Location>test</Location>
<Name>ABC Corp</Name>
<ListOfAccount_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "Y">
<AddressId>1-3JGOA</AddressId>
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>MyTown</City>
<Country>Canada</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>123 Main St</StreetAddress>
</Account_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "N">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<AddressId>1-3JGOB</AddressId>
<City>YourTown</City>
<Country>Canada</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>456 Oak St</StreetAddress>
</Account_BusinessAddress>
</ListOfAccount_BusinessAddress>
<ListOfContact>
<Contact>
<ActiveStatus>Y</ActiveStatus>
<FirstName>User1</FirstName>
<LastName>User1</LastName>
<MiddleName/>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
<Contact>
<ActiveStatus>Y</ActiveStatus>
<FirstName>User2</FirstName>
<LastName>User2</LastName>
<MiddleName/>
<Organization>Default Organization</Organization>
<ListOfContact_Organization>
<Contact_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationIntegrationId/>
</Contact_Organization>
</ListOfContact_Organization>
<ListOfContact_AlternatePhone/>
</Contact>
</ListOfContact>
<ListOfAccount_Organization>
<Account_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationId>0-R9NH</OrganizationId>
<OrganizationIntegrationId/>
</Account_Organization>
</ListOfAccount_Organization>
</Account>
</ListOfAccount>
</SiebelMessage>
And the following integration object instance is passed in:
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<Competitor>Y</Competitor>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>CHS</LanguageCode>
<Location>test</Location>
<Name>ABC Corp</Name>
<ListOfContact/>
</Account>
</ListOfAccount>
</SiebelMessage>
Then, after the sync operation, all the child contacts are deleted because none of the nodes match.
<?xml version = "1.0" encoding = "UTF-8"?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType =
"Integration Object" IntObjectFormat = "Siebel Hierarchical">
<ListOfAccount>
<Account>
<AccountStatus>Active</AccountStatus>
<CSN>1-3JGO7</CSN>
<CurrencyCode>USD</CurrencyCode>
<LanguageCode>ENU</LanguageCode>
<Location>test</Location>
<Name>ABC Corp</Name>
<ListOfAccount_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "Y">
<AddressId>1-3JGOA</AddressId>
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<City>MyTown</City>
<Country>Canada</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>123 Main St</StreetAddress>
</Account_BusinessAddress>
<Account_BusinessAddress IsPrimaryMVG = "N">
<AddressActiveStatus>Y</AddressActiveStatus>
<BillAddressFlag>Y</BillAddressFlag>
<AddressId>1-3JGOB</AddressId>
<City>YourTown</City>
<Country>Canada</Country>
<MainAddressFlag>Y</MainAddressFlag>
<ShipAddressFlag>Y</ShipAddressFlag>
<StreetAddress>456 Oak St</StreetAddress>
</Account_BusinessAddress>
</ListOfAccount_BusinessAddress>
<ListOfAccount_Organization>
<Account_Organization IsPrimaryMVG = "Y">
<Organization>Default Organization</Organization>
<OrganizationId>0-R9NH</OrganizationId>
<OrganizationIntegrationId/>
</Account_Organization>
</ListOfAccount_Organization>
</Account>
</ListOfAccount>
</SiebelMessage>
The following table is a high level representation of the operation.
This second example demonstrates how all records with an empty container are deleted when using the Synchronize method.
Record in Database | Integration Object Instance | Record After Synchronize Operation |
---|---|---|
Account: ABC Corp
|
Account: ABC Corp
|
Account: ABC Corp
|