Home » Articles posted by Akash Prajapati
Author Archives: Akash Prajapati
How to disable Solr in hybris during server up
Solr Server can be disable using following property:
solrserver.instances.default.autostart=false
Groovy : Converting all EmailIds of customers to lower case in hybris
I have many Email ids of CustomerModel in UPPER CASE in hybris Database. I need to convert all existing emailIds into lowercase. what would be the easiest way to perform such bulk entry action:
Manually changes are really hard and unprofessional way to do such changes. Basically with large numbers of entries like : Production , we must choose Groovy Script.
Here we have one small example to convert the such changes with easiest way.
import de.hybris.platform.core.Registry
import de.hybris.platform.core.model.user.CustomerModel
import de.hybris.platform.servicelayer.model.ModelService
import de.hybris.platform.servicelayer.search.FlexibleSearchQuery
import de.hybris.platform.servicelayer.search.FlexibleSearchService
import groovy.transform.Field
@Field
FlexibleSearchService flexibleSearchService = Registry.getApplicationContext().getBean("flexibleSearchService")
@Field
ModelService modelService = Registry.getApplicationContext().getBean("modelService")
def customerQuery = new FlexibleSearchQuery("SELECT {PK} FROM {Customer}")
def customerResult = flexibleSearchService.search(customerQuery).result
customerResult.each {
CustomerModel customer = it as CustomerModel
if ( customer != null && customer.getLoginEmailAdress() != null){
println("customer before: " + customer.getLoginEmailAdress())
def email=customer.getLoginEmailAdress().toLowerCase()
customer.setLoginEmailAdress(email.toLowerCase());
modelService.save(customer)
println("customer after: " + customer.getLoginEmailAdress())
}
}
SAP Commerce Cloud: Release 2011
SAP Commerce Cloud 2011 includes key features that offer an engaging customer experience and high agility for businesses to deliver quick time to value.
- New Commerce OCC APIs for B2C and B2B enable high agility with a Headless Architecture for building Commerce experiences through different channels.
- Context-Driven Services integration enables further capabilities such as Dynamic Affinities and machine-learning-based product recommendations to offer a better customer experience with real-time personalization and boost conversion.
- New Extensibility features with Integration APIs and Runtime Data Modeling offer yet another layer of agility for faster implementations with cloud-native extensibility.
- Enhancements to Integration APIs speed up end-to-end integrations with the new Virtual Attributes and Webhooks capabilities that offer increased runtime configurability.
- Enhancements to the Backoffice Framework further improve business user productivity by simplifying time-consuming manual tasks.
Commerce OCC APIs
These are the release notes for the Commerce OCC APIs of SAP Commerce Cloud 2011. OCC APIs allow you to decouple your frontend storefront from the back-end platform, creating a flexible headless commerce system. You can then create multiple commerce touchpoints that make requests to the back-end through API calls.
What’s New
New features include:
- Configurable Bundles OCC APIs
- Cart Validation OCC API
- API Endpoint Deactivation
- OCC AddOn Converter
Features
Configurable Bundles OCC APIs
Increase profits and customer value by adding Configurable Bundles to your headless storefront.
- Define different pricing for products that are sold together, using OCC APIs
- Offer your customers convenient prepackaged options or guide them through the process of building their own bundles
- Bundles also allow you to control your inventory by exposing slow-selling products
Cart Validation OCC API
Improve the checkout experience on your headless storefront by validating the cart at an early stage.
- Display validation errors even before proceeding to the checkout page on your headless storefront
- Ensure customers are aware that an auto-correction has been made to their cart entries
- Customize the behavior of cart validation using validation hooks
API Endpoint Deactivation
Easily substitute your custom APIs in place of existing endpoints with real-time endpoint deactivation.
- Allows custom API endpoints to be used in place of out-of-the-box APIs
- API endpoints can be disabled or enabled on-the-fly – no restart required
- Can also be used to disable APIs that aren’t being used by your commerce system
See API Endpoint Deactivation for information on the backend support for this OCC REST API.
OCC AddOn Converter
Convert your OCC AddOns to OCC Extensions using a command-line interface tool.
OCC Extensions allow you to extend the functionality of OCC without the process of OCC AddOn installation.
See OCC AddOn Converter for more information on converting OCC AddOns.
SAP Commerce Extensibility
These are the release notes for SAP Cloud Platform Extensibility. SAP Cloud Platform, Kyma runtime is the extensibility platform for SAP Commerce, which allows you to use microservices to extend the standard functions of SAP Commerce without compromising on upgradability. Additionally, SAP Commerce introduces a myriad of new options of runtime extensibility.
What’s New
Release 2011 provides the following new features:
- Kyma – Improved Usability of Integration API
- Runtime Attributes
Features
Kyma – Improved Usability of Integration API
Release 2011 is a big milestone in the effort to make Integration APIs a first-class citizen of SAP Cloud Platform, Kyma runtime. Users can easily expose their Integration APIs to Kyma using a simple Backoffice interface. Additionally, new safekeeping measures were introduced that prevent users from accidentally deleting Integration Objects or Inbound Channel Configurations exposed to Kyma as APIs.
For more information, see Authenticating an Integration Object as an API.
Runtime Attributes
Release 2011 achieves a big milestone in runtime extensibility. New attributes can be added without the need to utilize the classic extension mechanism. New attributes can be added in Backoffice and instantly used in a variety of extensibility scenarios.
For more information, see Runtime Attributes and Runtime Attribute Implementation Examples.
Context-Driven Services Integration
These release notes outline key capabilities added to Context-Driven Services between the 2005 and 2011 SAP Commerce releases. These features can be used with all currently supported SAP Commerce versions, as Context-Driven Services is compatible with all supported versions of SAP Commerce Cloud.
SAP Commerce Cloud, Context-Driven Services is a SaaS integration to SAP Commerce that enables a range of functionality to deliver a more personalized experience and improve conversion:
- Context-Driven Services Foundation builds a picture of the user’s behavior across commerce and non-commerce websites, learning affinities and what interests your users.
- Context-Driven Segmentation takes these affinities and behaviors, and uses them to assign users into segments in real time, feeding the data into Personalization.
- Context-Driven Merchandising puts relevant product mixes in front of your users, based on real-time performance metrics.
To find out more about the features and availability of Context-Driven Services, visit Context-Driven Services Help.
What’s New
The following features were introduced to Context-Driven Services with the SAP Commerce Cloud 2011 release:
- Event Layer
- Dynamic Affinities
- Recommendations
Features
Event Layer
Profile Tag now supports an event layer – a JavaScript variable to which a storefront can push events and Profile Tag reacts to that. It can be used to either manage the user’s consent settings or to send Data Collections.
Dynamic Affinities
Dynamic Affinities present an accurate picture of the user’s preferences. Context-Driven Services has revised the way it collects, calculates, stores, and maintains customers’ affinities. Among other improvements, now affinities also decay over time if the user fails to show interest for a while and additional events influence the affinity scores. For a business-oriented overview of how Context-Driven Services currently handles affinities, see Dynamic Affinities, and for the related technical details, see Dynamic Affinities Events.
Recommendations
Context-Driven Services now offers a machine-learning-based recommendation feature that allows you to promote alternative products to website visitors. The displayed products predict the next item that the user is likely to view, based on the interactions of the crowd of users with the website. With a single integrated solution, you can now drive user engagement, improve product discovery, and, as a result, increase the conversion rate. For more details on the feature, see Recommendations.
Integration APIs
These are the release notes for the Integration API module of SAP Commerce 2011. The Integration API allows for dynamic configuration of OData V2 services that allow you to load, retrieve, and push data from SAP Commerce.
What’s New
In 2011, SAP Commerce introduces a variety of features that enrich the integration experience for administrators and consumers of the APIs. The new capabilities are:
- Virtual Attributes
- Webhooks
- Enhaned Security
Features
Virtual Attributes
The purpose of Virtual Integration Object Attributes is to allow additional runtime configuration beyond what is currently available without having to restart and reinitialize/update SAP Commerce. Administrators can add additional attributes to their Integration Objects and use a backing script to retrieve the data used to populate them. This feature provides users with a wide array of tools to enable them to shape the payload of their Integration APIs. Virtual Attributes can be used for the following use cases:
- Data formatting
- Payload enrichment
- Payload flattening
The use of Virtual Attributes is currently supported only for the data retrieval scenarios supported by Outbound Sync, Webhooks, and GET requests.
For more information, see Virtual Attributes and Modeling Features.
Webhooks
Webhooks combine event subscriptions with the runtime configurability of Integration APIs, which allows customers to right-size their Webhook payloads to meet their extensibility use cases. Users can select an Integration Object that shapes the payload of the request sent to the selected Consumed Destination. Additionally, the Webhook configuration auto-discovers the changes based on the root of the Integration Object. Once any change occurs on the root type, an event is fired, and the payload defined by the Integration Object is sent to its destination. In this release, Webhooks support:
- Filtering – Users can create dynamic scripts that allow them to filter data that they do not want to propagate outside of SAP Commerce Cloud.
- Retries – Each 5xx error is retried once after a 10 second interval.
- Monitoring – Each request is captured in the log results and visible in Integration Monitoring Backoffice.
For more information, see Webhooks and webhookservices Extension.
Enhanced Security
The 2011 release includes new default authentication and authorization modes for more robust control of the APIs.
- Authentication – Integration Objects are not automatically exposed as APIs by default. Administrators must go through an additional step of specifying the Authentication mode (BASIC or OAuth2) either in Backoffice or via Meta APIs.
- Authorization – Type Access Rights are used by default and allow for the fine-tuning of the access-level permissions for the APIs. This feature allows administrators to restrict access to the create, read, update, and remove options for each Type defined in the IntegrationObjectItemType of an Integration Object.
For more information, see Authentication, Access Rights, Setting Up Access Rights for Integration Objects, and Integration Backoffice Security.
Backoffice Framework
These are the release notes for Backoffice Framework of SAP Commerce Cloud 2011.
Backoffice Framework has been designed to allow powerful business tools and user interfaces – fully leveraging SAP Commerce Cloud core platform functionality – to be developed easily and in a consistent way. Consistency is assured by having one single business tool environment and web application, and have domain-specific functionality tied in as plugins.
What’s New
The SAP Commerce Cloud 2011 release introduces the following enhancements and features to Backoffice Framework:
- Password Change
- Filtering in Dynamic Nodes – Filtering of the Catalog Tree
- Enabled ytestid
- Filtering Date with Advanced Search
- Setting the Delimiter for CSV Export
- Bulk Editing
- Classification Features
- Classification Metadata
Features
Password Change in Backoffice
The password change feature enables you to change your Backoffice password after login.
- You can only change the password that is processed locally by SAP Commerce Cloud.
- Password changes have immediate effect. There is no need to restart the system.
- Administrators can change configuration to enable or disable the password change feature.
For more information, see
Filtering in Dynamic Nodes – Filtering of the Catalog Tree
Search algorithm in the Dynamic Node Populators for Catalog structure presentation of the Explorer Tree widget (CatalogTreeModelPopulator) allows you to filter the tree more effectively.
- The new algorithm ensures that, even when you have large catalogs in your system, you’re still able to search the Explorer Tree smoothly. You can narrow the tree down to the size that is convenient for you to browse through and find the data you want to work on.
- Filtering in Dynamic Nodes uses Flexible Search-based lookup which is fast and has low memory-footprint, compared to the cache-based approach.
For more information, see:
Enabled ytestid
The default configuration of ytestid has been changed and is now enabled to support automated testing against a running application. You can still change configuration not to display the ytestid.
For more information, see Settings in local.properties and project.properties.
Filtering Date with Advanced Search
In Advanced Search, when items are filtered using operators for the Date type attributes, you can decide to filter the items with both date and time or with date only.
- The ComparesExactDate parameter configures the behavior of all operators.
- The EqualscomparesExactDate parameter configures the behavior of the equals operator.
For more information, see Filtering Date.
Setting the Delimiter for CSV Export
When exporting your data from the Collection Browser widget to the list.csv file, you can configure the column delimiter for the list.csv file.
- Define a column delimiter that works globally for all types.
- Define a column delimiter only for certain types.
For more information, see Export List View to CSV Action.
Bulk Editing
Bulk Editing functionality was updated. When editing multiple items, you can now bulk edit the classification attributes that belong to categories assigned to selected products.
For more information, see Bulk Editing in Backoffice.
Classification Features
You can change the order of classification features and create classification features groups. It is also possible to enable the WYSIWYG editor for Category Features.
For more information, see:
Classification Metadata
You can use the metadata endpoint to retrieve information about various data. For example, attribute meta information, attribute position, or a range of values.
For more information, see Classification Metadata Endpoint.
Search and Navigation
These are the release notes for Search and Navigation in SAP Commerce Cloud 2011. The capabilities of Search and Navigation allow you to configure how your customers browse through category navigation. It also facilitates customers to search for products based on keywords or facets.
What’s New
The following feature is new in SAP Commerce Cloud 2011:
- Adaptive Search Grouping
Features
Adaptive Search Grouping
You can easily combine products on your site by configuring grouping on the category level. Grouping allows you to combine products to facilitate a more intuitive search experience for customers.
Each product and its variants are treated as separate products by default. This results in each variant being displayed individually. However, you are now able to change this display behaviour to group the variants in a category.
You can select to perform grouping for diverse products and/or similar products with their variants. The search results return all products that match. These results can have a positive impact as the user experience demands fewer clicks to view more results.
Platform
These are the release notes for Platform of SAP Commerce Cloud 2011. Platform consists of a standard set of extensions providing the main functionality of a Commerce Cloud installation. An extension is a group of features comprising a subset of Commerce Cloud functionality. An extension can contain business logic, type definitions, a web application, and many other things.
What’s New
Platform version 2011 includes
- Process Engine Improvement
- Changed Values of StaleCronJobUnlocker
- HTTP Session and OAuth2 Tokens Management Security Improvement
- File Location Verification in LocalFileMediaStorageStrategy
- Checking Runtime Attributes Type by the Type System
- Using Multiple Independent Hooks with CloneAbstractOrderHook
- Extending DefaultSLFindPriceStrategy through the FindPriceHook Interface
Features
Process Engine Improvement
The default value of property processengine.process.canjoinpreviousnode.default has been changed to true so that action nodes are now run synchronously by the task engine.
For more information, see Executing Business Process Action in a Synchronous Way.
Changed Values of StaleCronJobUnlocker
Default values of some properties used by StaleCronJobUnlocker have been adjusted.
For more information, see Cluster Improvements and ID Autodiscovery.
HTTP Session and OAuth2 Tokens Management Security Improvement
Platform now supports user session and token invalidation to ensure that no stale HTTP sessions or OAuth tokens are used after a user password change.
For more information, see User Session and Token Invalidation.
File Location Verification in LocalFileMediaStorageStrategy
It is now impossible to return media from different folders by tampering their URL. When the media file location doesn’t match their folder, MediaInvalidLocationException is generated.
For more information, see Using Local Media Storage Strategy.
Checking Runtime Attributes Type by the Type System
When reading runtime attributes, the type system now checks the types of primitive attributes. If the type declared in the attribute descriptor does not match the database value, a null value is returned.
For more information, see Configured Types vs Runtime Types.
Using Multiple Independent Hooks with CloneAbstractOrderHook
Instead of overwriting the clone behavior with your own strategy, you can now also decorate it by implementing the before or after hooks of CloneAbstractOrderHook. As a result, you can use multiple independent hooks.
For more information, see Cloning.
Using Multiple Independent Hooks with CloneAbstractOrderHook
You can now extend DefaultSLFindPriceStrategy through an implementation of the FindPriceHook interface. It allows you to modify the default price based on the default price value and the entry it is associated with.
For more information, see Service Layer API.
Important Information about the SAP Commerce Cloud 2011 Release
Explore additional information about the current release that is not covered in the release notes, including fixed issues, newly deprecated features, or components that are now at end of life, and which have been removed from the software.
De-release Announcements
With the 2011 release, SAP announces the deprecation of the Event Tracking Module.
Deprecation Announcements
The following modules are being deprecated with the 2011 release and will be de-released as part of a future release as indicated.
Extension or Module | Planned De-Release | Reason for Deprecation | Mitigation Plan |
Event Tracking Module | Q4 2022 | The Event Tracking module is an old implementation using outdated libraries. Sending a large number of customer interactions through the SAP Commerce back end does not scale. | One way of using more scalable architecture to capture customer interactions is to let the browser send the events directly to the respective endpoint. An example of how this can be done is the Profile Tag JavaScript approach of SAP Commerce Cloud, Context-Driven Services. In Spartacus, the event service does what the Event Tracking module extensions did. |
For a comprehensive list of recent deprecation announcements, refer to Deprecation Status.