Email block parameters in Campaign Agent

This article is a technical reference for developers and technical consultants setting up email blocks for Campaign Agent. It covers the parameter syntax, also referred to as annotations, used to mark editable elements in blocks stored in Asset Manager.

For an overview of how blocks work and how to manage your block library, see Email blocks in Campaign Agent.

What a block parameter is

A block parameter is a named, typed slot in an email block template. You give it a name, a type, and optionally a default value. Campaign Agent uses these parameters to identify which elements can be edited and how — for example, which text fields, image URLs, or button labels can be changed in the editor or updated conversationally.

Where parameters live

When editing block parameters manually, you'll work with two files in Asset Manager: the base template and the block itself. Understanding which parameters belong where helps you edit the right place without breaking the email layout.

Base template

The base template holds global styles, font imports, and the main content area definition. It contains a data-loomi-slot placeholder that marks where blocks are inserted at design time, so they don't break the email layout.

<!-- Content block slot -->
<table role="presentation" align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" data-loomi-slot='{"name": "Main slot", "description": "Slot to place all blocks into"}'>
    </td>
  </tr>
</table>

Block level

Each block contains a parameter schema — a set of parameters describing each editable element, such as a headline, image URL, CTA link, or product name. The schema also includes higher-level block metadata: the block type and a description that tells Campaign Agent when and how to use the block.

Repeatable product cards

For product grids and product detail listings, data-loomi-row and data-loomi-column mark the repeating row and column so the grid can expand to multiple products. These markers are only valid when the block type is exactly product_grid or product_detail_listing — for all other block types, row and column must be null.

Parameter anatomy

Every parameter requires two fields:

  • name — unique within the block.
  • type — one of the types listed in the next section.

Common optional fields available for every parameter type:

  • description — human-readable explanation of the parameter, used by Campaign Agent to understand how to use it.
  • value — the current value.
  • defaultValue — fallback value used when no value is set.
  • controlPlacement — whether the parameter control appears in the editor toolbar.

Parameter types

text

Use for simple, unformatted text — button labels, subject lines, short copy.

{
  "name": "button_label",
  "type": "text",
  "value": "Shop now",
  "defaultValue": "Learn more",
  "description": "Label shown on the call-to-action button"
}

rich-text

Use when text needs formatting — bold, italic, links, or nested structure. The value can be a plain string, a styled block, a personalized snippet, or an array mixing these. See Content format for details.

{
  "name": "email_body",
  "type": "rich-text",
  "value": "Welcome to our store!",
  "description": "Main body text of the email"
}

url

Use for hyperlinks — button URLs, tracking links. The value can be a plain URL string or a personalized URL. Supports an additional alt_text field for an accessible description.

{
  "name": "cta_url",
  "type": "url",
  "value": "https://example.com/sale",
  "alt_text": "Go to the sale page",
  "description": "URL for the main call-to-action button"
}

style

Use to control visual appearance — colors, fonts, padding. The value is a flat dictionary where every key and value is a string (CSS property → CSS value).

{
  "name": "hero_style",
  "type": "style",
  "value": {
    "background-color": "#ff0000",
    "font-size": "18px",
    "padding": "20px"
  },
  "description": "Visual styles applied to the hero banner"
}

image_url

Use for images. The value is an object with url and alt_text.

{
  "name": "hero_image",
  "type": "image_url",
  "value": {
    "url": "https://cdn.example.com/hero.jpg",
    "alt_text": "A woman wearing a red dress"
  },
  "description": "Hero image at the top of the email"
}

Content format

A rich-text value is a recursive content value — any of the following, or an array mixing them:

  • Plain string"Hello!" — simple text with no styling.
  • Styled block{ "styles": { "font-weight": "bold" }, "content": "Hello!" } — text with CSS styling and an optional link. Fields: styles (optional CSS), link (optional URL that makes the text a hyperlink), content (required text or nested content).
  • Personalized content{ "jinja_template": "…", "label": "…", "tooltip": "…" } — dynamic per-recipient text. See Personalized content.
  • Array — any mix of the above.

Personalized content

Some parameter types support personalization — content generated per recipient using a Jinja template. Personalized content is represented as an object with three required fields:

  • jinja_template — a Jinja template string, for example "Hello {{ first_name }}".
  • label — a short, human-readable label shown in the editor.
  • tooltip — a longer explanation shown as a tooltip in the editor.

Personalized content can be the value of a url parameter, or appear anywhere inside a rich-text value.

Full example

A single block combining several parameter types:

[
  {
    "name": "subject",
    "type": "text",
    "value": "Your exclusive offer",
    "description": "Email subject line"
  },
  {
    "name": "hero_image",
    "type": "image_url",
    "value": {
      "url": "https://cdn.example.com/banner.jpg",
      "alt_text": "A promotional banner"
    }
  },
  {
    "name": "body_text",
    "type": "rich-text",
    "value": [
      "Hi there!\n",
      {
        "styles": { "font-weight": "bold" },
        "content": "Check out our latest collection."
      }
    ]
  },
  {
    "name": "cta_url",
    "type": "url",
    "value": "https://shop.example.com",
    "alt_text": "Shop now",
    "controlPlacement": "toolbar"
  },
  {
    "name": "container_style",
    "type": "style",
    "value": {
      "background-color": "#ffffff",
      "padding": "32px"
    }
  }
]

Common parameter issues

The following issues are the most common causes of blocks not displaying or behaving correctly in Campaign Agent. If a block can't be edited or displays incorrectly, check these first.

IssueWhat you seeHow to fix
Parameter missing from a block elementElement can't be edited in the editor — the original hardcoded value remainsAdd the missing parameter to the block in Asset Manager.
Parameter not accessible in the editorParameter exists but doesn't appear as an editable controlCheck the controlPlacement field and verify the parameter is correctly defined.
Product card missing data-loomi-row or data-loomi-columnProduct grid doesn't expand to multiple productsAdd repeat markers to the correct element in the block HTML.
Repeat marker placed on the wrong HTML elementGrid expands but breaks the layoutMove data-loomi-row or data-loomi-column to the first sibling-duplicated element.
Incorrect block or parameter descriptionBlock is used in the wrong context, or Campaign Agent applies the wrong column count or usageUpdate the description to accurately reflect the block's purpose and constraints — for example, "Max. 2 columns."
Missing value or defaultValueBlock renders emptyAdd a value or defaultValue to the parameter.
Non-string value in a style objectBlock parameter is invalid and may cause rendering errorsEnsure all keys and values in the style object are strings.

© Bloomreach, Inc. All rights reserved.