div-trigger

A trigger that causes an action when activated.

Parameters

Parameters Description
actions

array

Required parameter.

Action when a trigger is activated.

An array must not be empty.

condition

bool_int

Required parameter.

Condition for activating a trigger. For example, liked && subscribed.

mode

string

Trigger activation mode:

  • on_condition — a trigger is activated when the condition changes from false to true;
  • on_variable — a trigger is activated when the condition is met and the variable value changes.
  • Possible values: on_condition, on_variable.

    Default value: on_condition.

    JSON
    {
      actions*: [
        {
          download_callbacks: {
            on_fail_actions: [ div-action, ... ],
            on_success_actions: [ div-action, ... ]
          },
          is_enabled: "bool_int",
          log_id*: "string",
          log_url: "string",
          menu_items: [
            {
              action: div-action,
              actions: [ div-action, ... ],
              text*: "string"
            },
            ...
          ],
          payload: "object",
          referer: "string",
          scope_id: "string",
          target: "string",
          typed: div-action-typed,
          url: "string"
        },
        ...
      ],
      condition*: "bool_int",
      mode: "string"
    }