Using a Siebel CRM Business Service to Insert an Account
You can use a Siebel CRM Business Service resource to insert an Account by sending a HTTP POST request to the Repository Resource's URI.
The following request calls the Insert method of Siebel Account Business service, which inserts a new account with details given in the request.
URI: http://ServerName:port/siebel/v1.0/service/Siebel Account/Insert
HTTP Method: POST
Content-Type: application/xml
Authorization: Basic
- Request body:
<?xml version="1.0" encoding="UTF-8" ?> <body> <SiebelMessage> <MessageId></MessageId> <MessageType>Integration Object</MessageType> <IntObjectName>Account Interface</IntObjectName> <IntObjectFormat>Siebel Hierarchical</IntObjectFormat> <ListOfAccount_spcInterface> <Account> <Name>Test Account</Name> <Account_spcId>1234</Account_spcId> </Account> </ListOfAccount_spcInterface> </SiebelMessage> </body>
If the Siebel CRM Business Service fails with any error, then Siebel REST API returns the HTTP status code 500, details of the error, and the Siebel error code which is available in the response body. Consider the following two examples:
If Siebel REST API tries to insert a record without the required fields, then it returns the HTTP error code 500, with the following message in the response body:
"ERROR": "No user key can be used for the Integration Component instance 'Account'.(SBL-EAI-04397)"
If Siebel REST tries to insert a record that already exists, then it returns the HTTP error code 500 with the Siebel error message bubbled up, as shown in the following example:
"ERROR": "Insert operation on integration component 'Account' failed because a matching record in Business Component 'Account' with search specification '[Location] = \"HQ-Distribution\" AND [Name] = \"AccountData1234\" AND [Primary Organization] = \"Millennium Institutional Finance Services IF ENU\"' was found.(SBL-EAI-04383)"