Skip to content
This plugin is new and currently in beta. For the stable version, please use the previous version of the plugin.

Synchronized Modules

Synchronized Modules allow for seamless updates across all email templates that utilize a specific module. This feature is particularly useful for tasks such as updating branding or contact details, as changes made to a synchronized module will be applied automatically to all templates where the synchronized module is activated.

How to Activate

To enable the Synchronized Modules feature, initialize the plugin with the following parameter:

js
"syncModulesEnabled": true

Once enabled, your customers can save their modules and while saving they can activate the synchronized module option.

Usage

When a synchronized module is dropped into the email, a "Sync OFF" symbol will appear on the module. Customers can then choose to:

  • Update: Apply modifications to the module in the library.
  • Restore: Revert the module to its default state.
  • Make Unsynchronized: Convert the module to a standard, unsynchronized module.

If a user lacks permission to modify the module, the "Update module" option will be hidden from the settings panel.

How It Works

  1. When the specified parameter is included during plugin initialization, the editor queries its database for all saved synchronized modules based on the configurations provided (such as those in the metadata parameter).
  2. The editor scans the HTML of the opened template to detect any synchronized modules. If found, it replaces the content with the version saved in the library.
  3. If the plugin was initialized with the syncModulesEnabled parameter, the getTemplateData method returns the HTML, CSS, and arrays of IDs of synchronized modules used in the template.
  4. Once you receive a notification about changes in your email template, you can call the Get HTML and CSS of email template method from your server. Our backend returns the HTML, CSS, and IDs of synchronized modules used in the template.
  5. The plugin owner must store the information about which synchronized module IDs belong to which template in their database. When a synchronized module is updated, the editor fires an module_saved event that the customer’s application must read to start the synchronization of other templates containing that module.
  6. To achieve this, run the “Compiling Email Templates” method ONLY for THOSE templates that include the updated module.