{
    "name": "Строительная компания",
    "nodes": [
        {
            "id": "node-poCXBs",
            "type": "rating",
            "position": {
                "x": 2446,
                "y": -169
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "rating_field": "{{message}}"
            }
        },
        {
            "id": "node-0CQBqP",
            "type": "assignment",
            "position": {
                "x": 1517,
                "y": -329
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "message": "",
                "employee_id": "31674",
                "assignment_type": "distributionStrictlyTurn",
                "reassignment": false,
                "reassignment_time": 60
            }
        },
        {
            "id": "node-An7Teg",
            "type": "review",
            "position": {
                "x": 3329,
                "y": -87
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "review_field": ""
            }
        },
        {
            "id": "node-Gsemvp",
            "type": "keyreaction",
            "position": {
                "x": -157,
                "y": -652
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "as_reply": false,
                "reaction_to": "outgoing",
                "message": "Отлично. Выберите время для визита замерщика Михаила по ссылке: https://primer.bitrix24.ru/111\n",
                "action": "send_message",
                "search_pattern": "full_match",
                "key": "/bot"
            }
        },
        {
            "id": "node-53ZxVl",
            "type": "element_search",
            "position": {
                "x": 532,
                "y": -379
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "element_type": "deal",
                "is_element_active": "active",
                "one_phone": "{{phone}}",
                "one_email": "",
                "chat_id": "",
                "username": "{{username}}",
                "messenger_type": "telegram"
            }
        },
        {
            "id": "node-eHGezZ",
            "type": "start",
            "position": {
                "x": -174,
                "y": -19
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "reaction_to": "incoming"
            }
        },
        {
            "id": "node-XGFuEX",
            "type": "ai_agent",
            "position": {
                "x": 150,
                "y": -10
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "as_reply": false,
                "type_of_work": "dialog",
                "name": "Алексей",
                "user_prompt": "{{message}}",
                "system_prompt": "Ты - бот-администратор строительной компании`Пример`. Твоя задача - квалифицировать тип ремонта и помещения, и подготовить клиента к выезду замерщика (не сообщай об этом). Задавай вопросы по одному, не оценивай ответы клиента.",
                "role": "ai_operator_custom",
                "prompt_for_custom_role": "Ты - бот-администратор строительной компании`Пример`",
                "custom_instructions": "",
                "send_result_to_chat": false,
                "delay_before_response_enabled": false,
                "delay_before_response_time": 0,
                "delay_before_response_time_type": "second",
                "finish_dialogue_if_reached_all_goals": true,
                "finish_dialogue_if_not_response_enabled": false,
                "finish_dialogue_if_not_response_time": 0,
                "finish_dialogue_if_not_response_time_type": "second",
                "finish_dialogue_if_over_n_messages": false,
                "finish_dialogue_n_messages_limit": 0,
                "finish_dialogue_if_low_answer_confidence": true,
                "finish_dialogue_if_user_call_operator": false,
                "finish_dialogue_if_user_is_negative": false,
                "finish_dialogue_if_custom_condition": "",
                "finish_dialogue_if_internal_user_wrote": false,
                "process_img_files": true,
                "process_audio_files": true,
                "process_text_files": true,
                "integration_type": "chatapp_ai",
                "model": "gpt-5",
                "verbosity": "",
                "reasoning_effort": "",
                "is_history_enabled": false,
                "history_limit_mode": "time",
                "history_limit_value": "",
                "history_limit_time_type": "hour",
                "knowledge_enabled": false,
                "knowledge_files": [],
                "knowledge_sites": [],
                "knowledge_quick_replies": [],
                "custom_ui_settings": {
                    "model_enabled": true
                },
                "ai_goals": [
                    {
                        "id": "",
                        "goal": "🏗️ Здравствуйте! Я бот компании «Пример».\nВыезд инженера на замер — бесплатно, смета после замера не меняется.\nЧтобы я показал вам примерную цену уже сейчас — ответьте на 3 вопроса.\n\nВопрос 1/3. Какая у вас общая площадь объекта?\n🔹 До 30 м² (студия)\n🔹 30–50 м² (однушка)\n🔹 50–80 м² (двушка)\n🔹 80+ м² (трешка/дом)",
                        "is_save_answer_in_variable": true,
                        "sort": 0,
                        "variable": "",
                        "variable_list_ids": [
                            37350
                        ],
                        "dialogs_field_keys": []
                    },
                    {
                        "id": "",
                        "goal": "Вопрос 2/3. В каком состоянии помещение?\n\n🔹 Черновое (голые стены, стяжка)\n🔹 Косметическое (старый ремонт, нужно обновить)",
                        "is_save_answer_in_variable": true,
                        "sort": 1,
                        "variable": "",
                        "variable_list_ids": [
                            37351
                        ],
                        "dialogs_field_keys": []
                    },
                    {
                        "id": "",
                        "goal": "Вопрос 3/3. Когда планируете стартовать?\n\n🔹 В ближайшие 2 недели\n🔹 Через месяц\n🔹 Пока смотрю",
                        "is_save_answer_in_variable": true,
                        "sort": 2,
                        "variable": "",
                        "variable_list_ids": [
                            37352
                        ],
                        "dialogs_field_keys": []
                    },
                    {
                        "id": "",
                        "goal": "Запроси у клиента актуальный телефон",
                        "is_save_answer_in_variable": true,
                        "sort": 3,
                        "variable": "",
                        "variable_list_ids": [
                            37589
                        ],
                        "dialogs_field_keys": []
                    }
                ],
                "custom_escalations": []
            }
        },
        {
            "id": "node-xG9580",
            "type": "autoclose",
            "position": {
                "x": -168,
                "y": 227
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "action": "do_nothing",
                "message": "",
                "wait_for": 604800,
                "time_unit": "day"
            }
        },
        {
            "id": "node-O6EgMN",
            "type": "wait",
            "position": {
                "x": 3041,
                "y": -90
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "wait_for": 0,
                "time_unit": "sec",
                "side": "in"
            }
        },
        {
            "id": "node-es9xjw",
            "type": "wait",
            "position": {
                "x": 2133,
                "y": -96
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "wait_for": 0,
                "time_unit": "sec",
                "side": "in"
            }
        },
        {
            "id": "node-6hFDJM",
            "type": "dialog_fields",
            "position": {
                "x": 1193,
                "y": -51
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "dialog_fields_to_edit": [
                    {
                        "id": "",
                        "key": "unreadMessages",
                        "value": "unread"
                    },
                    {
                        "id": "",
                        "key": "tags",
                        "value": "add,6287"
                    }
                ]
            }
        },
        {
            "id": "node-DWAgDy",
            "type": "crm_edit_deal",
            "position": {
                "x": 863,
                "y": -104
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "name": "{{number}}",
                "stage": "",
                "amount": "",
                "currency": "",
                "responsible": "",
                "contact": "",
                "company": "",
                "pipeline": "",
                "deal_id": "{{element_search|node-53ZxVl|element_id}}",
                "custom_fields": [
                    {
                        "id": "",
                        "key": "UF_CRM_1783528291909",
                        "value": "{{1}}, {{2}}, {{3}}"
                    }
                ]
            }
        },
        {
            "id": "node-tMd2kD",
            "type": "offhours",
            "position": {
                "x": -506,
                "y": -46
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "message": "Здравствуйте! Мы сейчас уже не работаем. Ваше обращение передали спецалисту, он ответит вам в рабочее время!",
                "action": "send_message"
            }
        },
        {
            "id": "node-NlAGik",
            "type": "message",
            "position": {
                "x": 2743,
                "y": -174
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "as_reply": false,
                "message": "Если не сложно, оставьте, пожалуйста, честный отзыв о нашей работе",
                "files_urls": []
            }
        },
        {
            "id": "node-Q3HTgB",
            "type": "message",
            "position": {
                "x": 1830,
                "y": -175
            },
            "data": {
                "display_title": "",
                "width": 0,
                "height": 0,
                "as_reply": false,
                "message": "Оценте, пожалуйста, качество обслуживания от 0 до 5 :)",
                "files_urls": []
            }
        }
    ],
    "edges": [
        {
            "id": "xy-edge__node-0CQBqP123214332-node-Q3HTgBnode-Q3HTgB",
            "source": "node-0CQBqP",
            "source_name": "assignment",
            "target": "node-Q3HTgB",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-53ZxVl123214332-node-DWAgDy1232132",
            "source": "node-53ZxVl",
            "source_name": "element_search",
            "target": "node-DWAgDy",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-6hFDJMdialog_field_source-node-0CQBqP1232132",
            "source": "node-6hFDJM",
            "source_name": "dialog_fields",
            "target": "node-0CQBqP",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-DWAgDy123214332-node-6hFDJMdialog_field_target",
            "source": "node-DWAgDy",
            "source_name": "crm_edit_deal",
            "target": "node-6hFDJM",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-eHGezZ2-node-XGFuEXai-agent-target",
            "source": "node-eHGezZ",
            "source_name": "start",
            "target": "node-XGFuEX",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-es9xjw2-node-poCXBs1232132",
            "source": "node-es9xjw",
            "source_name": "wait",
            "target": "node-poCXBs",
            "data": {
                "edge_data": "did_receive"
            }
        },
        {
            "id": "xy-edge__node-NlAGiknode-NlAGik-node-O6EgMN2",
            "source": "node-NlAGik",
            "source_name": "message",
            "target": "node-O6EgMN",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-O6EgMN2-node-An7Teg1232132",
            "source": "node-O6EgMN",
            "source_name": "wait",
            "target": "node-An7Teg",
            "data": {
                "edge_data": "did_receive"
            }
        },
        {
            "id": "xy-edge__node-poCXBs123214332-node-NlAGiknode-NlAGik",
            "source": "node-poCXBs",
            "source_name": "rating",
            "target": "node-NlAGik",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-Q3HTgBnode-Q3HTgB-node-es9xjw2",
            "source": "node-Q3HTgB",
            "source_name": "message",
            "target": "node-es9xjw",
            "data": {
                "edge_data": null
            }
        },
        {
            "id": "xy-edge__node-XGFuEXai-agent-source-node-53ZxVl1232132",
            "source": "node-XGFuEX",
            "source_name": "ai_agent",
            "target": "node-53ZxVl",
            "data": {
                "edge_data": null
            }
        }
    ],
    "variables": [],
    "tags": [],
    "settings": {
        "fill_blocks": true,
        "fill_variables": false,
        "fill_tags": true,
        "tags_category_id": null,
        "reaction_while_on_pause": false
    },
    "template_type": "dialogue",
    "groups": []
}