Skip Navigation
Optimal efficiency when destroying objects using CWS API
Answer ID 8887   |   Last Review Date 12/19/2018

How can processing speed for destroying objects be increased using the CWS API?


Connect Web Services for SOAP (CWS) API, All product versions


Please follow these guidelines and don’t use values of parameters that exceed maximum allowed numbers to prevent errors. The guidelines are intended to limit customized public API usage to 10% of site/instance capacity available within the hosting environment.

Question: Is there a recommended number of items per batch? And a number of request items per request?

Answer: There is a maximum allowed value of items per batch = 100. Numbers greater than this should not be used in batch SOAP requests. Small sizes of batch are recommended. Please follow the guidelines documented in “Web Service API/API Operations/Batch” and in “Web Service API/Operational Behavior/Operational Overview/Batching” sections of or more recent similar documentation.

Question: What is the recommended wait time between requests?

Answer: Required wait time might vary depending on hardware, database connection availability, number of records in table, network latency. We should expect this parameter to be within certain reasonable range and make a decision depending on test results.

Question: Is it possible to use multiple simultaneous threads for this task?

Answer: Multiple threads are possible, but please understand that Oracle B2C Service is a shared resource and not an infinite resource. We've taken care to appropriately size our services to support regular use and surge use patterns. It is important that reasonable usage of these shared resources is considered to retain availability for all customers. Along these lines, it is also a best practice to perform bulk API operations during off hours for the site and hosted POD.

Question: Are there differences to consider when destroying different types of objects?

Answer: This is somewhat dependent upon what objects are being deleted. For example, deletion of Contact objects implies the removal of all Incident objects where the Contact is the PrimaryContact of the Incident. As a natural consequence of the deletion of Contact objects many Incident objects might be deleted. As such, deleting Contact objects should be reduced to small batches (say blocks of 25 or 50). This depends upon how many Incident objects might be associated with various Contact objects.

Similarly, deletion of Organization objects also deletes the associated Contact objects (and the associated Incident objects). Small batch sizes are recommended.

This characteristic of association or aggregation between objects means that deleting one object may imply deleting many other objects. As such, care should be used in determining how many objects should be deleted at one time. This information is available in our relationship metadata where the relationship between two objects is identified as an association or aggregation. Aggregations are deleted with the parent object.

Question: If an error is returned, should the code wait longer before another request?

Answer: If an error is returned we do not have to wait longer before another request unless we know for sure that the system will recover longer from this particular error.


For similar information on object create and update operations refer to Answer ID 8264: Optimal efficiency when creating or updating objects using CWS API.

For information on server-side timeout behavior refer to Answer ID 7970: Server-side timeouts associated with the Connect Web Services for SOAP (CWS) API.

Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.