The present concept describes what cost objects are in the context of the Intershop Commerce Management system and the cost object API.
Cost objects allow the customer to keep track of costs and as such are an important part of cost accounting. A cost object is anything in the customer organization to which cost can be assigned directly whereas cost centers are usually used to accumulate costs that cannot be directly assigned to the actual creator of the cost. Examples of cost objects include projects, products, services, purchase order numbers etc.
Costs can be tracked via cost objects on each order.
The cost object REST API follows the resource plus handler class approach. The resource is used to define the REST path, available methods and the request/response data. The handler encapsulates the business logic. In addition, validator classes are used to ensure the data is correct.
REST API is implemented for:
See the Webshop REST API for more details and request data examples.
Cost object types describe what kind of object the cost object represents. For example, projects are cost objects of type project.
The Cost Object Type BO API is straightforward and follows the same principles as other standard BOs.
The CostObjectTypeBORepository supports the usual CRUD operations.
A BusinessObjectCostObjectTypeExtension interface is also introduced as a base interface for business objects that should manage cost object types (e.g., CustomerBO). It has an additional method to find a cost object type by its name in the extended business object's (e.g., customer's) context.
The CostObjectTypeBO is a very simple business object. It has the following properties:
Cost object types are stored in a separate CostObjectType database table.
A new element cost-object-types is added to exported customers. It can be used to import new cost object types for that customer.
The new element has the following format:
<customer id="XYZ"> ... <cost-object-types> <cost-object-type name="Project"> <display-name xml:lang="en-US">Project</display-name> <description xml:lang="en-US">Cost object type representing the projects of the company.</description> <display-name xml:lang="de-DE">Projekt</display-name> <description xml:lang="de-DE">Kostenträgertyp für Projekte des Unternehmens.</description> </cost-object-type> ... </cost-object-types> ... </customer>
A common extension interface is introduced for assigning cost objects to a business object. It is used to access the cost object assigned to a basket or an order. There are two implementations provided, one for basket and one for order.
Assignment tables are used for the assignment of cost objects to a basket or an order.
A new Role APP_B2B_COSTOBJECT_MANAGER is introduced along with the following new permissions for managing cost objects:
Permission | Description | Roles | |||
---|---|---|---|---|---|
APP_B2B_ACCOUNT_OWNER | APP_B2B_COSTOBJECT_MANAGER | APP_B2B_APPROVER | APP_B2B_BUYER | ||
APP_B2B_ASSIGN_COSTOBJECT_TO_BASKET | Select cost object for basket | ||||
APP_B2B_ASSIGN_COSTOBJECT_TO_BASKETLINEITEM | Select cost object for line item | ||||
APP_B2B_VIEW_COSTOBJECT | view cost objects | ||||
APP_B2B_CREATE_COSTOBJECT | create cost objects | ||||
APP_B2B_ACTIVATE_COSTOBJECT | activate/deactivate cost objects | ||||
APP_B2B_EDIT_COSTOBJECT | edit cost objects | ||||
APP_B2B_DELETE_COSTOBJECT | delete cost objects | ||||
APP_B2B_ASSIGN_USER_TO_COSTOBJECT | Assign cost objects to user | ||||
APP_B2B_UNASSIGN_USER_FROM_COSTOBJECT | Unassign cost objects from user | ||||
APP_B2B_VIEW_COSTOBJECTTYPE | view cost object types (includes settings for handling) | ||||
APP_B2B_CREATE_COSTOBJECTTYPE | create cost object types | ||||
APP_B2B_EDIT_COSTOBJECTTYPE | edit cost object types(includes settings for handling) | ||||
APP_B2B_DELETE_COSTOBJECTTYPE | delete cost object types |