Triggering Synchronous Update in External System

If you want the data to be in-sync between Siebel and External System, you can use the after commit callback function (Hook 2).

In this scenario, the record is first committed successfully in Siebel then Hook 2 invokes to trigger the update in External System. Siebel then sends the before and after record of the EAI Siebel Adapter step in the input argument of the callback function to the External System.

The External System then updates the record in its system. It does not send back the record in the output argument of the callback function, as Siebel commits the record.

In case an error occurs during the update, the External System should send back an error code or error message in the output argument. In such scenario, Siebel rolls back the change in its system and ensures that the data in both systems are in-sync.

Following is the sample input argument with Contact as parent object and Contact Personal Address as child entity object:

Sample input argument for hook 2 (after commit) callback function:

<Input>     //Send to external system
     <SiebelMessage>
          <IntObjName>SwiPersonIO</IntObjName>
          <SiebelAdapter>Input</SiebelAdapter>     //First SiebelMessage is the input to Siebel Adapter
          <ListOfSwiPersonIO>
               <Contact>
                    <FirstName>John</FirstName>
                    <LastName>Doe</LastName>
                    <EmailAddress>john.doe@gmail.com</EmailAddress>
                    <WorkPhone>1234567890</WorkPhone>
                    <ListOfContact_PersonalAddress>
                         <Contact_PersonalAddress>
                              <StreetAddress>59 South Grant Avenue</StreetAddress>
                              <City>San Mateo</City>
                              <State>CA</State>
                              <Updated>01/19/1999 02:42:53</Updated>
                              <Country>USA</Country>
                              <PostalCode>94010</PostalCode>
                         </Contact_PersonalAddress>
                    </ListOfContact_PersonalAddress>
               </Contact>
          </ListOfSwiPersonIO>
     </SiebelMessage>
     <SiebelMessage>
          <IntObjName>SwiPersonIO</IntObjName>
          <SiebelAdapter>Output</SiebelAdapter>     //Second SiebelMessage is the output from Siebel Adapter
          <ListOfSwiPersonIO>
               <Contact>
                    <Id>1-Y15</Id>	     //Got Row Id, since record already commit in Siebel
                    <FirstName>John</FirstName>
                    <LastName>Doe</LastName>
                    <MiddleName></MiddleName>
                    <IntegrationId></IntegrationId>
                    <PersonUId>1-Y15</PersonUId>
                    <PartyUId>85FA3A36-8699-49b2-ADB2-EBCBB02A0EF2</PartyUId>
                    <Updated>09/08/2022 20:12:10</Updated>
                    <UpdatedBy>0-1</UpdatedBy>
                    <operation>update</operation>
                    <ListOfContact_PersonalAddress>
                         <Contact_PersonalAddress>
                              <AddressId>1-826Q</AddressId>			     
                              <StreetAddress>59 South Grant Avenue</StreetAddress>
                              <City>San Mateo</City>
                              <State>CA</State>
                              <Updated>06/14/2022 23:59:08</Updated>
                              <Country>USA</Country>
                              <PostalCode>94010</PostalCode>
                         </Contact_PersonalAddress>
                    </ListOfContact_PersonalAddress>
               </Contact>
          </ListOfSwiPersonIO>
     </SiebelMessage>	
</Input>
Note: Siebel does not expect any data to be returned in output argument for hook 2 (after commit) callback function, as record has already been committed in Siebel.

In case an error occurs, External System can send back an error code or an error message in the output argument of the callback function (this is true for both hook 1 and hook 2 callback functions).

Following is the format of the error message expected by Siebel:

<Output>
     <CustomBSErrorCode>ValidateTest Error</CustomBSErrorCode> 
</Output>