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, eSputnik can automatically pull 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 (tab names may vary depending on your interface language and version).
  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 window showing a Shopify product page for a Blue Classic Sweatshirt with the page URL boxed in red
  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

eSputnik retrieves the available data and populates the container fields.

šŸ“˜

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.

Update module panel with the Save as New button boxed in red, and the Store smart module boxed in red in the email template

Adding Additional Parameters

This method provides more flexibility for customizing email content.

šŸ“˜

This method requires basic HTML and CSS knowledge, including familiarity with CSS selectors and browser DevTools.

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.
  2. 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 cursor on the configuration gear icon, and a new Discount label shown above the smart container product image

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 Select an element to inspect tooltip and Ctrl+Shift+C shortcut boxed in red
  1. Click the required element (for example, the discount value).
Product page with the Second item 50% off discount label boxed in red and a DevTools element inspection tooltip showing its style details
  1. Copy the element's CSS selector.
Chrome DevTools Elements panel with the strong element containing Second item 50% off highlighted in the HTML source
  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?