Specify the source record ID in the visual builder (also via shortcodes)

This guide explains how to specify which record (a specific database item) should be used to retrieve the value of an Additional Field within the Visual Builder. This is essential when displaying dynamic data.

You can enter a static ID (a number) or use a shortcode to make the ID dynamic (for example, retrieving the logged-in customer's ID or the current order's ID).


Step-by-Step Procedure

1. Access Block Settings:

In the Visual Builder, double-click on the block displaying the Additional Field (e.g., "Text", "Image", "Number", or "Additional Field" blocks). The block settings window will open.

2. Define the Data Source:

At the top section, make sure you have correctly selected:

  • Source Module: The module from which the data comes (e.g., Products, Customers).
  • Field to Display: The name of the additional field you want to show.

3. Locate the Conditions Section:

Scroll down until you find the section titled Conditions.

4. Specify the Source Record ID:

Within the "Conditions" section, you will find a field labeled:

Main Record ID

In this field, you need to enter the numeric ID of the specific record from which to retrieve the data.

5. Use a Static or Dynamic ID (Shortcode):

  • For a Static ID: Enter directly the record's identifying number (e.g., 145).
  • For a Dynamic ID (Shortcode): Use available shortcodes. The field supports shortcode usage as indicated by the placeholder: This field supports shortcode usage.
  • Example: If you are building an email related to an order, you might use a shortcode like {order-id} to automatically retrieve the order's ID.

6. Save Changes:

Once you've entered the ID or shortcode, save the block settings to apply the change. The block will now display the Additional Field data associated with that specific record.