Document Properties
KbidU27685
Last Modified22-Jun-2020
Added to KB20-Jul-2016
Public AccessEveryone
StatusOnline
Doc TypeGuidelines, Concepts & Cookbooks
Product
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

Concept - Cost Objects

1 Introduction

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.

1.1 References

2 Cost Object REST API Overview

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:

  • Cost object types of the customer
  • Managing cost objects at the basket
  • Getting the cost objects of an order

 

See the Webshop REST API for more details and request data examples.

3 Cost Object Type

3.1 Resources

CostObjectTypeREST

3.2 Business Objects

Cost object types describe what kind of object the cost object represents. For example, projects are cost objects of type project.

CostObjectTypeBO

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:

  • id - the system ID that is part of the BusinessObject interface. It helps keep track of cost object types that may have the same name, but have existed at different times or exist in a different context. Assume, for example, a Project type is created, it is deleted after some time and another cost object type is created named Project. The two Project cost object types will be treated as different, because their system IDs will not be the same.
  • name - the meaningful name of the type at a customer organization. This can be Project, PurchaseOrderNumber, etc. At the same time, there can be only one cost object type with the same name in the same context (e.g., the customer organization).
  • displayName - a localized name of the cost object type. Unlike the name, it can be modified after the cost object type creation and it is not mandatory for it to be unique within the customer.
  • description - a localized description of the cost object type.

3.3 ORM

Cost object types are stored in a separate CostObjectType database table.

CostObjectTypePO

3.4 Import and export

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>

4 Cost Object Basket and Order extensions

4.1 Resources

4.1.1 Abstract classes

BasketCostObjectResources

4.1.2 Basket

BasketCostObjectAssignmentResources

4.1.3 Order

OrderCostObjectAssignmentResources

4.2 Business Objects

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.

BOCostObjectExtension

4.3 ORM

Assignment tables are used for the assignment of cost objects to a basket or an order.

CostObjectAssignmentPO

5 Cost Object Permissions and Roles

A new Role APP_B2B_COSTOBJECT_MANAGER is introduced along with the following new permissions for managing cost objects:

PermissionDescriptionRoles
APP_B2B_ACCOUNT_OWNERAPP_B2B_COSTOBJECT_MANAGERAPP_B2B_APPROVERAPP_B2B_BUYER
APP_B2B_ASSIGN_COSTOBJECT_TO_BASKETSelect cost object for basket(tick)(tick)(tick)(tick)
APP_B2B_ASSIGN_COSTOBJECT_TO_BASKETLINEITEMSelect cost object for line item(tick)(tick)(tick)(tick)
APP_B2B_VIEW_COSTOBJECTview cost objects(tick)(tick)(tick)(tick)
APP_B2B_CREATE_COSTOBJECTcreate cost objects(tick)(tick)(error)(error)
APP_B2B_ACTIVATE_COSTOBJECTactivate/deactivate cost objects(tick)(tick)(error)(error)
APP_B2B_EDIT_COSTOBJECTedit cost objects(tick)(tick)(error)(error)
APP_B2B_DELETE_COSTOBJECTdelete cost objects(tick)(tick)(error)(error)
APP_B2B_ASSIGN_USER_TO_COSTOBJECTAssign cost objects to user(tick)(tick)(error)(error)
APP_B2B_UNASSIGN_USER_FROM_COSTOBJECTUnassign cost objects from user(tick)(tick)(error)(error)
APP_B2B_VIEW_COSTOBJECTTYPEview cost object types (includes settings for handling)(tick)(tick)(error)(error)
APP_B2B_CREATE_COSTOBJECTTYPEcreate cost object types(tick)(tick)(error)(error)
APP_B2B_EDIT_COSTOBJECTTYPEedit cost object types(includes settings for handling)(tick)(tick)(error)(error)
APP_B2B_DELETE_COSTOBJECTTYPEdelete cost object types(tick)(tick)(error)(error)

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets