{
  "$kind": "ELMA.Assistant.Bot",
  "version": "2.4.0",
  "name": "Скрипт",
  "scenarios": [
    {
      "$kind": "ELMA.Assistant.DefaultScenario",
      "triggerGroup": {
        "$kind": "ELMA.Assistant.DefaultTriggerGroup",
        "triggers": [
          {
            "$kind": "ELMA.Assistant.StartTrigger",
            "outputBindingId": "BND_SzhE3Kb1cL",
            "id": "TRR005000",
            "$designer": null
          }
        ],
        "name": null,
        "id": "TRG005000",
        "$designer": null
      },
      "actionGroups": [
        {
          "$kind": "ELMA.Assistant.DefaultActionGroup",
          "actions": [
            {
              "$kind": "ELMA.Assistant.ScriptAction",
              "content": "context.output.variables.conversationid = JSON.stringify(context.input.environment.properties.conversationId);\n",
              "executionTimeout": 60,
              "retryCount": 5,
              "retryDelay": 1,
              "outputBindingId": null,
              "id": "ACT_YdhZhU4_B8",
              "$designer": null
            },
            {
              "$kind": "ELMA.Assistant.TextOutput",
              "messages": [
                {
                  "$kind": "ELMA.Assistant.Message",
                  "content": "conversation id: {VAR_eWlCgBIs5L} ",
                  "attachments": [],
                  "id": "MSG_XgUv88rvEh",
                  "$designer": null
                }
              ],
              "id": "ACT_6uZaD9K6EH",
              "$designer": null
            }
          ],
          "inputBindingIds": [
            "BND_SzhE3Kb1cL"
          ],
          "outputBindingId": null,
          "name": "Приветствие",
          "id": "ACG011000",
          "$designer": {
            "id": "ACG011000",
            "name": null,
            "description": null,
            "positionX": 846.3333,
            "positionY": 20.0
          }
        }
      ],
      "intents": [],
      "bindings": [
        {
          "$kind": "ELMA.Assistant.Binding",
          "sourceEntityId": "TRR005000",
          "targetEntityId": "ACG011000",
          "id": "BND_SzhE3Kb1cL",
          "$designer": null
        }
      ],
      "version": "1.1.0",
      "name": "Старт бота",
      "enabled": true,
      "interruption": "Disabled",
      "cancellation": "Disabled",
      "variables": [
        {
          "$kind": "ELMA.Assistant.Variable",
          "name": "conversationId",
          "code": "conversationid",
          "type": "String",
          "scope": "Scenario",
          "owner": "User",
          "validators": [],
          "id": "VAR_eWlCgBIs5L",
          "$designer": null
        }
      ],
      "id": "SCN_s_TSpF1Ihg",
      "$designer": null
    }
  ],
  "variables": [],
  "settings": {
    "$kind": "ELMA.Assistant.BotSettings",
    "script": {
      "content": "// Примеры работы с событиями бота\n// 1. Событие распознанного интента\n// onIntentRecognized(\"pokupka_prodazha__chasy_raboty_magazinov\", async (botEvent) => {\n//   код интента\n//   console.log(botEvent.intentKey);\n//   результаты распознавания\n//   console.log(botEvent.recognizerResult);\n//   ввод пользователя\n//   console.log(botEvent.userInputText);\n//});\n\n// 2. Событие начала работы элемента ввода данных\n// onInputDialogBegin(\"store_name\", async (botEvent) => {\n//   тип распознавателя\n//   console.log(botEvent.recognizerKind);\n//   сообщение бота\n//   context.output.result.promptText = \"Введите название магазина\";\n//   сообщение при нераспознанном вводе\n//   context.output.result.unrecognizedPromptText = \"Не удалось распознать название магазина\";\n//   подсказки бота\n//   context.output.result.suggestedActions = [\"Мебель\", \"Одежда\", \"Обувь\"];\n// });\n\n// 3. Событие прерывания ввода\n// onInputDialogBeforeInterruption(\"store_name\", async (botEvent) => {\n//   ввод пользователя\n//   console.log(botEvent.userInputText);\n//   распознанное значение\n//   console.log(botEvent.recognizedValue);\n//   тип распознавателя\n//   console.log(botEvent.recognizerKind);\n//   нужно ли разрешать прерывать работу элемента\n//   context.output.result.allowInterruptions = false;\n// });\n\n// 4. Событие распознавания ввода пользователя\n// onInputDialogValueRecognized(\"store_name\", async (botEvent) => {\n//   ввод пользователя\n//   console.log(botEvent.userInputText);\n//   распознанное значение\n//   console.log(botEvent.recognizedValue);\n//   тип распознавателя\n//   console.log(botEvent.recognizerKind);\n//   объект диалоговой активности пользователя\n//   console.log(botEvent.activity);\n//   распознано ли значение\n//   context.output.result.recognized = true;\n//   распознанное значение\n//   context.output.result.outputValue = \"Магазин Мебель\";\n// });\n",
      "executionTimeout": 15,
      "retryCount": 0,
      "retryDelay": 1
    },
    "integrations": [],
    "localization": {
      "locale": "ru-ru"
    },
    "smtp": {
      "host": "",
      "name": "",
      "username": "",
      "password": "",
      "port": 465,
      "useSsl": true
    },
    "recognition": {
      "intentThreshold": 0.6,
      "nlp": {
        "useCustomTrainingModel": false,
        "customTrainingModel": null
      },
      "kb": {
        "enabled": null,
        "threshold": 0.8,
        "searchParentsOnlyIfNoContext": null
      },
      "resultSelectionPriority": "Score"
    },
    "conversationClosing": {
      "closingEnabled": false,
      "closingTimeoutSeconds": null,
      "closingMessage": null
    },
    "id": "SET_5sUFPenBFp",
    "$designer": null
  },
  "id": "BOT_x9BQ3XnKCm",
  "$designer": null
}