Email personalization in Loomi Marketing Agent

This article explains how Loomi marketing agent builds personalization, how it reads your project data, and how to diagnose and fix common personalization issues.

Loomi marketing agent personalizes email content at design time only. It builds the personalization logic — conditions, product selection, and filters — and executes that logic when the email is sent to each customer.

This means the AI never reads individual customer profiles. Only your data schema is passed to the model — field names like "purchase item ID," not actual values. No personally identifiable information (PII) reaches the model.

How Loomi marketing agent creates personalization

To personalize content, Loomi marketing agent combines three building blocks:

  • Aggregates — behavioral data derived from customer activity, such as previously purchased products, previously purchased brands, or cart contents.
  • Recommendations — output from the recommendation engine, such as bestsellers, AI recommendations, or similar items.
  • Jinja — code that filters, combines, and post-processes aggregates and recommendations into the final list of content to display.

For example, to show "bestsellers from the brand the customer previously purchased," Loomi marketing agent uses an aggregate (brand of previously purchased products) combined with a bestseller recommendation, then applies a Jinja filter that keeps only bestsellers whose brand matches the aggregate.

Loomi marketing agent also creates simpler personalization tags for individual customer attributes — such as first name or loyalty points balance — without needing the full three-building-block approach.

How Loomi marketing agent understands your project

Loomi marketing agent draws on two sources to understand your data when building personalization.

Data mapping

Data mapping is Loomi marketing agent's highest-trust source. Mismapped or missing mappings are the most common cause of personalization problems — they can cause Loomi marketing agent to build aggregates or recommendations that return no results, which triggers abort messages in preview.

Before using Loomi marketing agent for the first time, make sure the following mappings are in place:

  • Catalog mapped to your product catalog.
  • view_item event mapped to product ID.
  • purchase_item event mapped to product ID.

Common mapping issues that cause personalization to fail:

  • An event isn't tracked at all, but is mapped — Loomi marketing agent uses it and returns no results.
  • Multiple separate events track something that should be a single event with attributes (for example, separate cart-update events instead of one event with a product ID attribute).
  • A field is tracked as a string where an array is required (for example, product_ids tracked as "[\"123\"]" instead of ["123"]).
  • The catalog item ID in events doesn't match the primary ID in the catalog — this prevents Jinja from fetching catalog items by ID.

Data schema

When an attribute isn't mapped, Loomi marketing agent falls back to your data schema. It can use unmapped event and product attributes, but with less confidence — it only sees a sample of around 20 example values per attribute for non-PII fields.

Limited visibility into an unmapped attribute can cause personalization issues. For example, filtering recommendations on the wrong attribute returns an empty result.

When a field is marked as PII, Loomi marketing agent cannot inspect its example values at all. This can lead to mistakes — for example, if a child_names field is marked PII and a user asks to include children's names in the subject line, Loomi marketing agent has no way to verify the field's actual structure or whether it contains the expected values.

How to spot personalization issues

Loomi marketing agent automatically prevents broken or blank emails from being sent using abort statements — rules that stop an email from sending when personalization can't be resolved for a customer. Aborts trigger when a personalized product source is empty or malformed — for example, an empty cart, no matching recommendations, inactive products, or fewer products than the block requires. When an abort triggers for a customer, the email is not sent to that customer.

The first place you'll see personalization failing is in preview. Open the preview for a specific customer — if personalization is failing, the preview shows abort messages, often across many or most customers.

How to fix personalization issues

Step 1 — Read the abort message carefully.
It usually states exactly what's missing — for example, "couldn't find previously purchased product" or "not enough recommended products."

Campaign Agent preview panel showing a "Not enough blocks found" abort message.

Step 2 — Ask Loomi marketing agent to explain the block.
Use the Explain action on the block, or ask in the conversation — for example: "How exactly are previously purchased products implemented?" Verify that:

  • The right events and event attributes are used.
  • The right filters and exclusions are applied.
  • The abort rules aren't overly strict — for example, requiring exactly 6 products when "up to 6" would work.
Email block toolbar showing the Ask and Explain buttons.

Step 3 — Adjust conversationally.
For example: "Change the minimum number of products to 3" or "Use bestsellers instead of personalized recommendations."

Step 4 — Verify the underlying objects yourself.
Ask Loomi marketing agent for the IDs of the aggregate or recommendation it used, then open those objects in your project to confirm they return results for a test customer.

📘

Note

You can't inspect the generated Jinja directly. Ask Loomi marketing agent to explain it or change it.

Common personalization issues

The following issues are the most frequent causes of personalization problems in Loomi marketing agent. If you're seeing abort messages in preview, start here.

IssueWhat you seeHow to fix
Event product ID doesn't match the primary catalog IDEmpty or aborted product sourceFix data mapping, or fix tracking to use the primary catalog ID in events.
Wrong filtering attribute or logic (for example, category_level_2 instead of category_level_1, or equals "shoes" instead of contains "shoes")Empty resultAsk Loomi marketing agent to correct the filter.
Data type mismatch — string tracked where an array is required (for example, product_ids)Empty or aborted product sourceFix tracking to use the expected type, and tell Loomi marketing agent how to work with the field.
Abort rules too strict (for example, requires exactly 6 products)Abort message in previewAsk Loomi marketing agent to lower the minimum, use "up to N," or fall back to a different strategy — for example: "Fall back to bestsellers."


Did this page help you?

© Bloomreach, Inc. All rights reserved.