Skip to main content

Use merge parameters in SmartBlocks

Use merge parameters to pass dynamic data into a SmartBlock and personalize content for each customer.

Bartlomiej Rekosiewicz avatar
Written by Bartlomiej Rekosiewicz
Updated over 2 months ago

You can use merge parameters to:

  • Greet customers by name, for example, “Hello Anna”.

  • Show product recommendations based on a specific product ID.

  • Recommend related products from the same category or collection.

  • Display prices in the correct currency for the customer’s location.

Before you start

Things you need to know:

  • Decide which data you want to personalize with, such as product ID, category, or customer name.

  • Ensure your ESP provides those variables or that your Fresh Relevance script records them.

  • Check that the merge codes match your SmartBlock layout.


Automatically populated merge parameters

Depending on your content placement, Fresh Relevance can automatically fill some parameters.

Email – content served from your ESP

  • Use dynamic fields already defined in your ESP, or mapped from Fresh Relevance into your ESP.

  • Examples include customer name, customer number, segment details, currency, and language.

  • You can hard code values for different emails, such as currency or language.

Web – deployed using Site Editor

Any variable set up in your script can be used when placing a Slot via Site Editor.

  • Common variables include:

    • prid = Product ID

    • sbr = Site brand

    • curr = Currency

    • lang = Language

    • cv = Cart value (may include delivery fees)

  • You can access additional variables through Tags.

  • To see additional variables:

    1. Navigate to Content > Site Editor.

    2. Under the iFrame that loads your website, select Preview to open your site in a new tab with the Site Info Bar.

    3. Navigate to a product detail page (PDP), then select the expand icon in Site Info Bar to view Tags.

Web – deployed via Slot code

Ask your developers to add available variables directly into the Slot HTML code.


Add merge parameters to a SmartBlock

  1. Navigate to Content > SmartBlocks.

  2. Find your SmartBlock and Edit it.

  3. Go to Properties and locate the Merge parameters section.

  4. Select NEW MERGE PARAMETER and enter the relevant codes. Common parameters include:

    1. prid – Product ID

    2. sbr – Site brand

    3. lang – Language

    4. curr – Currency

  5. If you are using Site Editor, provide the correct codes to match your Slot setup.


Use merge parameters for personalization

Text personalization

  1. Precede the parameter with merges. and wrap it in double curly brackets. For example, {{ merges.name }}.

  2. Add fallback text if no value is available.

  • For example, Hi {{ merges.name or 'customer' }} displays “Hi Sophie” if a name exists or “Hi customer” if it doesn’t.

Dynamic product recommendations

Use parameters in filters to adapt recommendations by currency, language, site brand, or category. For example, {{ merges.sbr }} for site brand.

Quick merge examples:

  • Site brand: {{ merges.sbr }}

  • Currency: {{ merges.curr }}

  • Language: {{ merges.lang }}

  • Product ID: {{ merges.prid }}


Add merge parameters to a Slot

  1. When you are happy with your SmartBlock, select PUBLISH AND USE to create a Slot.

  2. Select the deployment location.

  3. On the properties page, confirm or add the merge parameters to match the SmartBlock.

  4. If you create a Slot before adding content, enter the parameters manually.

  5. To check existing Slots, go to Content > Slots and select the Edit tab for your chosen Slot.


Deploy with merge parameters

Email deployment

  1. In the Slot, go to the Use tab and copy the HTML code into your email.

  2. Populate the ESP merge fields for email address and any required parameters.

  3. Under Edit ESP merge values, enter the correct codes for your ESP, then select Update.

  4. Refer to your ESP documentation for the correct field syntax.

Web deployment via Site Editor

  • In your Slot’s Use tab, select Site Editor to open the drag-and-drop tool.

Web deployment via Slot code

  • Your development team can populate parameters from the server or the page query string.

  • Copy the relevant Slot HTML, substitute the values, and add it to your site.

Did this answer your question?