Login

Security and Compliance

Setting Up Smart Containers

A smart container is a template element consisting of basic blocks (image, text, button), the content of which is automatically inserted from the site. 

If your website uses Open Graph (OG) tags that provide structured data about the content of the web page, it allows the system to automatically insert information about products into the email.

When data from the website is not supplied, or additional product parameters need to be displayed, you must manually add parameters to existing cards.

This guide will cover how to check if the content card autofill is functioning and how to manually adjust settings if necessary.

Automatic Data Substitution from the Website

You only need to copy the product's URL and paste the link into the container to implement this method. After that, the system will automatically fill in the corresponding data in the email.

  1. Go to Messages → Messages → Email. Open an email or create a new one.

Creating an email

Note

When using an email with a custom design, the design styles are immediately applied to all objects added from the module library.

  1. Go to Modules → Advanced. Select the Product Cards category and add the ready-made module.

Module library

For example, let's take a module with cards containing:

  • Product image

  • Name

  • Price

  • Button

  1. Drag the card to the email.

Drag the card to the email

Data Substitution 

  1. Open the product page and copy the URL.

Copy the URL

  1. Click Smart-Container → Data → Smart in the menu on the left and paste the copied URL in the Link field.

Link field

  1. The system will substitute the data:

Substituted data in the container

  1. All parameters will be filled except for the button name, so change it and duplicate the module further.

  2. Paste the copied URLs for each product in the email.

Substituted data in the email

  1. Save your customized structure to the module library for use in other emails.

Save your customized structure

Adding Parameters to Existing Cards

This method of setting up smart containers is more labor-intensive and requires certain technical skills; however, it provides a more flexible approach to customizing email content.

When using this method, you can add various product parameters, such as color, article number, country of origin, discount amount, promotion duration, etc. This is especially useful if you have diverse products with different characteristics.

To set it up, you need to perform the following steps:

  • Add blocks to the email, specify variables and matching rules for them,

  • Substitute a CSS selector element.

Let's consider an example where you need to add information about the availability of a product to an existing module.

Editing HTML Code

  1. Add a Text block with the “Product availability​​” text to the container. 

  2. Click on the Smart-Container located at the top of the container.

Smart-Container settings

  1.  Click the Code icon on the editor panel and open the code for this block.

Code icon

  1. Add the class attribute to the "Product availability​​" field: class="Availability".

Adding an attribute

Adding Variables and Matching Rules

  1. Go to Data → Smart → Configuration in the container settings.

Configuration tab

  1. Click  + → Variable var.

Variable var

  1. Add the p_availability variable and name it Availability.

Variable name

  1. Go to the Matching rules section, select the Internal tab, and, specify the “.Availability” selector -  for the p_availability variable. Leave the Attribute field empty.

Important

The CSS selector's name is case-sensitive and must match exactly the class attribute name specified in the code.

CSS selector

  1. Go to the Appearance tab. If everything is done correctly, the Availability field should appear.

Availability field

Substitute the CSS Selector

  1. Go to the product page in your browser.

Note

The example covers the basic way of inspecting elements on a web page using DevTools in Google Chrome for Windows. If you use another browser or operating system, refer to the documentation for using DevTools and inspecting elements specific to that platform.

  1.  Press Ctrl + Shift + I or F12 on your keyboard to open DevTools and Inspect the page element.

  2. Press Ctrl + Shift + C or click the cursor icon in the top left corner of the DevTools panel to select the Inspect Element option.

DevTools panel

  1. Select an element on the page by clicking the left mouse button. In our case, it is In stock.

Selecting an element on a page

  1. In the code editor, right-click and select Copy selector from the drop-down menu.

Copy selector

  1. Go to the Matching rules section in the smart container and select the External tab.

External tab

  1. For the p_availability variable, paste the copied selector into the CSS selector field. Leave the Attribute field empty.

Information about the availability from the product page will be inserted into the container.

CSS selector field

Note

Websites usually use standard CSS selector names. Setting up smart containers should work for most pages following CSS standards. However, some pages may have unique selector names and attributes. These might need advanced settings or creating new smart containers.

The steps to set up a new container will be similar to those outlined in the Adding Parameters to Existing Cards section. However, adding variables and mapping rules need to be specified for each element.

If you have questions about setting up smart containers, please contact us at support@yespo.io

Any Questions?
We’re always happy to help!
Discount services
Schedule a Call
Fill in the form, and our specialists will call you back as soon as possible.
Discount services
Chat Support
We’re waiting for your questions!
Discount services
Email
Contact the support team