Saltar al contenido principal

Rules list

The Reglas tab is the first tab of the Britva section. Which rules it lists follows the Britva read scope of your template: with Todos los equipos — every rule; with Equipo — the global rules, yours, your team's team rules and the personal rules of your teammates; with Propios — the global rules, yours and your team's team rules. A click on a row opens the rule in the editor — see Creating a rule.

The + Nueva regla button above the table opens an empty editor. It is shown only to roles that are allowed to manage rules. While there are no rules yet, the table shows a line about the empty list. For those who may manage rules, may use the AI Assistant and have a model connected for it, a button with the same name but without the plus sign is added next to that line — it starts a guided set-up with the AI Assistant instead of opening the editor.

Column reference​

  • ID — the rule number. The same number is shown in the ID column of the Trigger logs.

  • Nivel — who the rule applies to: global — everyone's ads, team: and the team number — the ads of that team, user: and the user number — the ads of one person. The column can be filtered.

  • Regla — the rule name. A dot stands in front of it: green — the rule is enabled, grey — it is disabled.

  • Acción — the action value stored with the rule. The column can be filtered. The rule editor does not set this value: a rule created in it gets while_matches. Another value can be written only through the Qubix programmatic interface (see MCP/API) when a rule is saved with an action; an empty value is refused. The values are the pause terms of Scheduling and pauses plus skip:

    • 6h, 12h, 24h — a pause for 6, 12 or 24 hours from the moment it is set;
    • next_day_target_geo — until midnight in the time zone of the ad's country; if that zone is not known, the pause is held like while_matches;
    • next_day_ad_account — until midnight in the time zone of the ad account; if that zone is not known, the pause is held like while_matches;
    • while_matches — no fixed term: the ad stays on pause while the rule keeps triggering and returns on its own when the condition stops being met;
    • permanent — no return term: the ad does not come back on its own;
    • skip — the rule is not run by the check cycle.

    For a rule written in code the stored value does not choose the term of a pause: the term is the first argument of the pauseAd call in the code (see Actions), so a rule that shows while_matches here can still pause an ad for 24h. In the check cycle the stored value decides only whether the rule is run at all: with skip it is not.

  • En espera — how many ads the rule is holding on pause right now; a dash when none. The column can be sorted.

  • Prioridad — the order in which rules run, written as P and the number: the lower the number, the earlier the rule runs. Numbers up to 10 and numbers from 11 to 25 each get their own highlight; larger numbers are shown without one. The column can be sorted.

Above the table there is a search by rule name.

Filter by macros​

A macro here is a field of the ad that the rule code reads, for example ad.spend_24h. Britva finds them in the code of every rule: the forms ad.field, ad["field"], ad['field'] and const { field } = ad are recognised; a field read in another way, for example ad[name] with a variable, is not found.

The filter lives in the ⋮ menu in the top-right corner of the window and is available while the Reglas tab is open and at least one rule reads a field of the ad:

  1. Open the ⋮ menu. While nothing is chosen, its item reads Macros: todas. Open the item — it lists all macros found in the rules, the most used first, and the number of rules that use the macro stands in brackets after its name.
  2. Type a name into the search field of the list to find a macro quickly; when nothing fits, the list says Sin coincidencias.
  3. Switch on one or several macros. The table keeps only the rules that read all the chosen macros.
  4. The item now reads Macros: … — the names of the first two chosen macros stand in place of the ellipsis, and for more of them + and the number of the rest is added.
  5. To drop the filter, use Limpiar todo (…) in the same menu — the number of chosen macros stands in place of the ellipsis. The item appears once at least one macro is chosen.

What's next​