Magento SaaS Customisation model

Yegor Shytikov
2 min readNov 6, 2020

Data actions are JavaScript functions that are used in the Magneto Shop (https://magneto.shop/) SaaS architecture to help fetch and map data that is required by modules across applications.

Data actions offer improved performance through the following features:

  • Integrated application-level and request-level caches enable state sharing scenarios.
  • Built-in utilities support batching to minimize the number of external requests that your application requires.
  • Automatic deduplication helps guarantee that multiple data action calls aren’t duplicated.

The Magneto SaaS platform includes a set of core data actions that can be called from modules to do typical data retrieval. For example, core data actions can return product details. You can also create custom data actions to fetch and process data that is required by modules.

Magento SaaS

Core data actions

The Magento SaaS e-Commerce platform module library includes a set of data actions for performing typical actions, such as getting product data from the Magento DB database, or getting another information about the product. Core data actions can’t be modified.

Custom data actions

You can create custom data actions and use them in your modules. Custom data actions can be globally scoped so that they can be used across multiple modules. Alternatively, they can be used in a single module. Custom data actions can call Magento SaaS proxy application programming interfaces (APIs), or any other service provider, to get data. Custom business logic can be applied as required.

Themes

Themes contain site-wideCascading Style Sheets (CSS) style definitions. They also let you add custom, module-specific CSS style definitions. You can set a site theme in the authoring tools. All pages then use that theme by default. You can add more themes, and set them on a template, a layout, or a specific page. This capability is useful if you want to change the theme for a campaign or a temporary seasonal change. You can set the theme on the whole site or a subset of pages.

Themes can also override module views (including module library modules), and can add module definition extensions to extend the configurations and resources on a module. Because themes can change the look and feel of all modules (custom and module library) without requiring that modules be cloned, they allow for better serviceability.

Script injectors

The online platform provides a built-in script injector module that makes it easy to inject JS and ReactJS scripts into the head, body, and so on, from the admin tool. Script injectors make it easy to add scripts such as third-party analytics. You might have advanced requirements to use custom script injector modules to inject custom HTML into your online site.

--

--

Yegor Shytikov

True Stories about Magento 2. Melting down metal server infrastructure into cloud solutions.