Предметные инструменты · sender

Рассылки и контакты · изменения · Создать список сегмента и загрузить контакты

sender_site_sender_m186_writeИзменение

Создать список сегмента и загрузить контакты.

Действия

В tools/call передайте имя инструмента, значение action и параметры действия во вложенном объекте arguments.

Подготовка сегмента к загрузке контактов

sender_segments_initialize_upload

Создать список сегмента и загрузить контакты.

segment_id
целое число · обязательный параметр
contacts
массив · обязательный параметр
request_id
строка · обязательный параметр
expected_revision
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "segment_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "contacts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 255
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "maxLength": 255
          }
        },
        "oneOf": [
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "phone"
            ]
          }
        ],
        "additionalProperties": false
      }
    },
    "request_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "minLength": 32,
      "maxLength": 32
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "minLength": 64,
      "maxLength": 64
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "segment_id",
    "contacts",
    "request_id",
    "expected_revision",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Загрузка контактов в сегмент рассылки

sender_segments_upload

Создать список сегмента и загрузить контакты.

segment_id
целое число · обязательный параметр
contacts
массив · обязательный параметр
request_id
строка · обязательный параметр
expected_revision
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "segment_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "contacts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 255
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "maxLength": 255
          }
        },
        "oneOf": [
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "phone"
            ]
          }
        ],
        "additionalProperties": false
      }
    },
    "request_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "minLength": 32,
      "maxLength": 32
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "minLength": 64,
      "maxLength": 64
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "segment_id",
    "contacts",
    "request_id",
    "expected_revision",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Создать список сегмента и загрузить контакты

sender_segments_upload_attach

Один оригинальный вызов Segment::upload для существующего активного сегмента D/R без endpoint и выбранных зависимостей подготовки. Ядро само создаёт List через appendContactSetConnector, сохраняет сегмент и продолжает импорт даже после false внутреннего save. Собственный пассивный legacy ListOnAfterAdd observer сохраняет только положительный ID и scalar-проекцию созданного списка до последующих native save/import; оригинальные поля и события не изменяются. Сразу после возврата wrapper отдельно сохраняется strict same-receiver boolean, до удаления observer и любых fallible-проверок. Результат доказывает наблюдаемое желаемое состояние списка, endpoint, контактов, membership и исходных счётчиков до импорта, сохранность чужих данных и успешное освобождение собственных ресурсов. Он не доказывает внутренний count/0/false/save-return, взятие native lock, эксклюзивность или полное завершение импорта. Ошибка до OnAfterAdd может оставить неатрибутированный orphan; ошибка записи observer, вызова, readback или cleanup означает UNKNOWN без replay, угадывания ID или автоматической очистки. Исторический status не вызывает ядро повторно. Исходные ACL/policy/source/locale/connection и effectful nonce SAVEPOINT/RELEASE проверки сохраняются. Обычные native cache/IM эффекты разрешены; чужие jobs не запрещаются глобально. Это отдельный default-off finite profile; существующие upload и explicit initialize-client не меняются. До нативного вызова требуется подтвердить на одном физическом соединении прямые глобальные SELECT и TRIGGER текущего аккаунта и partial_revokes=0; права ролей, схем и таблиц не заменяют эту сертификацию. Проверяются триггеры шести затрагиваемых таблиц, их исходящие FK и входящие FK из любых дочерних схем. Если видимость метаданных не доказана, профиль отклоняется без изменения привилегий или внешних DBA-данных. Structured PHONE and mixed EMAIL/PHONE rows use the same original Segment owner and native Factory/TYPE detection. Configured PHONE retains its current committed site/global country. The finite implicit initializer additionally admits an absent/empty/0 global country, no selected-site override, original Loader false and existing RU or DE Context with matching global LANGUAGE_ID: preview projects with the explicit corresponding country; the unchanged Segment owner initializes global country 1 (RU) or 46 (DE) implicitly. DE country-name translation uses the original de-to-en fallback with the qualified absent DE tools file; this does not change the detected country. The existing native warning is admitted only under the qualified original handler policy. Exact option delta and unchanged foreign option/site rows are verified after immediate durable owner-return custody; the inner initializer return remains unobserved. Other language/Bitrix24/GeoIP initializer branches remain unsupported. Native CODE trim precedes PHONE normalization, including original invalid-parse/raw-digit fallback. Only selected PHONE requests reach the existing qualified Parser/metadata/IO and type-caption profile. PHONE country binds its preview revision and active guards; historical status does not parse or reobserve that country. EMAIL-only revisions and receipts retain their previous shape.

segment_id
целое число · обязательный параметр
contacts
массив · обязательный параметр
request_id
строка · обязательный параметр
expected_revision
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "segment_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "contacts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 255
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "maxLength": 255
          }
        },
        "oneOf": [
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "phone"
            ]
          }
        ],
        "additionalProperties": false
      }
    },
    "request_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "minLength": 32,
      "maxLength": 32
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "minLength": 64,
      "maxLength": 64
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "segment_id",
    "contacts",
    "request_id",
    "expected_revision",
    "confirm"
  ],
  "additionalProperties": false
}