40 countries, one Drupal 9 multi-domain platform for Bejo Zaden B.V.

The new Drupal 9 multi-domain platform developed by Synetic gives Bejo Zaden more speed, flexibility and easier use for 40 different countries and websites. A clever link with PIM system Perfion ensures that Bejo can manage its product range and product information worldwide, while a design system and dynamic content blocks automatically ensure a consistent brand appearance.

Case description

With branches in over 40 countries Bejo is a leading company worldwide in the breeding, production and sales of seeds. We migrated the old D7 multi-domain platform, on which about 40 different websites were running, to Drupal 9. Thanks to our clever link with Bejo's Perfion Product Information management (PIM) system, Bejo can now easily manage products and product information per country. thanks to the use of dynamic blocks instead of a fixed content model the new Drupal 9 platform also offers much more freedom and flexibility for the content editors. The new platform is much faster in terms of performance, has been given a nice touch up and is in many ways easier to use for Bejo.  

Case goals and results

✔ Drupal 9 multi-domain & multi-lingual platform 
We migrated the old D7 platform, on which about 40 different websites were running, to a brand new Drupal 9 multi-domain and multi-lingual platform. Content and data, can now be shown on one or more domains and/or be changed specifically for a certain domain. Whereas in the old platform each domain could only handle one language, this is no longer the case. Each domain can now offer its content in different languages. 

✔ More freedom and flexibility for content editors thanks to paragraphs 
In the old situation every page of a certain type had the same layout, or a fixed content model. With the new CMS, the content editors have gained much more freedom and flexibility. With a large set of dynamic blocks they can now build pages the way they want. Using the layout paragraph they can, for example, easily create different columns with different content paragraphs. 

✔ Clever link with Bejo's PIM system ‘Perfion’. 
Among other things, Bejo's websites function as digital product catalogs. The product information that is managed in Bejo's PIM system Perfion, must be correctly shown online for 40 different countries with their own websites. In the old situation, the data could only be imported for one language per domain, but the new platform can also handle multilingualism.

✔ Automation and self-management save Bejo time and money now  
Bejo manages all product information of about 10,000 articles in Perfion. We have linked all product information fields to the new Drupal platform. The data is automatically imported on a daily basis and now Bejo can choose per domain which information is shown or not. This saves Bejo a lot of time and money.  

✔ Clear (visual) structure  
In addition to inspiration and overview, Bejo's sites offer information about Bejo's product range; they function as digital product catalogs. The range of seeds is subdivided into conventional and organic assortment, again with all sorts of different crops and varieties underneath. Thanks to the predetermined use of color, it is clear to visitors whether they browse conventional or organic seeds. When content editors in the CMS choose between conventional or organic, the page automatically shows the correct colors. 

✔ Easily search and make comparisons with the Search API & Entity Compare Module 
Users can easily search within the site thanks to SOLR. You can very easily select products to compare with each other on different points. When the seeds should be sown, the harvest period of the crop, and so on. The data is displayed in a clear manner for comparison. For example in columns, or diagrams.

✔ Easy PDF generation thanks to Entity Print & Gotenberg 
At Bejo's request, we developed an integration with Gotenberg –an API platform to generate PDF’s so these can now be generated easily. Users can now export the product information of a specific product to PDF. We are currently making this available for the Drupal community.

✔ Optimized performance through different cache layers 
By combining our own Kubernetes hosting with Fastly CDN we have tweaked the Drupal setup to make maximum use of the cache capabilities in APCU, Database and Redis. We combined that with the Purge module which in Fastly automatically flushes all related cached pages via Cache Tags when making changes to content. 

Challenges

✔ Multi-domain vs multi-lingual 
Like Drupal 7, Drupal 8 & 9 have a multi-domain suite for providing content for multiple domains. The only problem was that the combination of multi-domain and multi-lingual together did not work well. Also, the maintenance on the modules to Drupal 9 compatibility was minimal. So we made Synetic maintainer of the https://www.drupal.org/project/domain_language_negotiation module. This way we ensure that we can provide a good solution for multi-domain projects with multi-lingualism. 

