Are your SAP Commerce Cloud installations compliant with your licensing agreements? Whether your contracts are based on Gross Merchandise Value (GMV) or order count, ensuring compliance is essential along with accurate order metrics reporting.
Out-of-the-box, SAP Commerce Cloud provides a compliant order processing flow that accurately tracks and reports consumption. However, customizations to this standard flow can lead to deviations that may disrupt proper reporting and compliance. Fortunately, SAP offers this comprehensive documentation on the Help Portal to guide you in maintaining compliance, even with customizations. To even better hadle the topic, this article provides a detailed description of available tools with practical steps for assuring proper usage of OrderService.submitOrder to send consumption reports, and the dedicated ordersmetricsbackoffice extension designed to simplify and streamline compliance tasks.
When dealing with custom order processing flows in SAP Commerce Cloud, it is crucial to ensure that these customizations comply with licensing requirements. SAP Commerce Cloud provides a dedicated Spring bean called orderMetricsSubmitOrderStrategy, of type de.hybris.platform.order.strategies.SubmitOrderStrategy which exposes the submitOrder method. This method should be invoked whenever an order is placed in the SAP Commerce Cloud system or in any situation that, from a contract perspective, should be considered as order placement and processing. By calling this method and providing all necessary information about the order, you ensure that your custom flow remains compliant and that order metrics are accurately reported.
Add the following bean injection in your extension's Spring configuration file (myextension/resources/myextension-spring.xml) :
<bean id="customOrderProcessor" class="com.mycompany.commerce.order.CustomOrderProcessor">
<property name="orderMetricsSubmitOrderStrategy" ref="orderMetricsSubmitOrderStrategy"/>
</bean>
In the associated Java class, use this bean as follows:
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.order.strategies.SubmitOrderStrategy;
public class CustomOrderProcessor {
private SubmitOrderStrategy orderMetricsSubmitOrderStrategy;
public void setOrderMetricsSubmitOrderStrategy(final SubmitOrderStrategy orderMetricsSubmitOrderStrategy) {
this.orderMetricsSubmitOrderStrategy = orderMetricsSubmitOrderStrategy;
}
public void processOrder(final OrderModel order) {
// Custom order processing logic
// ...
// Ensure compliance by reporting the order
if (orderMetricsSubmitOrderStrategy != null) {
orderMetricsSubmitOrderStrategy.submitOrder(order);
}
}
}
You need to bear in mind, that SAP Commerce Suite doesn't provide any definition for orderMetricsSubmitOrderStrategy bean. It's injected in build-time on SAP Commerce Cloud environment and won't be set on your local environment!
You also need to be aware that overriding this bean may break the process and your consumption will not be properly reported!
Along with orderMetricsSubmitOrderStrategy, you can add a dedicated extension to your installation to validate your reports. There are details about it in the documentation on SAP Help Portal, but I will describe the process here as well.
Activating the ordermetricsbackoffice extension should be your first step, when you start thinking about compliance and efficient order metrics tracking. Learn how to incorporate the extension into your SAP Commerce Cloud project, build it, and deploy it to your designated environment.
Consumption Validation module does not provide information about historical orders. Only those placed on version built and deployed after it was released early August 2024 will be available!
{
"extensions": [
"ordermetricsbackoffice",
// other extensions...
]
}
If you are using localextensions.xml files, you can add it directly there:
<hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>
<extensions>
<extension name="ordermetricsbackoffice" />
<!-- other extensions... -->
</extensions>
</hybrisconfig>
The Consumption Validation module in SAP Commerce Cloud is designed to help ensure compliance with license agreements by monitoring order consumption effectively. This module is protected by standard Backoffice access rights management mechanisms. Access is restricted to users with a specific authority, ensuring that only authorized personnel can view and manage consumption data.
The Consumption Validation module requires users to have an authority called consumption. This authority is used to control who can access the module. By default, this authority is assigned to the Backoffice Administrator Role, but it can be modified as necessary.
If you choose to do so, you can change authorized users by modifying apropriate Backoffice Role in User > User Groups view:
Once you have a properly configured role, you can assign it to users and/or user groups.
If you prefer automation or bulk updates, use the impex mechanism to assign the necessary authority. Here’s an example of an impex script that adds the consumption authority to a specific user group:
# Add new authority to someotherrole
UPDATE BackofficeRole; UID[unique = true] ; authorities[mode = append]
; someotherrole ; consumption
The Consumption Validation module provides tools to maintain compliance by monitoring order consumption and providing detailed reports. For users tasked with ensuring the accuracy and compliance of order registrations, the module offers an intuitive interface and actionable insights. Here’s how to make the most of it:
Once you’re logged into the SAP Commerce Cloud Backoffice, your journey begins at the Orders view, accessible via Order > Orders. This view presents a list of all orders stored within the system. To dive deeper into a specific order, simply search for and select the order you wish to examine. Upon selection, the order’s details will appear in the Editor Area at the bottom panel of the interface.
Within the Editor Area of the selected order, you will notice a "Show Report" button.
This button allows you to see the detailed Order Consumption Report associated with the order. The status of this button provides immediate insight into the order’s compliance status:
The Consumption Validation module in SAP Commerce Cloud is designed to foster transparency and ensure that order consumption aligns with licensing agreements. In addition to validating individual orders directly, the module offers an expanded view of all registered consumption reports through a dedicated interface in the Administration Cockpit.
Located on the left-hand side of the Administration Cockpit, within the Explorer Tree, is the Consumption node. This node provides access to a view that lists all registered consumption reports, offering a broader perspective on order consumption activities.
Upon entering the Consumption view, you’re presented with a comprehensive list of all registered consumption reports. This interface allows narrowing down reports by time range. This functionality is crucial for auditing and compliance processes, as it enables users to focus on specific periods.
The list provides essential details for each registered report, including:
When you select a specific report from the list, additional details are displayed in the bottom section of the view. This drill-down capability allows users to access granular information about each report, facilitating in-depth analysis and troubleshooting. If any discrepancies or anomalies are detected—such as reports not being delivered to the SAP reporting mechanism—users can take immediate action. This might involve checking the order processing workflows, ensuring that all reports are generated and submitted correctly, or addressing any issues within the OrderService.submitOrder method invocation.
In summary, the Consumption Validation module in SAP Commerce Cloud is a pivotal tool for ensuring compliance and accurate tracking of order consumption. By integrating the ordermetricsbackoffice extension via the manifest.json file, performing a build, and deploying it to a designated environment, organizations can efficiently enable this functionality.
Access to the module is controlled through the standard Backoffice access management, where users with the "consumption" authority can view and utilize the module's features.
Within Backoffice, users can navigate to Order > Orders to validate individual orders, using the "Show Report" action button to access detailed consumption reports. For a broader perspective, the Consumption node in the Administration Cockpit offers a comprehensive view of all registered consumption reports and detailed information about each report. These tools together empower users to maintain alignment with licensing agreements and ensuring the integrity of order registration processes.
By harnessing these capabilities, organizations can streamline their order consumption validation processes, mitigate compliance risks, and uphold operational excellence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |