create Operation
The create
operation validates and then creates the business object that a request payload passes. The
business object includes the top-level object entity as well as the descendant object
entities.
Operation Signature
Using the Sales Lead service as an example,
the following is the signature of the create
operation that accepts a business object to be defined. Here,
createSalesLead
is the request
payload, and the business object it defines is a Sales Lead object of MklLead
type.
<element name="createSalesLead">
<complexType>
<sequence>
<element name="salesLead" type="ns1:MklLead"/>
</sequence>
</complexType>
</element>
The create
operation returns the newly defined business object in the response payload.
<element name="createSalesLeadResponse">
<complexType>
<sequence>
<element name="result" type="ns1:MklLead"/>/>
</sequence>
</complexType>
</element>
Example
This example creates a Sales Lead object for Issaquah Imaging Innovations - Tablets with a deal amount estimated at $100,000 USD.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:createSalesLead
xmlns:ns1="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/types/">
<ns1:salesLead
xmlns:ns2="http://xmlns.oracle.com/oracle/apps/marketing/leadMgmt/leads/leadService/">
<ns2:Name>Issaquah Imaging Innovations - Tablets</ns2:Name>
<ns2:DealAmount currencyCode="USD">100000</ns2:DealAmount>
</ns1:salesLead>
</ns1:createSalesLead>
</soap:Body>
</soap:Envelope>
The response payload returns the newly created Sales Lead object after the operation completes successfully.
<ns0:createSalesLeadResponse xmlns="" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns0="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/types/"
xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/
wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<ns2:result xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/"
xmlns:ns1="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/"
xmlns:ns2="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/types/"
xmlns:ns3="http://xmlns.oracle.com/apps/crmCommon/notes/noteService"
xmlns:ns4="http://xmlns.oracle.com/oracle/apps/marketing/leadMgmt/leads/leadService/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:MklLead">
<ns4:Name>Issaquah Imaging Innovations - Tablets</ns4:Name>
<ns4:LeadNumber>CDRM_80328</ns4:LeadNumber>
<ns4:OwnerPartyName>Gabrielle Lee</ns4:OwnerPartyName>
<ns4:StatusCode>UNQUALIFIED</ns4:StatusCode>
<ns4:Rank xsi:nil="true"/>
<ns4:LeadId>300100041938883</ns4:LeadId>
...
<ns4:DealAmount currencyCode="USD"
xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/">100000</ns4:DealAmount>
...
</ns2:result>
</ns0:createSalesLeadResponse>
Related Operations
To create a child object on an existing business object,
you cannot use the create
operation.
Instead, use the merge
operation.
To create multiple business objects with a single
request, use the process
operation.
This operation allows you to control whether the response returns no value, only the
primary keys, or the entire object. You can also use the process
operation to create large business
objects for which response payload values are not required.