✔ Flexible color palette  
Bejo Zaden B.V. is active in about 40 different countries under the name 'Bejo', but also under other names such as 'Seedcom' in Denmark or 'Premier Seeds' in New Zealand. Some countries differ in terms of branding and corporate identity colors. It also happens that companies are acquired by Bejo under their own name, which then must be incorporated into the multi-domain platform. In the old situation, applying different colors and deviations required a lot of work and adjustments to the theme.   With the Color Swatch module we developed (https://www.drupal.org/project/color_swatch), it is easier to define different color palettes within the same theme. Unlike the Color module in core (which will be taken out of core in Drupal 10) this works with CSS:root property https://developer.mozilla.org/en-US/docs/Web/CSS/:root . 

✔ Generate PDF 
One of Bejo's wishes was to be able to generate a PDF of the available product information of a specific variety. Drupal's Entity Print module provides a good basis, but the DOMpdf integration was not sufficient given the HTML/CSS complexity that DOMpdf cannot handle. The WKHTMLtoPDF integration does work, but it doesn't run on the desired Alpine Docker images that we want to run on our Kubernetes environment, and the ongoing development on this was minimal. We found an option that met this better via Gotenberg,an opensource PDF generation platform via API’s, see : https://gotenberg.dev
This REST API based solution can be run as a standalone service, and is available as a docker image. It uses Chromium to do conversions, keeping us very close to what HTML and CSS can do in a browser. We have developed an integration for this with the Entity Print module to allow guttersberg to also be used as a service to generate a PDF document. We will also be making this available on Drupal.org soon.
See the placeholder at : https://www.drupal.org/project/entity_print_gotenberg

✔ Perfion integration 
With the old platform, we ran into limitations of how we stored data from Perfion in fields. Because we were using normal fields from Drupal itself we had to transform the data from Perfion so it could be stored correctly. Because of this we had to throw away the old field and create a whole new one in the content model if we wanted to do something different with the data, with a new piece of logic to transform the data.
Our solution meant that every field in Perfion had to have its own field in Drupal to be able to show a field label. Then the field label had to be imported from Perfion as a translation also to make sure this was also synchronized. 

With the new platform we have changed this completely: we don't transform the data. We store it as pure JSON in Drupal so the original data of the entire field from Perfion always exists in the website. As a result, we only need to create different 'formatters' for this field that ensure the field is visually transformed into that which is desired. The link therefore always remains intact and if we want to do something else with it, it is purely a frontend adjustment in Drupal. Furthermore, we can now put fields that are formatted the same in the same multi-valued field, also because Perfion adds a 'weight' to the data. This allows us to sort the data without having a huge set of fields. This has simplified the content model enormously and we are much more flexible when it comes to making adjustments to the presentation for these pages. 

As icing on the cake, we have now also taken into account the source language set-up and the possibility of translated data. As a result, Perfion can now provide translated content in alternative languages for a single domain. But also the management of the mapping between a field in the content model and a field in Perfion is fully managed by Bejo itself. As a result they have fewer maintenance costs when their content model changes in Perfion. 

Community contributions

Module Maintainership 
- Entity Print Gotenberg - https://www.drupal.org/project/entity_print_gotenberg 
- Color Swatch - https://www.drupal.org/project/color_swatch 
- Domain Language Negotiation - https://www.drupal.org/project/domain_language_negotiation 
- Icons - https://www.drupal.org/project/icons 

Patch contribution 
- Administration Language - https://www.drupal.org/project/administration_language_negotiation 
https://www.drupal.org/project/administration_language_negotiation/issues/2887035 

- Drupal Core - https://www.drupal.org/project/drupal  
https://www.drupal.org/project/drupal/issues/3125760 

- Default Content Deploy - https://www.drupal.org/project/default_content_deploy  
https://www.drupal.org/project/default_content_deploy/issues/3130782 

- Domain - https://www.drupal.org/project/domain  
https://www.drupal.org/project/domain/issues/3222865 

- Entity Comparision - https://www.drupal.org/project/entity_comparison  
https://www.drupal.org/project/entity_comparison/issues/3265209 

- Layout Paragraphs - https://www.drupal.org/project/layout_paragraphs  
https://www.drupal.org/project/layout_paragraphs/issues/3182031 

- Viewsreference – https://www.drupal.org/project/viewsreference 
https://www.drupal.org/project/viewsreference/issues/3253860 

Categories

Enterprise

Date when website went live

1 year 8 months ago