Setting Up Smart Containers

A smart container is a template element that consists of basic blocks (image, text, button), whose content is automatically pulled from a product page on a website.

Use smart containers when you need to quickly add product cards to an email without manually filling in each element.

🚧

Important

If the website uses OG (Open Graph) tags, which provide structured data about the web page content, eSputnik can automatically insert product information into the email.

If the data is not pulled from the website or you need to display additional product parameters, the required values can be added to existing cards manually.

This guide explains how to check whether content cards are automatically populated and how to configure them manually if necessary.

Automatic Data Substitution from the Website

With this method, you only need to copy the product URL and paste it into the container.

Adding a Smart Container to an Email

  1. Go to Messages → Messages → Email.
  2. Create a new email or open an existing one.
Messages navigation menu with the Email channel and Messages tab highlighted, showing a list of email messages
  1. Open the Structures and Modules panel.
Email editor with the Structures & Modules icon highlighted, showing a fashion email template
  1. Go to the My Modules or General Modules tab.
  2. Select the Product Cards category.
Modules panel with the Modules tab and My modules dropdown highlighted, and the Product Cards category underlined

For this example, we will configure containers containing:

  • product image
  • product name
  • price
  • button
  1. Drag the module into the email.
Product Cards module with three blouse products added to the Smart Casual section of the email template, highlighted
📘

Note

If the email already has styles configured, they will automatically apply to the added module.

Inserting Data from the Website

  1. Open the product page and copy its URL.
Browser address bar highlighted showing the product page URL for the Blue Classic Sweatshirt
  1. In the smart container settings, open the Data tab.
  2. Paste the URL into the Link field and click Get.
Smart Container settings panel on the Data tab with the Link field and Get button highlighted, and Name and Image fields showing retrieved product data

The system automatically retrieves the available data

📘

Note

The button text is not changed automatically. Edit it manually if necessary.

First container filled with Blue Classic Sweatshirt product data, highlighted, and the Container settings Data tab showing Name and Image fields

Repeat steps 1–3 for each container.

Third container filled with Mocha Comfort Joggers product data, highlighted, with all three containers now showing retrieved product information

If you plan to use this module in other campaigns, update the module or save it as a new one.

Module context menu with the sync icon highlighted, and the Update module panel showing the Save as New option highlighted

Adding Additional Parameters

📘

Note

This method provides more flexibility for customizing email content but requires basic HTML knowledge.
Use this method if you need to add non-standard product parameters, such as:

  • discount amount
  • color
  • SKU
  • country of origin
  • promotion expiration date

To configure additional parameters, follow these steps:

  1. Add a block to the container.
  2. Create a variable.
  3. Configure CSS selector matching rules.

Below is an example of adding additional discount information to a product card.

Adding a Block

  1. Add a Text block to the container.
Text block icon highlighted in the side panel with a Discount text block added above the sweatshirt product image
  1. Select the block and open the code editor.
📘

Note

The code editor isn't limited to smart containers — you can open it for any selected block, container, structure, or stripe (or for the whole message if nothing is selected) to edit its HTML directly. It's organized into an HTML tab and separate tabs for default and custom CSS, plus a formatting tool that makes the code easier to read.

  1. Add an HTML attribute, for example: class="Discount".
Code editor icon highlighted in the toolbar with the class attribute set to Discount highlighted in the text block's code

Creating Variables

  1. In the container settings, click the Configuration icon.
  2. Click +.
  3. Add a new Element and select the value from the dropdown menu. In our example, this is a field for displaying an additional discount.
  4. Specify:
  • Variable name: Discount
  • Variable value: discount
  1. Save the configuration.
Container settings Data tab with the configuration icon highlighted, showing Name and Image fields for the Blue Classic Sweatshirt

After that, a new Discount field will appear in the container settings.

Container settings Data tab with a new Discount field highlighted below the Price field

CSS Selector Direction Rules

  1. Open the product page in a browser.
📘

Note

This example demonstrates a basic way to inspect webpage elements using DevTools in Google Chrome for Windows. If you use another browser or operating system, refer to the documentation for inspecting elements using DevTools.

  1. Open DevTools to inspect the page element: press Ctrl + Shift + I or F12.
  2. Activate the element selection tool: press Ctrl + Shift + C or click the cursor icon in the upper-left corner of the DevTools panel.
Chrome DevTools Elements panel with the element selection tool tooltip showing the Ctrl+Shift+C shortcut highlighted
  1. Click the required element (for example, the discount value).
Product page with the Second item 50% off badge selected, showing a DevTools tooltip with its element details
  1. Copy the element's CSS selector.
DevTools Elements panel showing the selected HTML element for the Second item 50% off text on the product page
  1. In the smart container, open the Discount field and click Direction rules.
  2. Paste the selector into the field.
  3. Click Check Rule and Save.
Container settings Data tab with the Discount field's Selector value and the Check Rule and Save button highlighted

If the rule is configured correctly, the value will be pulled from the product page.

Discount badge on the container now showing Second item 50% off, pulled from the product page and highlighted
📘

Note

Websites usually use standard CSS selector naming conventions. Therefore, smart container settings can often be reused for most pages that follow standard CSS practices.
However, some pages may contain custom selector names or non-standard attributes. In such cases, additional configuration or creating a new smart container may be required.

The steps for configuring a new container are similar to those described in the Adding Additional Parameters section. Variables and matching rules must be created separately for each element.

If you have any questions about configuring smart containers, contact support at [email protected]


Did this page help you?