Skip to content

Most Common Marketer AI Errors ​

Table of Contents


1. Missing UUID in Product Rule Filters ​

What the problem is ​

When Marketer AI creates product rules (via MCP/API tool), every filter group and every individual filter must have an id field with a unique UUID identifier (format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx).

If the id field is omitted, the rule is saved to the database with an incomplete structure. The rule appears to work correctly (products are filtered), but displays an error in the "Rule Settings" tab of the user interface.

Comparison — correct vs. incorrect structure ​

CORRECT structure (as generated by the UI):

json
{
  "filterGroups": [
    {
      "id": "ffc3b8d4-1a2b-4c3d-8e9f-000000000001",
      "operator": "and",
      "filters": [
        {
          "id": "e393d113-1a2b-4c3d-8e9f-000000000002",
          "param": "cost",
          "symbol": "greaterThanOrEqual",
          "value": "2",
          "operator": "and"
        }
      ]
    }
  ]
}

INCORRECT structure (as generated by AI without UUID):

json
{
  "filterGroups": [
    {
      "operator": "and",
      "filters": [
        {
          "param": "cost",
          "symbol": "greaterThanOrEqual",
          "value": "2",
          "operator": "and"
        }
      ]
    }
  ]
}

Steps that Marketer AI must take independently ​

Step 1 — Always generate a UUID for each filter group

For every object in the filterGroups array, set the id field to a UUID v4. Generate UUIDs independently when building the rule structure, before calling the MCP tool.

UUID v4 format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where x is a random hex digit and y is one of the digits 8, 9, a, b.

Example of a correctly generated UUID: a3f7c21e-59d0-4b18-9e6a-1d2e3f4a5b6c

Step 2 — Always generate a UUID for each filter inside a group

Every object in the filters array (inside each group) must have its own separate id field with a different UUID than the parent group.

Step 3 — Verify the structure before calling the tool

Before calling the MCP tool to save a rule, verify internally:

  • Does every element in filterGroups have an id field? → if not, generate a UUID
  • Does every element in filters inside a group have an id field? → if not, generate a UUID
  • Do any two elements share the same UUID? → each must be unique

Step 4 — Never copy UUIDs between rules

If you are creating multiple rules at once (e.g., via batch), each rule, each group, and each filter must have a new, unique UUID. UUIDs from another rule must not be reused within the same operation.

Structure template to fill in ​

json
{
  "filterGroups": [
    {
      "id": "<NEW_UUID>",
      "operator": "and",
      "filters": [
        {
          "id": "<NEW_UUID>",
          "param": "<parameter>",
          "symbol": "<comparison_operator>",
          "value": "<value>",
          "operator": "and"
        }
      ]
    }
  ]
}

Why this matters ​

The Sembot UI automatically generates a UUID every time the user clicks "add filter". The MCP tool does not do this automatically — the responsibility for generating UUIDs lies with Marketer AI at the time the request is built. The backend saves the structure exactly as it receives it — with or without UUIDs, without validating completeness.