Transaction services
You can use transaction services to create, update, and delete business objects in Management Center.
object
. This XML response includes any state information that changed as a result
of the service. For example, when you activate a promotion, the promotion state changes to become
read-only. The response from the activate service must include the readOnly="true" attribute on the
object tag. If the service creates or modifies properties, the new property values must be included
as children of the object tag. For example, if a create service generates a primary ID, the primary
ID property must be returned as a child element of the object element. Transaction services that
fail return an XML file in which the root element is named errors
. The child
elements of the errors
element can be named either exception
or
validationError
. Exceptions display errors for which there is no immediate
corrective action, such as when the user does not have the access that is required to update the
current business object. Validation errors display errors that the user can correct, such as
creating a business object to ensure that a specified identifier exists.
Management Center uses the following types of transaction services:
- CreateService
- Creates an instance of an object, such as a new product or promotion.
- UpdateService
- Updates an existing instance of a business object to save changes to that object. For example, if you change the name of an existing product and save the change, the service updates the product.
- PostSaveService
- Triggers an action or performs clean up work on the server after an object is successfully created or updated and saved. For example, if you create a customer segment and save the segment, the segment is automatically activated when it is saved.
- DeleteService
- Deletes an instance of an object, such as when you delete a discontinued product from a catalog.
- CustomService
- Performs a custom action on a business object. A custom service performs a processing action on a business object. For example, you can use a custom service to activate a promotion.