How to set fix toAdress in Hybris for all email?

If you want to send all emails to some fix toAddress, in that case, you need to override email and displayName in respective *EmailContext of renderer template.
Let's just assume you want to override toAddress in customer registration flow. So here you need to find context class name form Impex. Below are the renderer template for customer registration subject & body and CustomerEmailContext is the class name which will feed all data to this renderer.
# Email velocity templates     
INSERT_UPDATE RendererTemplate ; code[unique=true]                                         ; contextClass                                                                                ; rendererType(code)[default='velocity']
                               ; powertools_Email_Customer_Registration_Body               ; $emailPackageName.CustomerEmailContext                                                      
                               ; powertools_Email_Customer_Registration_Subject            ; $emailPackageName.CustomerEmailContext  

Now open the and change init method
public void init(final StoreFrontCustomerProcessModel storeFrontCustomerProcessModel, final EmailPageModel emailPageModel)
    super.init(storeFrontCustomerProcessModel, emailPageModel);
    String REGISTRATION_EMAIL = Config.getString("", "");
    String REGISTRATION_DISPLAYNAME = Config.getString("", "New Accounts Team");

    customerData = getCustomerConverter().convert(getCustomer(storeFrontCustomerProcessModel));

Author Image

Ankitkumar Patel

Sr. SAP Hybris consultant, having 15+ years experience in SAP Commerce Cloud (Hybris), SAP Spartacus. Extensive experience in SAP Hybris development, third-party integrations, project architecture and design... Read more


  1. Thank u so much , such a great elaboration

  2. Am getting the below exception while doing that

    Mar 21, 2018 5:16:17 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [/leaseplanstorefront] threw exception [Request processing failed; nested exception is de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator@5bdff98c]:missing values for [body] in model ReplyEmailNotificationProcessModel () to create a new ReplyEmailNotificationProcess] with root cause
    de.hybris.platform.servicelayer.interceptor.InterceptorException: [de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator@5bdff98c]:missing values for [body] in model ReplyEmailNotificationProcessModel () to create a new ReplyEmailNotificationProcess
    at de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator.onValidate(
    at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokeValidateInterceptors(
    at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.validate(
    at de.hybris.platform.servicelayer.internal.model.extractor.impl.DefaultModelExtractor.process(
    at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(
    at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(
    at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(
    at de.hybris.platform.processengine.impl.DefaultBusinessProcessService.createProcess(
    at de.hybris.platform.processengine.impl.DefaultBusinessProcessService.createProcess(

    1. Look like, you have not set things correctly, Make sure you have created you Business Process Model with all mandatory values. Better you ask question with all detail in stack overflow, I will try to answer it.

      missing values for [body] in model ReplyEmailNotificationProcessModel () to create a new ReplyEmailNotificationProcess


Post a Comment

Popular posts from this blog

Hybris flexible search query examples

How to remove or update all data records in Hybris?

How to Install temporary Hybris license?