update Operation

The update operation updates the existing rows in the top-level service data object as well as the child and descendant entities. The operation throws an exception if the rows do not exist.

If you are updating a subset of the service data object attributes, the request payload must contain:
  • Primary key or alternate key: If the primary key is not known, use the find operation to retrieve the primary key of the relevant row.

  • Values to update: In the request payload, you don't need to pass all the attribute values of the service data object.

Operation Signature

For the Sales Lead service, the following is the updateSalesLead operation that accepts the object to be updated.

<element name="updateSalesLead">
    <complexType>
        <sequence>
            <element name="salesLead" type="ns1:MklLead"/>
        </sequence>
    </complexType>
</element>

The response payload returns the updated object after the operation completes successfully.

<element name="updateSalesLeadResponse">
    <complexType>
        <sequence>
            <element name="location" type="ns1:MklLead"/>
        </sequence>
    </complexType>
</element>

Example

This example sets the status of the Sales Lead business object with 300100041938883 internal identifier, to QUALIFIED.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns1:updateSalesLead
 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:StatusCode>QUALIFIED</ns2:StatusCode>
                <ns2:LeadId>300100041938883</ns2:LeadId>
            </ns1:salesLead>
        </ns1:updateSalesLead>
    </soap:Body>
</soap:Envelope>

The response payload reflects the updated attribute in the Sales Lead business object.

Related Operations

To update large business objects or to update objects for which the response payload is not required, use the process operation. This operation allows you to specify if the response payload is empty, contains only the primary key, or contains the entire payload.

Use the merge operation to:

  • Update existing objects

  • Create new objects

  • Create new child or descendant objects on an existing object

To delete a row at the appropriate service data object level, use the delete operation.

Related Topics
  • Standard CRUD Operations
  • create Operation
  • delete Operation
  • get Operation
  • find Operation
  • find by additional predefined search criteria Operation
  • merge Operation
  • process Operation